@font-face{font-family:'Barlow';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/barlow-latin-400-normal.woff2) format('woff2');}
@font-face{font-family:'Barlow';font-style:normal;font-weight:500;font-display:swap;src:url(fonts/barlow-latin-500-normal.woff2) format('woff2');}
@font-face{font-family:'Barlow';font-style:normal;font-weight:600;font-display:swap;src:url(fonts/barlow-latin-600-normal.woff2) format('woff2');}
@font-face{font-family:'Barlow Condensed';font-style:normal;font-weight:500;font-display:swap;src:url(fonts/barlow-condensed-latin-500-normal.woff2) format('woff2');}
@font-face{font-family:'Barlow Condensed';font-style:normal;font-weight:600;font-display:swap;src:url(fonts/barlow-condensed-latin-600-normal.woff2) format('woff2');}
@font-face{font-family:'Barlow Condensed';font-style:normal;font-weight:700;font-display:swap;src:url(fonts/barlow-condensed-latin-700-normal.woff2) format('woff2');}
:root{
  --bg:#F0F2F1; --surface:#FFFFFF; --surface-2:#F5F7F6; --ink:#1B2326; --ink-2:#566166; --ink-3:#7F8A8F; --line:#DEE3E1;
  --brique:#B83B5E; --brique-ink:#FFFFFF; --brique-soft:#F8E5EB; --hero:#B83B5E; --hero-ink:#FFFFFF;
  --garonne:#2A7573; --garonne-soft:#DDEEEC;
  --idea:#A5660E; --idea-soft:#F6EAD3; --later:#41639A; --later-soft:#E1E8F4; --hist:#69727A; --hist-soft:#E7EAEB;
  --add:#23774A; --add-bg:#E0F1E6; --del:#AE3434; --del-bg:#F8E1E1;
  --shadow:0 1px 2px rgba(20,30,34,.06), 0 2px 8px rgba(20,30,34,.04);
  --scrim:rgba(15,20,22,.45);
  --font:"Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --cond:"Barlow Condensed", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg:#0F1416; --surface:#171E21; --surface-2:#1E272B; --ink:#E4E9E8; --ink-2:#A5B0B4; --ink-3:#7A8890; --line:#2A353A;
    --brique:#DE6B8B; --brique-ink:#1A0E12; --brique-soft:#33202A; --hero:#5C2A3C; --hero-ink:#FFE8EF;
    --garonne:#5FB4AE; --garonne-soft:#1A3230;
    --idea:#DDA24D; --idea-soft:#302716; --later:#8EAAE0; --later-soft:#1F2A40; --hist:#98A3A9; --hist-soft:#252E32;
    --add:#77CCA0; --add-bg:#1A3125; --del:#EE8F8F; --del-bg:#3A2121;
    --shadow:0 1px 2px rgba(0,0,0,.4), 0 2px 8px rgba(0,0,0,.22);
    --scrim:rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"]{
  --bg:#0F1416; --surface:#171E21; --surface-2:#1E272B; --ink:#E4E9E8; --ink-2:#A5B0B4; --ink-3:#7A8890; --line:#2A353A;
  --brique:#DE6B8B; --brique-ink:#1A0E12; --brique-soft:#33202A; --hero:#5C2A3C; --hero-ink:#FFE8EF;
  --garonne:#5FB4AE; --garonne-soft:#1A3230;
  --idea:#DDA24D; --idea-soft:#302716; --later:#8EAAE0; --later-soft:#1F2A40; --hist:#98A3A9; --hist-soft:#252E32;
  --add:#77CCA0; --add-bg:#1A3125; --del:#EE8F8F; --del-bg:#3A2121;
  --shadow:0 1px 2px rgba(0,0,0,.4), 0 2px 8px rgba(0,0,0,.22);
  --scrim:rgba(0,0,0,.6);
  color-scheme: dark;
}
:root{ box-sizing:border-box; padding-top:env(safe-area-inset-top,0px); padding-bottom:env(safe-area-inset-bottom,0px); }
html{ scroll-padding-top:env(safe-area-inset-top,0px); height:100%; }
*,*::before,*::after{ box-sizing:inherit; }
body{ margin:0; height:100%; background:var(--bg); color:var(--ink); font-family:var(--font); font-size:16px; line-height:1.5; -webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; }
button,input,select,textarea{ font:inherit; color:inherit; }
button{ cursor:pointer; }
:focus-visible{ outline:2px solid var(--garonne); outline-offset:2px; border-radius:6px; }
@media (prefers-reduced-motion: reduce){ *{ transition:none !important; animation:none !important; } }

/* ---------- Structure ---------- */
:root{ --bar-h:64px; }
.app{ display:flex; flex-direction:column; height:100%; }
.topbar{ position:relative; z-index:20; display:flex; align-items:center; gap:8px; min-height:54px; padding:5px 10px 5px 12px; background:var(--surface); border-bottom:1px solid var(--line); }
.brand{ display:flex; align-items:center; gap:9px; min-width:0; flex:1; min-height:44px; background:none; border:0; padding:0; text-align:left; }
.brand-mark{ flex:none; width:26px; height:26px; border-radius:50%; border:4px solid var(--brique); display:grid; place-items:center; }
.brand-mark::after{ content:""; width:6px; height:6px; border-radius:50%; background:var(--brique); }
.brand-txt{ min-width:0; display:flex; flex-direction:column; justify-content:center; }
.brand-name{ font-family:var(--cond); font-weight:700; font-size:15.5px; letter-spacing:.04em; line-height:1.02; }
.brand-name span{ display:block; white-space:nowrap; }
.brand-sub{ display:none; font-size:12px; color:var(--ink-2); line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
@media (min-width:600px){ .brand-name{ font-size:21px; } .brand-name span{ display:inline; } .brand-sub{ display:block; } }
.iconbtn{ flex:none; width:44px; height:44px; display:grid; place-items:center; border-radius:12px; border:0; background:transparent; color:var(--ink); touch-action:manipulation; }
.iconbtn:active{ background:var(--surface-2); }
@media (hover:hover){ .iconbtn:hover{ background:var(--surface-2); } }
.iconbtn svg{ width:22px; height:22px; }
.desk-only{ display:none; }
@media (min-width:900px){ .iconbtn.desk-only{ display:grid; } .bnav{ display:none; } }
.who-pill{ flex:none; display:flex; align-items:center; gap:6px; height:44px; padding:0 8px 0 6px; border-radius:22px; border:1.5px solid var(--garonne); background:var(--garonne-soft); max-width:128px; text-align:left; touch-action:manipulation; }
.who-pill .wtx{ display:flex; flex-direction:column; min-width:0; line-height:1.1; }
.who-pill small{ font-size:10.5px; font-weight:500; color:var(--ink-2); white-space:nowrap; }
.who-pill b{ font-size:14.5px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.who-pill > svg{ flex:none; width:14px; height:14px; color:var(--ink-2); }
.av{ flex:none; width:24px; height:24px; border-radius:50%; background:var(--c,var(--hist)); color:#fff; font-size:12px; font-weight:600; display:grid; place-items:center; }
.who-pill .av{ width:28px; height:28px; }
.themesw{ flex:none; display:flex; gap:2px; padding:2px; border-radius:14px; background:var(--surface-2); border:1px solid var(--line); }
.themesw button{ width:40px; height:40px; display:grid; place-items:center; border:0; border-radius:11px; background:transparent; color:var(--ink-3); touch-action:manipulation; }
.themesw button svg{ width:20px; height:20px; }
.themesw button.on{ background:var(--surface); color:var(--brique); box-shadow:0 1px 3px rgba(0,0,0,.18); }
@media (max-width:340px){ .brand-mark{ display:none; } .brand{ gap:0; } }
@media (max-width:380px){ .who-pill .av{ display:none; } .who-pill{ padding-left:11px; } .topbar{ gap:6px; padding-left:10px; } }
.banner{ padding:8px 14px; font-size:13px; line-height:1.35; background:var(--idea-soft); color:var(--ink); border-bottom:1px solid var(--line); }
.banner:empty{ display:none; }

.panes{ flex:1; min-height:0; display:flex; }
.pane{ min-height:0; overflow-y:auto; -webkit-overflow-scrolling:touch; overscroll-behavior:contain; scroll-padding-top:64px; scroll-padding-bottom:calc(var(--bar-h) + 24px); }
#treePane{ flex:1; }
#mainPane{ flex:1; display:none; background:var(--bg); }
body[data-view="node"] #treePane, body[data-view="history"] #treePane{ display:none; }
body[data-view="node"] #mainPane, body[data-view="history"] #mainPane{ display:block; }
@media (min-width: 900px){
  #treePane{ flex:none; width:390px; display:block !important; border-right:1px solid var(--line); }
  #mainPane{ display:block !important; }
  .only-mobile{ display:none !important; }
}

/* barre de navigation du bas */
.bnav{ position:fixed; left:0; right:0; bottom:0; z-index:15; display:flex; align-items:flex-end; justify-content:space-around; gap:2px; padding:6px 8px calc(6px + env(safe-area-inset-bottom,0px)); background:var(--surface); border-top:1px solid var(--line); box-shadow:0 -4px 16px rgba(0,0,0,.05); }
.bnav button{ flex:1 1 0; min-width:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; min-height:52px; border:0; background:none; color:var(--ink-2); font-size:11.5px; font-weight:600; border-radius:14px; touch-action:manipulation; }
.bnav button svg{ width:24px; height:24px; }
.bnav button:active{ background:var(--surface-2); }
.bnav button.on{ color:var(--brique); }
.bnav .plus{ flex:0 0 auto; min-width:84px; color:var(--ink-2); justify-content:flex-end; padding-bottom:6px; }
.bnav .plus .pl{ display:grid; place-items:center; width:50px; height:50px; margin-top:-20px; border-radius:50%; background:var(--brique); color:var(--brique-ink); border:3px solid var(--surface); box-shadow:0 4px 12px rgba(0,0,0,.22); }
.bnav .plus .pl svg{ width:26px; height:26px; }
.bnav .plus:active .pl{ transform:scale(.94); }
@media (min-width:900px){ .bnav{ display:none; } }

/* ---------- Explorateur (arborescence) ---------- */
.tree-wrap{ padding:12px 12px calc(var(--bar-h) + 40px); max-width:680px; margin:0 auto; }
@media (min-width:900px){ .tree-wrap{ padding-bottom:32px; } }
.chip{ display:inline-flex; align-items:center; min-height:44px; border:1px solid var(--line); background:var(--surface); border-radius:14px; padding:0 16px; margin-bottom:10px; font-size:14px; font-weight:600; color:var(--ink-2); touch-action:manipulation; }
.root-card{ display:flex; align-items:center; gap:14px; width:100%; min-height:76px; text-align:left; background:var(--hero); color:var(--hero-ink); border:0; border-radius:20px; padding:12px 14px 12px 16px; box-shadow:var(--shadow); touch-action:manipulation; }
.root-card:active{ filter:brightness(.95); }
.root-card.sel{ outline:3px solid var(--brique-soft); }
.root-card .term{ flex:none; position:relative; width:34px; height:34px; border-radius:50%; border:4px solid currentColor; }
.root-card .term::after{ content:""; position:absolute; inset:7px; border-radius:50%; background:currentColor; }
.root-card .rtxt{ flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.root-card .t{ font-family:var(--cond); font-weight:700; font-size:22px; line-height:1.05; letter-spacing:.03em; }
.root-card .s{ font-size:13px; line-height:1.25; opacity:.92; }
.root-card .go{ color:inherit; opacity:.9; }
.tree-bar{ position:sticky; top:0; z-index:5; display:flex; align-items:center; gap:8px; margin:0 -12px 4px; padding:12px 12px 8px; background:var(--bg); }
.tree-bar h2{ margin:0; flex:1; min-width:0; font-family:var(--cond); font-weight:600; font-size:16px; color:var(--ink-2); white-space:nowrap; }
.seg2{ display:flex; border:1px solid var(--line); border-radius:14px; background:var(--surface); overflow:hidden; }
.seg2 button{ display:inline-flex; align-items:center; gap:5px; min-height:44px; padding:0 12px; border:0; background:transparent; font-size:13px; font-weight:600; color:var(--ink-2); white-space:nowrap; touch-action:manipulation; }
.seg2 button + button{ border-left:1px solid var(--line); }
.seg2 button:active{ background:var(--surface-2); }
.seg2 svg{ width:15px; height:15px; }

ul.line{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px; }
li.st{ position:relative; }
li.st > ul.line{ margin:10px 0 2px 22px; padding-left:12px; border-left:2px solid var(--line); gap:8px; animation:grow .14s ease-out; }
@keyframes grow{ from{ opacity:0; transform:translateY(-4px); } to{ opacity:1; transform:none; } }
.row{ position:relative; display:flex; align-items:center; gap:12px; min-height:76px; padding:12px 8px 12px 14px; background:var(--surface); border:1px solid var(--line); border-radius:18px; box-shadow:var(--shadow); cursor:pointer; touch-action:manipulation; transition:transform .1s ease, background .1s ease; }
.row:active{ transform:scale(.985); background:var(--surface-2); }
@media (hover:hover){ .row:hover{ border-color:var(--ink-3); } }
.row.sel{ border-color:var(--brique); box-shadow:0 0 0 2px var(--brique-soft); }
.ico{ position:relative; flex:none; width:46px; height:46px; border-radius:14px; display:grid; place-items:center; background:var(--brique-soft); color:var(--brique); }
.ico svg{ width:25px; height:25px; }
.body{ flex:1; min-width:0; display:flex; flex-direction:column; gap:3px; }
.ttl{ font-family:var(--cond); font-weight:600; font-size:20px; line-height:1.15; letter-spacing:.01em; overflow-wrap:anywhere; }
.ttl .no{ color:var(--brique); margin-right:7px; font-weight:700; }
.sub{ font-size:13.5px; line-height:1.3; color:var(--ink-2); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.go{ flex:none; width:22px; height:22px; display:grid; place-items:center; color:var(--ink-3); }
.go svg{ width:20px; height:20px; }
.tog{ flex:none; display:grid; place-items:center; min-width:60px; height:48px; margin:-2px 0; border:0; background:none; border-radius:14px; touch-action:manipulation; }
.pillc{ display:inline-flex; align-items:center; gap:3px; height:30px; padding:0 8px 0 11px; border-radius:15px; background:var(--surface-2); border:1px solid var(--line); font-size:13px; font-weight:700; color:var(--ink-2); }
.pillc svg{ width:15px; height:15px; transition:transform .15s ease; }
.pillc.static{ padding:0 11px; height:26px; }
.tog:active .pillc{ background:var(--line); }
.tog[aria-expanded="true"] .pillc{ background:var(--brique-soft); border-color:transparent; color:var(--brique); }
.tog[aria-expanded="true"] .pillc svg{ transform:rotate(180deg); }
li.st li.st > .row{ min-height:68px; padding:10px 6px 10px 12px; border-radius:16px; box-shadow:none; }
li.st li.st .ico{ width:40px; height:40px; border-radius:12px; background:var(--garonne-soft); color:var(--garonne); }
li.st li.st .ico svg{ width:22px; height:22px; }
li.st li.st .ttl{ font-family:var(--font); font-size:16.5px; font-weight:600; letter-spacing:0; }
li.st li.st .ttl .no{ color:var(--garonne); }
li.st.z-ideas > .row{ background:var(--idea-soft); border:1.5px dashed var(--idea); }
li.st.z-ideas > .row .ico{ background:var(--surface); color:var(--idea); } li.st.z-ideas > .row .ttl .no{ color:var(--idea); }
li.st.z-later > .row{ background:var(--later-soft); border:1.5px dotted var(--later); }
li.st.z-later > .row .ico{ background:var(--surface); color:var(--later); } li.st.z-later > .row .ttl .no{ color:var(--later); }
li.st.z-history > .row{ background:var(--hist-soft); }
li.st.z-history > .row .ico{ background:var(--surface); color:var(--hist); } li.st.z-history > .row .ttl .no{ color:var(--hist); }
.rchip{ display:inline-flex; align-items:center; gap:5px; align-self:flex-start; max-width:100%; height:22px; margin-top:4px; padding:0 9px 0 7px; border-radius:11px; background:var(--surface); border:1.5px solid var(--c); font-size:11.5px; font-weight:600; color:var(--ink-2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rchip i{ flex:none; width:7px; height:7px; border-radius:50%; background:var(--c); }
.rdot{ flex:none; width:10px; height:10px; border-radius:50%; background:var(--c); }
.rdot.anc{ position:absolute; top:-3px; right:-3px; width:13px; height:13px; background:var(--surface); border:2.5px solid var(--c); }
.enter{ animation:pgin .2s ease-out; }
.enter.a-back{ animation-name:pgback; }
@keyframes pgin{ from{ opacity:0; transform:translateX(16px); } to{ opacity:1; transform:none; } }
@keyframes pgback{ from{ opacity:0; transform:translateX(-16px); } to{ opacity:1; transform:none; } }

/* ---------- Page de section ---------- */
.page{ max-width:680px; margin:0 auto; padding:0 16px calc(var(--bar-h) + 44px); }
@media (min-width:900px){ .page{ padding-bottom:48px; } }
.navrow{ position:sticky; top:0; z-index:6; display:flex; align-items:center; gap:2px; margin:0 -16px; padding:0 8px 0 4px; min-height:48px; background:var(--surface); border-bottom:1px solid var(--line); }
.page.z-ideas .navrow{ box-shadow:inset 0 3px 0 var(--idea); }
.page.z-later .navrow{ box-shadow:inset 0 3px 0 var(--later); }
.page.z-history .navrow{ box-shadow:inset 0 3px 0 var(--hist); }
@media (min-width:900px){ .navrow:not(:has(.crumbs)){ display:none; } }
.back{ flex:none; display:inline-flex; align-items:center; gap:2px; min-height:44px; padding:0 10px 0 4px; border:0; background:none; color:var(--garonne); font-weight:600; font-size:15px; touch-action:manipulation; }
.back svg{ width:20px; height:20px; }
.crumbs{ display:flex; align-items:center; flex:1; min-width:0; overflow-x:auto; white-space:nowrap; scrollbar-width:none; font-size:13px; color:var(--ink-2); -webkit-overflow-scrolling:touch; padding-left:14px; -webkit-mask-image:linear-gradient(to right, transparent 0, #000 14px); mask-image:linear-gradient(to right, transparent 0, #000 14px); }
.crumbs::-webkit-scrollbar{ display:none; }
.crumbs button{ flex:none; min-height:44px; padding:0 4px; border:0; background:none; color:var(--garonne); font-weight:500; }
.crumbs .sep{ flex:none; color:var(--ink-3); }
.crumbs .cur{ flex:none; padding:0 4px; font-weight:600; color:var(--ink); }
.head{ display:flex; align-items:center; gap:12px; margin-top:16px; }
.head .num{ flex:none; width:56px; height:56px; border-radius:18px; background:var(--brique-soft); color:var(--brique); display:grid; place-items:center; font-family:var(--cond); font-weight:700; font-size:24px; }
.head .num.long{ font-size:17px; }
.head .num svg{ width:28px; height:28px; }
.page.z-ideas .head .num{ background:var(--idea-soft); color:var(--idea); }
.page.z-later .head .num{ background:var(--later-soft); color:var(--later); }
.page.z-history .head .num{ background:var(--hist-soft); color:var(--hist); }
.head h1{ flex:1; min-width:0; margin:0; font-family:var(--cond); font-weight:700; font-size:clamp(26px, 7vw, 34px); line-height:1.08; letter-spacing:.01em; overflow-wrap:anywhere; }
.zone-badge{ display:inline-flex; align-items:center; gap:6px; margin-top:12px; font-size:13px; font-weight:600; padding:3px 11px; border-radius:14px; border:1.5px solid transparent; }
.zone-badge::before{ content:""; width:8px; height:8px; border-radius:50%; background:currentColor; }
.zb-ideas{ background:var(--idea-soft); color:var(--idea); border-style:dashed; border-color:var(--idea); }
.zb-later{ background:var(--later-soft); color:var(--later); border-style:dotted; border-color:var(--later); }
.zb-history{ background:var(--hist-soft); color:var(--hist); border-color:var(--hist); }
.zone-note{ margin:10px 0 0; padding:10px 12px; border-left:4px solid var(--lc); background:var(--surface); border-radius:0 12px 12px 0; font-size:14px; color:var(--ink-2); }
.acts{ display:flex; gap:10px; margin-top:16px; }
.acts .btn{ min-height:52px; }
.acts .btn.primary{ flex:1; }
.acts .btn:not(.primary){ flex:0 0 auto; min-width:116px; }
.lastedit{ display:flex; align-items:center; flex-wrap:wrap; gap:0 8px; margin-top:12px; font-size:13px; color:var(--ink-2); }
.lastedit .who{ display:inline-flex; align-items:center; gap:8px; padding:4px 12px 4px 4px; border-radius:18px; background:var(--surface); border:1.5px solid var(--line); }
.lastedit.recent .who{ border-color:var(--c); }
.lastedit.recent .who::after{ content:""; width:8px; height:8px; border-radius:50%; background:var(--c); }
.lastedit .av{ width:22px; height:22px; font-size:11px; }
.lastedit button{ min-height:44px; padding:0 6px; border:0; background:none; color:var(--garonne); font-size:13px; font-weight:600; }

.gdd{ margin-top:16px; font-size:16.5px; line-height:1.55; }
.gdd p{ margin:0 0 12px; }
.gdd p.ln{ padding:12px 14px; background:var(--surface); border:1px solid var(--line); border-radius:16px; box-shadow:var(--shadow); }
.gdd h4{ font-family:var(--cond); font-size:20px; margin:18px 0 8px; }
.gdd ul{ margin:0 0 14px; padding:0; list-style:none; background:var(--surface); border:1px solid var(--line); border-radius:16px; box-shadow:var(--shadow); overflow:hidden; }
.gdd li{ position:relative; padding:12px 14px 12px 38px; }
.gdd li::before{ content:""; position:absolute; left:15px; top:20px; width:8px; height:8px; border-radius:50%; border:2px solid var(--garonne); }
.gdd li.ln{ border-top:1px solid var(--line); }
.gdd ul > li:first-child{ border-top:0; }
.gdd li.nb{ padding:0; border-top:0; background:var(--garonne-soft); }
.gdd li.nb::before{ display:none; }
.editable .ln{ cursor:pointer; }
.editable .ln:active{ background:var(--garonne-soft); }
@media (hover:hover){ .editable .ln:hover{ background:var(--garonne-soft); } }
.ln.picked{ background:var(--garonne-soft); box-shadow:inset 4px 0 0 var(--garonne); }
.linebar{ display:flex; flex-wrap:wrap; gap:8px; margin:0; padding:8px 10px 10px; background:var(--garonne-soft); }
.gdd > .linebar{ margin:-8px 0 12px; border-radius:0 0 16px 16px; }
.linebar button{ display:inline-flex; flex:1 1 auto; justify-content:center; align-items:center; gap:6px; min-height:46px; border:1px solid var(--line); background:var(--surface); border-radius:12px; padding:0 14px; font-size:14px; font-weight:600; }
.linebar button svg{ width:16px; height:16px; }
.linebar .danger{ color:var(--del); }
.tablewrap{ overflow-x:auto; margin:0 0 14px; border:1px solid var(--line); border-radius:16px; background:var(--surface); box-shadow:var(--shadow); }
.gdd table{ border-collapse:collapse; width:100%; font-size:15px; }
@media (min-width:600px){ .gdd table{ min-width:420px; } .gdd td:first-child{ white-space:nowrap; } }
.gdd th{ text-align:left; font-family:var(--cond); font-weight:600; font-size:16px; background:var(--garonne-soft); padding:10px 12px; border-bottom:1px solid var(--line); }
.gdd td{ padding:10px 12px; border-bottom:1px solid var(--line); vertical-align:top; }
.gdd tr:last-child td{ border-bottom:0; }
.gdd td:first-child{ font-weight:600; width:40%; }
.page.z-ideas .gdd ul, .page.z-ideas .gdd p.ln, .page.z-ideas .tablewrap{ background:var(--idea-soft); border:1.5px dashed var(--idea); border-color:color-mix(in srgb, var(--idea) 55%, transparent); }
.page.z-ideas .gdd li.ln{ border-top:1px dashed color-mix(in srgb, var(--idea) 40%, transparent); }
.page.z-later .gdd ul, .page.z-later .gdd p.ln, .page.z-later .tablewrap{ background:var(--later-soft); border:1.5px dotted var(--later); border-color:color-mix(in srgb, var(--later) 60%, transparent); }
.page.z-later .gdd li.ln{ border-top:1px dotted color-mix(in srgb, var(--later) 45%, transparent); }
.page.z-history .gdd ul, .page.z-history .gdd p.ln, .page.z-history .tablewrap{ background:var(--hist-soft); }
.page.z-ideas .gdd li::before{ border-color:var(--idea); }
.page.z-later .gdd li::before{ border-color:var(--later); }
.page.z-history .gdd li::before{ border-color:var(--hist); }
.page.z-ideas .gdd li.nb, .page.z-later .gdd li.nb{ background:transparent; }
mark{ background:var(--idea-soft); color:inherit; border-radius:3px; box-shadow:0 0 0 2px var(--idea-soft); }
.empty-text{ color:var(--ink-3); font-style:italic; margin-top:20px; }

.subs{ margin-top:24px; }
.subs h3{ display:flex; align-items:center; gap:8px; margin:0 0 10px; font-family:var(--cond); font-weight:600; font-size:18px; color:var(--ink-2); }
.subcard{ display:flex; align-items:center; gap:12px; width:100%; min-height:72px; text-align:left; padding:10px 10px 10px 12px; margin-bottom:10px; background:var(--surface); border:1px solid var(--line); border-radius:16px; box-shadow:var(--shadow); touch-action:manipulation; }
.subcard:active{ background:var(--surface-2); transform:scale(.985); }
.subcard .ico{ width:42px; height:42px; border-radius:12px; background:var(--garonne-soft); color:var(--garonne); }
.subcard .ico svg{ width:23px; height:23px; }
.subcard .ttl{ font-family:var(--font); font-size:17px; font-weight:600; letter-spacing:0; }
.subcard .ttl .no{ color:var(--garonne); }
.page.z-ideas .subcard{ background:var(--idea-soft); border:1.5px dashed var(--idea); }
.page.z-later .subcard{ background:var(--later-soft); border:1.5px dotted var(--later); }
.page.z-history .subcard{ background:var(--hist-soft); }
.pager{ display:flex; gap:10px; margin-top:26px; }
.pager button{ flex:1; min-width:0; min-height:60px; text-align:left; border:1px solid var(--line); background:var(--surface); border-radius:16px; box-shadow:var(--shadow); padding:8px 14px; touch-action:manipulation; }
.pager button:active{ background:var(--surface-2); }
.pager button.nx{ text-align:right; }
.pager small{ display:block; color:var(--ink-2); font-size:12px; }
.pager span{ display:block; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.btn{ display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:52px; padding:0 18px; border-radius:14px; border:1px solid var(--line); background:var(--surface); font-weight:600; font-size:15.5px; touch-action:manipulation; }
.btn svg{ width:19px; height:19px; }
.btn:active{ filter:brightness(.94); }
.btn.primary{ background:var(--brique); border-color:var(--brique); color:var(--brique-ink); }
.btn.danger{ background:var(--del); border-color:var(--del); color:#fff; }
.btn.ghost{ background:transparent; }
.btn:disabled{ opacity:.5; cursor:default; }

/* ---------- Historique (timeline) ---------- */
.filters{ display:flex; gap:10px; flex-wrap:wrap; margin:14px 0 4px; }
.filters select{ flex:1; min-width:150px; height:50px; font-size:15px; padding:0 12px; border-radius:14px; border:1px solid var(--line); background:var(--surface); }
.day{ position:sticky; top:48px; z-index:4; margin:18px -16px 12px; padding:8px 16px; background:var(--bg); font-family:var(--cond); font-weight:600; font-size:15px; letter-spacing:.07em; text-transform:uppercase; color:var(--ink-2); }
.tl{ display:grid; grid-template-columns:48px minmax(0,1fr); column-gap:12px; }
.tl-t{ position:relative; padding:15px 14px 0 0; text-align:right; font-size:13px; font-weight:700; color:var(--ink-2); font-variant-numeric:tabular-nums; }
.tl-t::after{ content:""; position:absolute; top:0; bottom:-10px; right:0; width:2px; background:var(--line); }
.tl-t::before{ content:""; position:absolute; z-index:1; top:19px; right:-3px; width:8px; height:8px; border-radius:50%; background:var(--brique); }
.tl:last-child .tl-t::after{ bottom:auto; height:22px; }
.hcard{ border:1px solid var(--line); border-radius:16px; padding:12px 14px; margin-bottom:10px; background:var(--surface); box-shadow:var(--shadow); min-width:0; }
.hcard header{ display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; font-size:14.5px; }
.hcard header b{ font-weight:600; }
.hcard .act{ margin-left:auto; padding:2px 10px; border-radius:11px; background:var(--brique-soft); color:var(--brique); font-size:12.5px; font-weight:600; }
.hcard .where{ display:flex; align-items:center; justify-content:space-between; gap:8px; width:calc(100% + 16px); min-height:46px; margin:4px -8px 0; padding:4px 8px; border:0; border-radius:12px; background:none; text-align:left; font-size:16px; font-weight:600; color:var(--garonne); }
button.where:active{ background:var(--garonne-soft); }
.hcard .where svg{ flex:none; width:18px; height:18px; color:var(--ink-3); }
.hcard .where.gone{ color:var(--ink); }
.hcard .path{ display:block; font-size:12.5px; color:var(--ink-3); }
.tag{ display:inline-block; font-size:12px; font-weight:600; padding:1px 8px; border-radius:10px; background:var(--garonne-soft); color:var(--garonne); }
.hnote{ margin:8px 0 0; padding:8px 10px; font-size:14px; background:var(--surface-2); border-radius:10px; }
.hnote::before{ content:"Note : "; font-weight:600; }
.diff{ margin-top:10px; font-size:14.5px; line-height:1.45; }
.hunk{ border:1px solid var(--line); border-radius:12px; overflow:hidden; margin-bottom:8px; }
.hunk .lbl{ font-size:12px; font-weight:600; padding:6px 10px 0; color:var(--ink-2); }
.hunk .old{ background:var(--del-bg); padding-bottom:6px; }
.hunk .new{ background:var(--add-bg); padding-bottom:6px; }
.hunk .old .lbl{ color:var(--del); } .hunk .new .lbl{ color:var(--add); }
.hunk .old + .new .lbl::before{ content:"↓ "; }
.hunk .l{ padding:2px 10px; white-space:pre-wrap; overflow-wrap:anywhere; }
.hunk .ctx{ padding:6px 10px; color:var(--ink-3); white-space:pre-wrap; overflow-wrap:anywhere; font-size:13px; border-bottom:1px dashed var(--line); }
.hunk .old ins, .hunk .old del{ text-decoration:line-through; background:rgba(174,52,52,.2); border-radius:3px; }
.hunk .new ins{ text-decoration:none; background:rgba(35,119,74,.22); border-radius:3px; font-weight:600; }
@media (max-width:430px){ .filters select{ flex-basis:100%; } }
.hactions{ display:flex; gap:8px; margin-top:10px; flex-wrap:wrap; }
.hactions button{ min-height:46px; flex:1 1 auto; border:1px solid var(--line); background:var(--surface-2); border-radius:12px; padding:0 14px; font-size:14px; font-weight:600; }
.more{ display:flex; margin:16px auto; }
.muted{ color:var(--ink-2); font-size:14px; }

/* ---------- Feuilles / dialogues ---------- */
.scrim{ position:fixed; inset:0; z-index:40; background:var(--scrim); display:flex; align-items:flex-end; justify-content:center; animation:fade .15s ease; }
@keyframes fade{ from{ opacity:0; } }
.sheet{ width:100%; max-width:640px; max-height:92%; display:flex; flex-direction:column; background:var(--surface); border-radius:24px 24px 0 0; box-shadow:0 -8px 30px rgba(0,0,0,.18); animation:up .2s ease-out; padding-bottom:env(safe-area-inset-bottom,0px); }
.sheet.full{ height:92%; }
@keyframes up{ from{ transform:translateY(36px); opacity:.5; } }
@media (min-width:900px){ .scrim{ align-items:center; } .sheet{ border-radius:22px; } }
.grab{ flex:none; width:40px; height:5px; border-radius:3px; background:var(--line); margin:8px auto 0; }
.sheet-h{ display:flex; align-items:center; gap:8px; padding:6px 8px 6px 18px; }
.sheet-h h2{ flex:1; margin:0; font-family:var(--cond); font-weight:700; font-size:23px; line-height:1.15; overflow-wrap:anywhere; }
.txtbtn{ flex:none; min-height:44px; padding:0 14px; border:0; border-radius:12px; background:none; color:var(--garonne); font-size:15.5px; font-weight:600; touch-action:manipulation; }
.txtbtn:active{ background:var(--surface-2); }
.sheet-b{ flex:1; min-height:0; overflow-y:auto; padding:6px 18px 14px; }
.sheet-f{ display:flex; gap:10px; justify-content:flex-end; padding:12px 16px 14px; border-top:1px solid var(--line); }
.sheet-f .btn{ flex:1; min-height:54px; }
@media (min-width:600px){ .sheet-f .btn{ flex:none; min-width:140px; } }
.field{ margin:0 0 14px; }
.field label, .lab{ display:block; font-size:13.5px; font-weight:600; color:var(--ink-2); margin-bottom:6px; }
.field input[type=text], .field select, .field textarea{ width:100%; min-height:52px; border:1.5px solid var(--line); background:var(--surface-2); border-radius:14px; padding:12px 14px; font-size:16px; }
.field input:focus, .field select:focus, .field textarea:focus{ border-color:var(--garonne); outline:none; }
.field textarea{ min-height:240px; resize:vertical; line-height:1.5; }
.field textarea.short{ min-height:96px; }
.field .help{ font-size:13px; color:var(--ink-3); margin-top:6px; }
.secline{ display:flex; align-items:center; gap:10px; min-height:52px; padding:0 14px; border-radius:14px; background:var(--surface-2); border:1.5px solid var(--line); }
.secline svg{ flex:none; width:22px; height:22px; color:var(--brique); }
.secline b{ font-weight:600; overflow-wrap:anywhere; }
.who-box{ display:flex; flex-direction:column; padding:14px 14px 2px; border-radius:16px; background:var(--surface-2); border:1px solid var(--line); margin:0 0 14px; }
.who-box .field{ margin:0 0 12px; }
.who-box select, .who-box input{ background:var(--surface) !important; }
.menu-list{ list-style:none; margin:0; padding:0 0 8px; }
.menu-list button{ display:flex; align-items:center; gap:12px; width:100%; min-height:56px; text-align:left; border:0; background:none; padding:10px 8px; border-radius:14px; font-size:16px; font-weight:500; touch-action:manipulation; }
.menu-list button:active{ background:var(--surface-2); }
@media (hover:hover){ .menu-list button:hover{ background:var(--surface-2); } }
.menu-list button svg{ width:22px; height:22px; color:var(--ink-2); flex:none; }
.menu-list .danger, .menu-list .danger svg{ color:var(--del); }
.menu-list small{ display:block; font-size:13px; color:var(--ink-3); font-weight:400; }
.pick{ list-style:none; margin:0; padding:0; }
.pick button{ display:block; width:100%; min-height:48px; text-align:left; border:0; background:none; border-radius:12px; padding:12px 10px; font-size:15.5px; }
.pick button:active{ background:var(--surface-2); }
.pick button.on{ background:var(--garonne-soft); font-weight:600; }
.pick button:disabled{ color:var(--ink-3); }
.radio{ display:flex; align-items:center; gap:12px; width:100%; min-height:60px; padding:8px 14px; margin-bottom:10px; border:1.5px solid var(--line); border-radius:16px; background:var(--surface); text-align:left; font-size:16.5px; font-weight:600; touch-action:manipulation; }
.radio .dotr{ flex:none; display:grid; place-items:center; width:24px; height:24px; border-radius:50%; border:2px solid var(--ink-3); }
.radio.on{ border-color:var(--brique); background:var(--brique-soft); }
.radio.on .dotr{ border-color:var(--brique); }
.radio.on .dotr::after{ content:""; width:12px; height:12px; border-radius:50%; background:var(--brique); }
.radio .av{ width:30px; height:30px; font-size:14px; }
.radio .rn{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; }
.radio.add{ border-style:dashed; color:var(--garonne); }
.radio .plusic{ flex:none; display:grid; place-items:center; width:24px; height:24px; }
.radio .plusic svg{ width:22px; height:22px; }
.person{ display:flex; align-items:center; gap:10px; padding:10px 0; border-bottom:1px solid var(--line); }
.person input{ flex:1; min-width:0; min-height:48px; border:1.5px solid var(--line); background:var(--surface-2); border-radius:12px; padding:8px 12px; font-size:16px; }
.person .mini{ min-height:48px; border:1px solid var(--line); background:var(--surface); border-radius:12px; padding:0 14px; font-size:14px; font-weight:600; }
.person .mini.danger{ color:var(--del); }
.preview-diff{ margin:4px 0 16px; }
.seg{ display:flex; gap:8px; }
.seg button{ flex:1; min-height:48px; border:1.5px solid var(--line); background:var(--surface-2); border-radius:12px; padding:9px; font-weight:600; }
.seg button.on{ background:var(--garonne); border-color:var(--garonne); color:#fff; }
[data-theme="dark"] .seg button.on{ color:#0F1416; }
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) .seg button.on{ color:#0F1416; } }

/* recherche */
.sheet.search{ background:var(--bg); }
.search-in{ display:flex; align-items:center; gap:2px; padding:8px 6px 8px 12px; background:var(--surface); border-bottom:1px solid var(--line); }
.search-field{ position:relative; flex:1; display:flex; align-items:center; min-width:0; }
.search-field svg{ position:absolute; left:14px; width:20px; height:20px; color:var(--ink-3); pointer-events:none; }
.search-in input{ width:100%; height:52px; border:1.5px solid var(--line); background:var(--surface-2); border-radius:16px; padding:0 12px 0 44px; font-size:17px; }
.search-in input:focus{ border-color:var(--garonne); outline:none; }
.scount{ padding:12px 18px 6px; font-size:13.5px; font-weight:600; color:var(--ink-2); min-height:34px; }
.sres{ list-style:none; margin:0; padding:2px 12px 28px; display:flex; flex-direction:column; gap:10px; }
.sres button{ display:flex; align-items:flex-start; gap:12px; width:100%; min-height:76px; text-align:left; padding:12px; background:var(--surface); border:1px solid var(--line); border-radius:16px; box-shadow:var(--shadow); touch-action:manipulation; }
.sres button:active{ background:var(--surface-2); }
.sres .ico{ width:40px; height:40px; border-radius:12px; margin-top:2px; background:var(--garonne-soft); color:var(--garonne); }
.sres .ico svg{ width:22px; height:22px; }
.sres .rb{ flex:1; min-width:0; display:flex; flex-direction:column; gap:1px; }
.sres .go{ margin-top:12px; }
.sres .p{ font-size:12px; color:var(--garonne); font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sres .t{ font-size:16.5px; font-weight:600; line-height:1.3; }
.sres .x{ display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; font-size:14px; line-height:1.4; color:var(--ink-2); margin-top:2px; }
li.muted{ list-style:none; }

.toast{ position:fixed; left:50%; bottom:calc(var(--bar-h) + 14px + env(safe-area-inset-bottom,0px)); transform:translateX(-50%); z-index:60; background:var(--ink); color:var(--surface); padding:10px 16px; border-radius:12px; font-size:14px; font-weight:500; box-shadow:var(--shadow); max-width:90%; animation:up .2s ease; }
.state{ padding:60px 24px; text-align:center; color:var(--ink-2); max-width:460px; margin:0 auto; }
.state b{ display:block; color:var(--ink); font-family:var(--cond); font-size:22px; margin-bottom:6px; }
.skel{ height:44px; margin:6px 8px; border-radius:12px; background:linear-gradient(90deg, var(--surface-2), var(--surface), var(--surface-2)); background-size:200% 100%; animation:sk 1.2s infinite linear; }
@keyframes sk{ to{ background-position:-200% 0; } }

/* ---- Hébergement : portail de connexion et import de fichier ---- */
.gate{ position:fixed; inset:0; z-index:300; display:flex; align-items:center; justify-content:center; padding:20px; background:var(--bg); }
.gate-card{ width:100%; max-width:380px; background:var(--surface); border:1px solid var(--line); border-radius:20px; padding:26px 22px 22px; box-shadow:0 10px 40px rgba(0,0,0,.12); }
.gate-card h1{ margin:12px 0 4px; font-family:var(--cond); font-weight:700; font-size:28px; letter-spacing:.04em; line-height:1.05; }
.gate-card p{ margin:0 0 18px; color:var(--ink-2); font-size:15px; }
.gate-card label{ display:block; font-size:13px; font-weight:600; color:var(--ink-2); margin-bottom:6px; }
.gate-card input{ width:100%; min-height:50px; padding:0 14px; font:inherit; font-size:17px; color:var(--ink); background:var(--surface-2); border:1.5px solid var(--line); border-radius:12px; }
.gate-card input:focus{ outline:2px solid var(--garonne); outline-offset:1px; }
.gate-card .btn{ width:100%; margin-top:14px; }
.gate-err{ min-height:20px; margin-top:8px; font-size:14px; color:var(--brique); }
.gate-mark{ width:44px; height:44px; border-radius:12px; background:var(--hero); }
.pickbox{ max-height:34vh; overflow:auto; border:1.5px solid var(--line); border-radius:12px; padding:4px; background:var(--surface-2); }
.import-prev{ max-height:32vh; overflow:auto; border:1.5px solid var(--line); border-radius:12px; padding:10px 12px; background:var(--surface); font-size:14.5px; }
.mdtree{ list-style:none; margin:0; padding:0; }
.mdtree li{ display:flex; align-items:center; gap:8px; padding:3px 0; line-height:1.3; }
.mdtree svg{ flex:none; width:16px; height:16px; color:var(--ink-3); }
.warnbox{ margin:0 0 12px; padding:10px 12px; border-radius:12px; background:var(--brique-soft); color:var(--ink); font-size:14px; }
.chk{ display:flex; gap:10px; align-items:flex-start; margin:0 0 14px; font-size:14.5px; }
.chk input{ margin-top:3px; width:20px; height:20px; flex:none; }
