
/* 05.10g — Reprise de la sélection SourceMP : ivoire sur brun translucide.
   Cette apparence ne modifie pas la couleur des caractères enregistrés. */
::selection {
  color: #fdfcfa;
  background-color: rgba(133, 105, 77, 0.82);
}
::-moz-selection {
  color: #fdfcfa;
  background-color: rgba(133, 105, 77, 0.82);
}
/*
 * Styles par couches historiques : base, étape 02 (Suivi), étape 03 (identité),
 * puis étape 04 (livre unique). Des sélecteurs sont volontairement surchargés.
 * Pour une reprise, identifier la dernière règle effective avant de déplacer un élément.
 * Ne pas nettoyer la cascade CSS sans comparaison visuelle accueil/projet/mobile.
 */
/* Ecriture 100 % locale : utilise Special Elite si deja installee sur Windows,
   sinon Courier New. Aucun service de police externe, aucun fichier de police distribue. */
@font-face{font-family:"Carnet Special Elite Local";src:local("Special Elite"),local("SpecialElite-Regular");font-display:swap}
:root{--author-writing:"Carnet Special Elite Local","Courier New",monospace}
:root{--warm:#f8f4ed;--ivory:#fdfcfa;--paper:#f3ede3;--border:#ddd3c4;--sep:#e8dfd2;--ink:#514a43;--muted:#897c6d;--choco:#6b5045;--sauge:#9b9e7e;--forest:#435442;--gold:#b8a386;--danger:#963f35;--shadow:0 12px 38px rgba(76,67,55,.09);--serif:Georgia,'Times New Roman',serif;--sans:'Segoe UI',Arial,sans-serif}
*{box-sizing:border-box}html,body{margin:0;height:100%;font-family:var(--sans);color:var(--ink);background:#ebe6df}button,input,textarea,select{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid #9d8a71;outline-offset:2px}button:disabled{opacity:.45;cursor:not-allowed}input,select,textarea{color:var(--ink)}.hidden{display:none!important}.muted{color:var(--muted)}.eyebrow,.section-kicker,.welcome-meta,.tiny-version,.tiny-label,.settings-label,.editor-type{font:700 10px/1.4 var(--sans);letter-spacing:.16em;color:#9b886f}.app-shell{display:grid;grid-template-columns:264px 1fr;height:100vh;overflow:hidden}
.sidebar{display:flex;flex-direction:column;min-height:0;background:linear-gradient(145deg,#eee8df,#e6dfd5);border-right:1px solid #d5cbbd;padding:27px 19px 17px;position:relative;z-index:9}.brand{display:flex;align-items:center;gap:13px;margin:0 5px 38px}.brand-mark{border:1px solid #c7b79f;width:43px;height:43px;display:flex;align-items:center;justify-content:center;border-radius:6px;transform:rotate(-3deg);font:25px var(--serif);color:var(--choco);background:rgba(255,255,255,.4)}.brand-star{font-size:11px;align-self:start;padding-top:7px;color:#ad9570}.brand-title{font:21px var(--serif);letter-spacing:-.02em;padding-top:3px}.sidebar-top{display:flex;justify-content:space-between;align-items:center;padding:0 8px 9px;border-bottom:1px solid #d7cfc2}.mini-action,.icon-button{background:transparent;border:1px solid #d2c5b4;color:#786857;border-radius:7px;min-width:25px;min-height:25px;font-size:18px;line-height:1}.project-nav{padding-top:12px;display:flex;flex-direction:column;gap:5px;overflow-y:auto;min-height:60px}.project-link{border:1px solid transparent;border-radius:7px;background:none;color:#51493e;text-align:left;display:flex;align-items:center;gap:11px;padding:12px 10px;min-width:0;font-size:13px;font-weight:600}.project-link:hover{background:#f7f3ec99}.project-link.active{background:#fcfaf5b8;border-color:#d4c7b2;box-shadow:0 2px 8px #7a6b5512}.project-link .project-index{font-size:10px;color:#9d8c76;font-family:var(--serif);font-weight:700}.project-link .project-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sidebar-foot{margin-top:auto;padding:13px 6px 0}.sidebar-object{width:82px;height:66px;object-fit:contain;object-position:left bottom;image-rendering:auto;filter:drop-shadow(0 3px 4px #554f4830)}.sidebar-foot p{font-size:11px;line-height:1.6;color:#82776b;max-width:200px}.subtle-button{background:none;border:0;padding:13px 0;color:#736656;font-size:12px;border-bottom:1px solid #cdc2b4;text-align:left;width:100%;display:flex;justify-content:space-between}.tiny-version{margin-top:17px;font-size:9px}
.main-area{min-width:0;background:radial-gradient(ellipse at 72% 10%,#f4f1eb 0%,#eeebe5 52%,#e7e1d8 100%);display:flex;flex-direction:column}.topbar{height:72px;min-height:72px;display:flex;align-items:center;justify-content:space-between;gap:20px;border-bottom:1px solid #e0d7c9;padding:0 39px;background:rgba(255,255,255,.27);backdrop-filter:blur(18px)}.breadcrumb{font-size:12px;color:#8c7d6b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.top-right{display:flex;align-items:center;gap:11px}.save-status{font-size:11px;color:#638066;white-space:nowrap}.save-status.dirty{color:#aa794d}.save-status.error{color:var(--danger)}.topbtn,.outline-btn,.primary-btn,.text-button{border:1px solid #cfc1af;border-radius:7px;padding:10px 14px;font-size:12px;background:rgba(255,255,255,.46);color:var(--ink);transition:background .12s ease}.topbtn:hover,.outline-btn:hover{background:white}.primary-btn{background:#5a584e;color:#fff;border-color:#5a584e;font-weight:600}.primary-btn:hover{background:#393f38}.primary-btn span{margin-left:20px}.text-button{border:0;background:transparent;color:#837460;padding:8px}.text-button:hover{text-decoration:underline}.danger{color:var(--danger)}.content-scroll{overflow-y:auto;overflow-x:hidden;min-height:0;flex:1;padding:37px clamp(22px,5vw,68px) 95px}.welcome-screen,.workspace-screen,.search-screen,.trash-screen{max-width:1260px;margin:0 auto}.welcome-meta{margin:6px 0 21px}.welcome-head{display:flex;justify-content:space-between;gap:22px;align-items:center}.welcome-head h1,.workspace-heading h1,.search-screen h1,.trash-screen h1{font:normal clamp(34px,3.6vw,60px)/1.12 var(--serif);letter-spacing:-.036em;margin:0 0 21px}.welcome-head h1 em{color:#8c8e73;font-weight:normal}.welcome-head p{color:#8b8176;line-height:1.75;max-width:560px;font-size:14px;margin:0}.welcome-head img{max-width:148px;max-height:176px;object-fit:contain;margin-right:25px;filter:drop-shadow(0 12px 8px #6359472c)}.home-actions{display:flex;gap:11px;margin:30px 0 33px}.home-line{height:1px;background:#d7cfc4;margin:30px 0 26px}.section-row{display:flex;justify-content:space-between;align-items:baseline;gap:15px}.section-row h2{font:normal 24px var(--serif);margin:0 0 18px}.section-row .muted{font-size:12px}.project-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:18px}.project-card{min-height:235px;border:1px solid #dcd1c2;background:rgba(255,253,248,.71);box-shadow:var(--shadow);border-radius:12px;padding:21px 22px;display:flex;flex-direction:column;text-align:left;position:relative;overflow:hidden}.project-card:hover{border-color:#b4a588;transform:translateY(-2px)}.project-card .card-index{font:12px var(--serif);color:#a59176}.project-card img{height:65px;width:83px;object-fit:contain;align-self:flex-end;margin-top:-20px}.project-card h3{font:normal 24px var(--serif);margin:12px 0 8px}.project-card p{font-size:12px;color:#8b8074;line-height:1.65;flex:1;margin:0 0 10px}.card-tail{border-top:1px solid #e8dfd5;padding-top:11px;display:flex;align-items:center;justify-content:space-between;color:#8e806e;font-size:11px}.home-note{display:flex;gap:25px;align-items:center;margin-top:32px;background:#ebe5dba1;border-left:2px solid #acaa86;padding:10px 24px}.home-note img{width:62px;height:62px;object-fit:contain}.home-note strong{font:16px var(--serif)}.home-note p{font-size:12px;line-height:1.5;color:#84786c;margin:5px 0}
.workspace-heading{display:flex;align-items:center;justify-content:space-between;min-height:142px}.workspace-heading h1{font-size:clamp(32px,3.1vw,49px);margin:7px 0 10px}.workspace-intro{color:#8b8074;line-height:1.6;font-size:13px;max-width:680px;margin:0}.workspace-art img{width:125px;height:110px;object-fit:contain;filter:drop-shadow(0 9px 8px #61574128)}.toolbar{display:flex;justify-content:space-between;gap:12px;align-items:center;margin:17px 0 20px}.toolbar-primary,.toolbar-aux{display:flex;gap:10px;align-items:center}.toolbar-aux{min-width:0}.tiny-label{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:220px;font-size:9px}.workspace-grid{display:grid;grid-template-columns:minmax(240px,34%) minmax(340px,1fr);gap:20px;align-items:start}.tree-panel,.editor-panel{background:rgba(251,249,244,.75);border:1px solid #dfd5c9;border-radius:11px;box-shadow:var(--shadow);min-width:0;overflow:hidden}.tree-panel{max-height:calc(100vh - 310px);min-height:430px;overflow-y:auto;padding:14px 10px}.tree-panel-head{display:flex;justify-content:space-between;padding:6px 10px 14px;color:#6d6151;font-size:12px;position:sticky;top:-14px;background:#faf7f2ed;z-index:2}.tree-node{display:flex;align-items:center;gap:4px;margin:2px 0;min-width:0}.tree-node button{min-width:0}.tree-expander{flex:0 0 19px;border:0;background:none;color:#948575;font-size:12px;padding:5px 2px}.tree-entry{flex:1;border:1px solid transparent;background:none;min-width:0;padding:9px 8px;border-radius:5px;text-align:left;font-size:12px;color:#756858;display:flex;align-items:center;gap:8px}.tree-entry:hover{background:#f0e9dd}.tree-entry.current{background:#e7e6d8;border-color:#d4d2b7;color:#414a39;font-weight:600}.tree-kind{color:#a18c6f;font-size:11px;flex-shrink:0}.tree-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tree-add{border:0;background:none;color:#b0a08c;padding:7px;opacity:0}.tree-node:hover .tree-add{opacity:1}.editor-panel{min-height:480px}.empty-editor{text-align:center;padding:85px 25px}.empty-editor img{height:85px;max-width:110px;object-fit:contain}.empty-editor h3{font:22px var(--serif);margin:18px 0 6px}.empty-editor p{font-size:12px;color:#9c8f80;max-width:250px;margin:0 auto;line-height:1.5}.editor{padding:26px 29px 22px}.editor-top{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-bottom:23px}.editor-actions{display:flex;gap:2px}.editor-type{color:#8b967e}.field-label{display:flex;flex-direction:column;gap:7px;font:700 10px/1.4 var(--sans);letter-spacing:.085em;color:#918576;margin:0 0 17px}.field-label input,.field-label select,.notes-field{border:1px solid #ded2c3;background:#fdfcf9;border-radius:6px;width:100%;padding:10px 12px;font:12px var(--sans);letter-spacing:normal}.title-field{width:100%;background:none;border:0;border-bottom:1px solid #ded2c3;border-radius:0;font:26px var(--serif);padding:7px 0 11px;outline-offset:-3px;margin-top:0}.meta-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}.notes-field{min-height:285px;resize:vertical;font:14px/1.7 var(--sans);margin-bottom:2px}.editor-bottom{display:flex;justify-content:space-between;align-items:center;gap:10px;border-top:1px solid #e7dbcc;padding-top:16px}.editor-bottom .muted{font-size:11px}.search-results{display:grid;gap:9px}.result{border:1px solid #ddd2c5;border-radius:8px;background:#fcfaf6b8;padding:16px 19px;text-align:left}.result:hover{background:#fff}.result h3{font:18px var(--serif);margin:0 0 6px}.result p{font-size:12px;color:#877b6d;line-height:1.55;margin:0 0 7px}.result small{color:#a28b70}.search-screen>p,.trash-screen>p{color:#887d6f;font-size:13px}.trash-item{display:flex;justify-content:space-between;align-items:center;border:1px solid #ddd2c3;padding:12px 16px;margin:10px 0;background:#fffcf7;border-radius:8px}.trash-item strong{font-weight:600;font-size:13px}.trash-item small{display:block;color:#948879;margin-top:5px}
.search-dock{position:fixed;bottom:21px;left:calc(50% + 120px);transform:translateX(-50%);width:min(500px,calc(100vw - 310px));background:#fffcf9ee;border:1px solid #cfc2b3;box-shadow:0 10px 40px #766b5b29;border-radius:10px;display:flex;align-items:center;gap:10px;padding:10px 16px;z-index:12;backdrop-filter:blur(12px)}.search-icon{font-size:23px;color:#938066}.search-dock input{background:none;border:0;outline:none!important;flex:1;min-width:0;font-size:12px}.search-dock kbd{color:#ad9c87;border:1px solid #e1d8ca;padding:3px 5px;border-radius:4px;font-size:9px}
dialog{border:1px solid #cfc3b1;border-radius:11px;box-shadow:0 19px 90px #3830274b;background:#fbf8f2;color:var(--ink);width:min(520px,calc(100vw - 28px));padding:24px}dialog::backdrop{background:#342f29a8;backdrop-filter:blur(3px)}dialog h2{font:26px var(--serif);margin:5px 0 15px}dialog p{font-size:13px;line-height:1.7;color:#766c62}.dialog-buttons{display:flex;justify-content:flex-end;gap:9px;margin-top:18px}.settings-dialog{width:min(670px,calc(100vw - 25px))}.settings-header{display:flex;justify-content:space-between}.settings-header h2{margin:6px 0}.settings-header button{align-self:start;border:0;background:none;font-size:24px;color:#867561}.settings-actions{display:flex;gap:10px;flex-wrap:wrap;margin:22px 0}.settings-warning{color:#9d7a58;font-size:11px!important}.settings-label{margin:24px 0 9px}.backups-list{max-height:230px;overflow:auto}.backup-row{display:flex;align-items:center;justify-content:space-between;gap:9px;border-top:1px solid #eadfce;padding:12px 4px;font-size:12px}.backup-row button{font-size:11px;border:1px solid #d2c6b4;border-radius:5px;padding:6px 9px;background:#fff}.mobile-menu,.mobile-brand{display:none}
@media(max-width:1100px){.workspace-grid{grid-template-columns:minmax(200px,36%) minmax(300px,1fr)}.content-scroll{padding-inline:29px}.topbar{padding-inline:22px}.workspace-art img{width:90px}}
@media(max-width:780px){.app-shell{grid-template-columns:1fr}.sidebar{position:fixed;left:0;top:0;bottom:0;width:280px;transform:translateX(-101%);transition:transform .2s;box-shadow:12px 0 30px #40382a19}.sidebar.open{transform:translateX(0)}.topbar{gap:12px;padding:0 17px;height:65px;min-height:65px}.mobile-menu{display:block;order:-2;background:none;border:none;font-size:23px;color:#756959;padding:4px}.mobile-brand{display:block;font:10px var(--serif);letter-spacing:.06em;white-space:nowrap}.mobile-brand span{font-size:9px;color:#9a8671}.breadcrumb{display:none}.topbtn{padding:8px;font-size:11px}.save-status{font-size:10px}.content-scroll{padding:25px 15px 90px}.welcome-head img{height:102px;width:88px;margin:0}.welcome-head h1{font-size:35px}.welcome-head p{font-size:12px}.workspace-grid{grid-template-columns:1fr}.tree-panel{min-height:130px;max-height:270px}.editor{padding:20px}.workspace-art{display:none}.toolbar{flex-wrap:wrap}.toolbar-aux{width:100%;justify-content:space-between}.search-dock{left:50%;width:calc(100vw - 28px);bottom:12px}.project-cards{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}.editor-top{align-items:flex-start;flex-wrap:wrap}.meta-grid{grid-template-columns:1fr 1fr}}
@media(max-width:430px){.top-right{gap:4px}.topbtn{font-size:10px}.save-status{max-width:76px;white-space:normal}.home-actions{flex-wrap:wrap}.welcome-head{align-items:flex-start}.welcome-head img{width:63px;max-height:83px}.welcome-head h1{font-size:30px}.meta-grid{grid-template-columns:1fr}}

/* ÉTAPE 02 : suivi non destructif et bibliothèque de sources. */
.topbtn.current{background:#e4e8d9;border-color:#9da78e;color:#344535}
.followup-panel{border:1px solid #d0d7c7;border-radius:12px;background:rgba(247,249,242,.78);padding:19px 22px;margin:10px 0 22px;box-shadow:var(--shadow)}
.followup-head{display:flex;justify-content:space-between;gap:22px;align-items:flex-start}
.followup-head h2{font:normal 26px var(--serif);margin:3px 0 5px;color:#526149}
.followup-head p{font-size:12px;line-height:1.55;color:#7d8878;margin:0}
.followup-head label{font-size:11px;color:#68725c;flex:0 0 auto}
.followup-head select{display:block;margin-top:6px;background:#f8faf6;border:1px solid #c4ccbd;border-radius:6px;padding:8px 9px;max-width:250px}
.followup-summary{font-size:10px;color:#71816e;letter-spacing:.05em;margin:16px 0 8px}
.followup-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:9px;max-height:330px;overflow:auto;padding-right:5px}
.followup-card{border:1px solid #dadfcf;border-radius:8px;background:#fffcf8e8;padding:12px 14px;text-align:left;display:flex;flex-direction:column;gap:5px;min-width:0;transition:background .12s ease}
.followup-card:hover{background:white;border-color:#a7b39b}
.followup-card strong{font-size:13px;color:#515c49;font-weight:600}
.followup-card small{font-size:10px;color:#8d937f}
.followup-card span{font-size:11px;line-height:1.5;color:#857b70;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.source-reference{border-top:1px solid #e1d8cb;padding:8px 0 18px;margin:4px 0 6px}
.source-reference a,.source-docs a{color:#486a51;text-decoration:underline;text-underline-offset:3px;font-size:12px}
.source-docs{display:flex;flex-direction:column;align-items:flex-start;gap:9px;padding:6px 0 16px}
@media(max-width:780px){.followup-head{flex-direction:column}.followup-head label,.followup-head select{width:100%;max-width:none}.followup-list{grid-template-columns:1fr}.topbar .top-right{gap:4px}.topbar .topbtn{padding:7px 6px}}

.global-nav{display:flex;flex-direction:column;gap:3px;margin-top:14px;border-top:1px solid #d7cfc2;padding-top:13px}
.sidebar-global-title{padding:2px 8px 9px;font-size:9px;letter-spacing:.13em;color:#958674;font-weight:700}
.global-nav .project-link{font-size:11px;padding:9px 8px}
@media(max-width:430px){
 .mobile-brand{display:none}
 .top-right{margin-left:auto;gap:4px}
 .topbar .topbtn{font-size:0;padding:7px 8px;min-width:34px;min-height:34px}
 #followup-btn::after{content:'⌁';font-size:19px}
 .save-status{font-size:10px;max-width:none;white-space:nowrap}
}


/* ÉTAPE 03 • Hybridation : livre ouvert / matières MIRPÂL, non reproduction du jeu de référence. */
:root{
 --paper:#f4efe5;--ink:#524b45;--muted:#86796c;--border:#d8cbb9;
 --book-edge:#4e5c43;--binding:#ad665c;--leaf:#f7f2e9;--pixel-gold:#ab9367;
}
body{background:#c7c5bf}
.app-shell{grid-template-columns:minmax(0,1fr) 258px;grid-template-areas:"main rail"}
.main-area{grid-area:main;background:radial-gradient(ellipse at 40% 0%,rgba(250,248,245,.94),rgba(216,215,205,.88) 62%,#bbbdb1 120%);position:relative;min-width:0}
.main-area::before{content:"";position:absolute;inset:0;pointer-events:none;opacity:.22;background:repeating-linear-gradient(90deg,transparent 0 112px,rgba(85,91,76,.03) 113px 114px)}
.sidebar{grid-area:rail;z-index:9;border:0;border-left:1px solid rgba(80,74,63,.34);background:linear-gradient(138deg,rgba(232,226,216,.96),rgba(198,194,182,.94));box-shadow:-9px 0 27px rgba(59,55,48,.1);padding:20px 14px 15px}
.sidebar .brand{margin:3px 3px 24px}.sidebar .brand-mark{background:#f6f1e8;box-shadow:2px 2px 0 rgba(87,79,66,.15)}
.sidebar-top{border-bottom:2px solid #b8a995}.project-nav{gap:7px;padding-top:14px;max-height:48vh}
.project-link{background:linear-gradient(90deg,rgba(249,246,240,.64),rgba(238,231,219,.35));border:1px solid rgba(177,158,133,.5);border-left:4px solid #8c9a7a;border-radius:3px 8px 8px 3px;box-shadow:0 3px 0 rgba(88,73,58,.06);padding:11px 9px}
.project-link:nth-child(2){border-left-color:#bd7e6f}.project-link:nth-child(3){border-left-color:#c6ab77}.project-link:nth-child(4){border-left-color:#87828a}.project-link.active{background:linear-gradient(90deg,#fffaf0,#e4e6d8);border-color:#a6aa8c;border-left-color:#55634a;box-shadow:0 2px 7px rgba(66,75,62,.12)}
.sidebar-foot{border-top:1px solid rgba(108,95,79,.22)}.sidebar-object{width:61px;height:58px}
.topbar{background:rgba(244,242,235,.61);border-bottom:1px solid rgba(113,113,99,.19);height:62px;min-height:62px;padding-inline:clamp(18px,3vw,43px);backdrop-filter:blur(14px)}
.content-scroll{padding:12px clamp(15px,3vw,40px) 95px}
.bookmark-tabs{display:flex;position:relative;z-index:1;padding:16px clamp(15px,3vw,40px) 0;gap:6px;overflow-x:auto;scrollbar-width:thin}
.bookmark-tab{border:1px solid #b8a98f;border-bottom:0;border-radius:9px 9px 0 0;white-space:nowrap;padding:10px 20px 8px;color:#64594e;background:rgba(239,228,207,.92);font:600 12px var(--sans);position:relative;min-height:37px;box-shadow:0 -2px 4px rgba(67,65,53,.04)}
.bookmark-tab:nth-child(2){background:#d9e0d1}.bookmark-tab:nth-child(3){background:#e6d2c5}.bookmark-tab:nth-child(4){background:#e4d9b9}
.bookmark-tab:hover{filter:brightness(1.035)}.bookmark-tab.current{transform:translateY(-3px);border-color:#78806e;color:#414c3c;box-shadow:inset 0 3px 0 #667659;font-weight:700}
.welcome-screen,.workspace-screen,.search-screen,.trash-screen{max-width:1300px;margin:0 auto}
.book-frame{border:8px solid var(--book-edge);border-radius:22px 17px 17px 20px;background:#c6b9a5;position:relative;box-shadow:0 23px 50px rgba(63,58,47,.19),0 4px 0 rgba(61,70,51,.35);isolation:isolate}
.book-frame::before{content:"";position:absolute;left:50%;top:0;bottom:0;width:13px;transform:translateX(-50%);background:linear-gradient(90deg,rgba(70,54,44,.12),rgba(84,63,46,.34) 42%,rgba(255,251,242,.28));z-index:3;pointer-events:none}
.book-frame::after{content:"";position:absolute;top:-8px;left:calc(50% - 7px);width:14px;height:94px;background:linear-gradient(90deg,#9c4e50,#cb7770 44%,#9d4a46);box-shadow:3px 5px 5px #5b41483b;z-index:4;pointer-events:none;border-radius:0 0 4px 4px}
.welcome-book{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);min-height:710px;align-items:stretch}
.book-leaf{position:relative;min-width:0;padding:clamp(23px,3vw,45px);background:radial-gradient(ellipse at 30% 16%,rgba(255,254,251,.6),transparent 66%),linear-gradient(107deg,#f0eadf,#f9f6ee 36%,#f1eadf 95%)}
.book-leaf-left{border-radius:11px 0 0 11px;box-shadow:inset -16px 0 18px rgba(99,80,60,.075)}
.book-leaf-right{border-radius:0 11px 11px 0;box-shadow:inset 14px 0 16px rgba(99,80,60,.075);padding-top:48px}
.welcome-meta{color:#a58a70;margin:0 0 29px;letter-spacing:.2em}
.welcome-head{flex-direction:column;align-items:flex-start;gap:15px}.welcome-head h1{font-size:clamp(30px,3.1vw,53px);line-height:1.14}.welcome-head p{font-size:13px;line-height:1.75}.welcome-head img{align-self:flex-end;max-height:105px;max-width:100px;margin:-5px 0 0}
.home-actions{flex-wrap:wrap;margin:25px 0 22px}.home-line{display:none}.home-note{background:rgba(224,220,203,.38);margin-top:38px;padding:12px 14px;border-left:3px solid #a7aa8e;gap:11px}.home-note img{width:51px;height:51px}
.book-leaf .project-cards{display:flex;flex-direction:column;gap:9px}.book-leaf .project-card{min-height:0;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"index art" "title art" "desc art" "tail tail";padding:11px 16px;background:rgba(255,255,251,.39);box-shadow:none;border:1px solid rgba(154,143,124,.32);border-radius:4px 9px 9px 5px;transform:none}
.book-leaf .project-card:hover{background:rgba(255,255,252,.8);border-color:#a9a38b}
.book-leaf .project-card .card-index{grid-area:index;font-size:9px}.book-leaf .project-card img{grid-area:art;margin:0;width:57px;height:55px;align-self:center}.book-leaf .project-card h3{grid-area:title;font-size:20px;margin:3px 0 2px}.book-leaf .project-card p{grid-area:desc;font-size:11px;line-height:1.3;margin:2px 0 6px;max-height:30px;overflow:hidden}.book-leaf .project-card .card-tail{grid-area:tail;padding-top:5px;font-size:10px}
.book-leaf .section-row h2{font:normal 29px var(--serif);color:#665a4c}
.workspace-heading{min-height:103px;padding:10px 17px 3px}.workspace-heading h1{font-size:clamp(29px,3vw,41px);margin:4px 0 7px}.workspace-intro{font-size:11px;line-height:1.45;max-width:880px}.workspace-art img{width:76px;height:74px}
.toolbar{margin:10px 0 13px;padding-inline:5px}.toolbar .outline-btn,.toolbar .primary-btn{padding:9px 12px}
.workspace-grid{grid-template-columns:minmax(0,46%) minmax(0,54%);gap:0;align-items:stretch;min-height:640px}
.workspace-grid .tree-panel,.workspace-grid .editor-panel{border:0;box-shadow:none;border-radius:0;background:radial-gradient(ellipse at 13% 10%,#fdfaf4,#f2eade);min-height:620px;margin:0}
.workspace-grid .tree-panel{border-radius:12px 0 0 12px;padding:18px 15px 30px;max-height:calc(100vh - 240px);min-height:640px;overflow-y:auto;box-shadow:inset -16px 0 14px rgba(97,79,61,.065)}
.workspace-grid .editor-panel{border-radius:0 12px 12px 0;min-width:0;box-shadow:inset 18px 0 14px rgba(97,79,61,.058);padding:0 5px}
.tree-panel-head{background:rgba(246,239,226,.96);color:#766856;border-bottom:1px solid #d7cab7}
.tree-panel-head strong{font:normal 22px var(--serif)}.tree-entry{font-size:12px;padding:9px 6px}.tree-entry.current{background:#e4e7d9;color:#42513f}
.editor{padding:31px clamp(18px,3vw,47px) 26px}.editor-panel .title-field{font-size:28px}.editor-panel .notes-field{background:rgba(255,255,252,.48);border-color:#d9cdbc;min-height:255px}
.editor-panel .field-label input,.editor-panel .field-label select{background:rgba(255,255,253,.7)}
.editor-panel .editor-top{padding-bottom:12px;border-bottom:1px solid #ded1bc;margin-bottom:16px}
.search-screen,.trash-screen{background:#f6f0e7e8;border:7px solid var(--book-edge);border-radius:13px;min-height:510px;padding:48px;box-shadow:0 18px 30px rgba(76,67,55,.13)}
.search-dock{left:calc(50% - 129px);background:#fdfaf4f2;border-color:#c4b59f}
.followup-panel{background:#edf0e6ea;border-radius:8px;border-color:#b6bfae}
@media(max-width:1100px){.app-shell{grid-template-columns:minmax(0,1fr) 211px}.sidebar{padding-inline:9px}.brand-title{font-size:17px}.content-scroll{padding-inline:12px}.bookmark-tabs{padding-inline:12px}.book-leaf{padding:22px}.workspace-grid .tree-panel{padding-inline:8px}.editor{padding-inline:20px}.topbar{padding-inline:15px}.topbtn{padding:8px}}
@media(max-width:780px){.app-shell{display:block}.sidebar{grid-area:auto;position:fixed;right:0;left:auto;top:0;bottom:0;width:min(280px,85vw);transform:translateX(105%);border-left:1px solid #aea38f;border-right:0;box-shadow:-13px 0 32px #40382a20;z-index:40}.sidebar.open{transform:translateX(0)}.main-area{height:100vh}.mobile-menu{order:unset;display:block;min-width:35px}.topbar{height:59px;min-height:59px}.bookmark-tabs{padding-top:12px}.bookmark-tab{font-size:11px;padding:9px 14px 6px}.content-scroll{padding:9px 13px 96px}.welcome-book{grid-template-columns:1fr;min-height:0}.book-leaf-left,.book-leaf-right{border-radius:9px;box-shadow:none;padding:25px}.book-leaf-right{border-top:2px solid #d5c7b7}.welcome-head{flex-direction:row}.welcome-head img{align-self:center}.book-frame::before{display:none}.book-frame::after{left:auto;right:12%;top:-8px;width:12px;height:60px}.workspace-grid{grid-template-columns:1fr;min-height:0}.workspace-grid .tree-panel{border-radius:9px 9px 0 0;min-height:130px;max-height:300px;padding:14px}.workspace-grid .editor-panel{border-radius:0 0 9px 9px;min-height:480px;border-top:2px solid #d5c7b7;padding:0}.workspace-heading{min-height:80px;padding:6px}.workspace-heading h1{font-size:34px}.toolbar{flex-wrap:wrap}.search-dock{left:50%;width:calc(100vw - 24px)}.book-leaf .project-cards{gap:7px}}
@media(max-width:430px){.topbar .top-right{gap:2px}.topbar .save-status{font-size:9px;white-space:normal;max-width:62px}.topbar .topbtn{min-width:31px;padding:6px}.book-leaf-left,.book-leaf-right{padding:18px 17px}.welcome-head h1{font-size:29px}.welcome-head img{height:83px;width:64px}.workspace-heading h1{font-size:30px}.editor{padding:18px}.book-leaf .project-card h3{font-size:18px}.bookmark-tab{padding-inline:10px}.search-screen,.trash-screen{padding:25px 18px}}
@media(prefers-reduced-motion:reduce){.bookmark-tab,.project-link,.project-card{transition:none!important}}

/* Typewriter applies only to user-authored fields, not menus or navigation. */
.editor-panel #field-body,
.editor-panel #field-title{font-family:var(--author-writing);font-weight:400;letter-spacing:.01em}
.editor-panel #field-body{font-size:16px;line-height:1.7;tab-size:4}
.editor-panel #field-title{font-size:clamp(23px,2.5vw,29px);line-height:1.45}
@media(max-width:430px){.editor-panel #field-body{font-size:16px}.editor-panel #field-title{font-size:23px}}

/* Typewritten titles can span several lines on a book page (no clipping). */
.editor-panel textarea#field-title{display:block;min-height:72px;max-height:148px;resize:vertical;white-space:pre-wrap;overflow-wrap:anywhere;overflow-x:hidden;border:0;border-bottom:1px solid #ded2c3;background:transparent;padding:6px 0 9px}

/* ÉTAPE 04 — Le livre est un seul objet fixe. Référence de disposition :
   livre central du jeu fourni, avec onglets de matière sortant de la tranche.
   Les couleurs et matériaux restent ceux de MIRPÂL. */
:root{--book-edge:#46573e;--leaf:#f5eee2}
.content-scroll{padding:56px clamp(18px,3.2vw,52px) 22px;overflow-y:auto;overflow-x:hidden;position:relative}
.content-bank{display:none!important}
.book-stage{width:min(1160px,100%);margin:0 auto;position:relative}
.physical-book{width:100%;height:clamp(540px,calc(100vh - 208px),760px);min-height:540px;border:9px solid var(--book-edge);border-radius:19px 20px 18px 20px;box-shadow:0 26px 31px rgba(62,55,43,.18),0 5px 0 #354631,inset 0 0 0 2px #a8ad8f;overflow:visible;isolation:isolate;background:#b9b1a1}
.physical-book::after{display:none!important}
.physical-book::before{z-index:5;left:50%;width:24px;background:linear-gradient(90deg,transparent,#89776620 20%,#6e554038 49%,#fffaf357 70%,transparent);box-shadow:none}
.book-spread{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));position:relative;height:100%;border-radius:9px;overflow:hidden;z-index:2}
.physical-page{position:relative;min-width:0;height:100%;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:#c0b4a1 transparent;padding:clamp(23px,3vw,41px);background:radial-gradient(ellipse at 20% 4%,#fffdfa 0%,transparent 50%),linear-gradient(105deg,#eee5d8 0%,#fbf7ee 15%,#f5eee2 100%)}
.physical-page-left{box-shadow:inset -22px 0 22px rgba(95,73,55,.12);border-radius:9px 0 0 9px}
.physical-page-right{box-shadow:inset 21px 0 20px rgba(95,73,55,.085);border-radius:0 9px 9px 0;background:radial-gradient(ellipse at 75% 2%,#fffdf8,transparent 52%),linear-gradient(90deg,#eee4d6 0%,#f8f2e8 10%,#f8f3ea 100%)}
.paper-edge{position:absolute;z-index:1;top:6px;bottom:6px;width:7px;background:repeating-linear-gradient(180deg,#f8f2e9 0 3px,#d8cbb9 3px 4px);pointer-events:none}
.paper-edge-left{left:-4px}.paper-edge-right{right:-4px}
.physical-book .bookmark-tabs{position:absolute;top:-50px;left:27px;z-index:1;display:flex;align-items:end;gap:6px;padding:0;margin:0;overflow:visible;height:53px;width:auto;max-width:calc(100% - 65px)}
.physical-book .bookmark-tab{height:53px;min-height:0;max-height:53px;padding:8px 17px 15px;border:1px solid #9f947c;border-bottom:0;border-radius:6px 9px 0 0;background:linear-gradient(100deg,#b7a482,#dbc7a0 45%,#bda988 100%);box-shadow:inset -3px 0 3px #5d564528,3px -2px 8px #3d332522;font:700 12px var(--sans);color:#494238;transform:none!important}
.physical-book .bookmark-tab:nth-child(2){background:linear-gradient(100deg,#859275,#b5c09e 50%,#8f9e83)}
.physical-book .bookmark-tab:nth-child(3){background:linear-gradient(100deg,#af7770,#d5a59d 55%,#b5847e)}
.physical-book .bookmark-tab:nth-child(4){background:linear-gradient(100deg,#b9a772,#ead9a4 50%,#bba979)}
.physical-book .bookmark-tab.current{color:#343e30;filter:saturate(1.15);box-shadow:inset 0 3px 0 #4e634b,3px -2px 8px #3d332528}
.physical-book .bookmark-tab::after{content:"";position:absolute;height:8px;left:0;right:0;bottom:0;background:#ede5d62b;border-top:1px solid #6a604333}
.book-ribbon{position:absolute;z-index:1;left:calc(50% - 9px);bottom:-32px;width:18px;height:31px;background:linear-gradient(90deg,#975c57,#cf8c81 55%,#9e625d);border-radius:0 0 2px 2px;clip-path:polygon(0 0,100% 0,100% 100%,50% 76%,0 100%);box-shadow:1px 5px 5px #4e312729;pointer-events:none}
.book-controls{height:55px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 4px 0;position:relative}
.page-arrow,.page-tool{font:600 12px var(--sans);color:#554b41;background:linear-gradient(#faf4e9,#e4dacb);border:1px solid #ae9d86;border-radius:7px;padding:10px 15px;box-shadow:0 2px 0 #78695740}
.page-arrow:hover:not(:disabled),.page-tool:hover:not(:disabled){background:#fff8ef;border-color:#788368}
.page-arrow:disabled{opacity:.4}.book-counter{font:12px var(--serif);color:#716657;text-align:center;white-space:nowrap}
.book-tools{display:flex;gap:8px;margin-left:auto}
.book-turn-sheet{position:absolute;display:none;z-index:9;top:0;bottom:0;right:0;width:50%;transform-origin:left center;backface-visibility:hidden;pointer-events:none;border-radius:0 11px 11px 0;background:linear-gradient(90deg,#dbccba,#fff9ec 18%,#f4ebde 88%,#c1ae9b);box-shadow:inset 17px 0 15px #483e2b24,-9px 0 18px #53443714}
.physical-book.turn-next .book-turn-sheet{display:block;animation:page-turn-forward .44s ease-in-out both}
.physical-book.turn-back .book-turn-sheet{display:block;right:50%;transform-origin:right center;animation:page-turn-backward .44s ease-in-out both}
@keyframes page-turn-forward{0%{transform:perspective(1300px) rotateY(0);opacity:1}49%{transform:perspective(1300px) rotateY(-87deg);opacity:1}51%{opacity:0}100%{transform:perspective(1300px) rotateY(-179deg);opacity:0}}
@keyframes page-turn-backward{0%{transform:perspective(1300px) rotateY(179deg);opacity:0}49%{opacity:0}51%{transform:perspective(1300px) rotateY(87deg);opacity:1}100%{transform:perspective(1300px) rotateY(0);opacity:1}}
/* Home occupies the same physical book; no independent container changing vertical position. */
.physical-page .book-leaf{background:none!important;border:0;box-shadow:none!important;border-radius:0!important;padding:0!important;min-height:0}
.physical-page .book-leaf-right{padding-top:0!important}
.physical-page .welcome-head img,.physical-page .home-note img,.physical-page .project-card img,.sidebar-object{display:none!important}
.physical-page .welcome-meta{font-size:10px;letter-spacing:.17em;margin:4px 0 22px}
.physical-page .welcome-head h1{font-size:clamp(31px,3.05vw,46px);line-height:1.17;margin:0 0 22px}
.physical-page .welcome-head p{font-size:13px;line-height:1.65;margin:0}
.physical-page .home-actions{margin:28px 0 12px}
.physical-page .home-note{margin-top:38px;border-left:2px solid #9ba087;padding:17px 18px;background:rgba(198,202,174,.17)}
.physical-page .home-note p{font-size:12px}
.physical-page .project-cards{display:flex;flex-direction:column;gap:10px}
.physical-page .project-card{display:flex;flex-direction:column;min-height:0;padding:14px 15px;border:1px solid #d8ccbb;border-left:4px solid #98a588;border-radius:5px;background:rgba(255,253,248,.45);box-shadow:none;transform:none!important}
.physical-page .project-card:nth-child(2){border-left-color:#b9877c}.physical-page .project-card:nth-child(3){border-left-color:#bfa374}.physical-page .project-card:nth-child(4){border-left-color:#8b858c}
.physical-page .project-card h3{font-size:20px;margin:5px 0 4px}.physical-page .project-card p{margin:0 0 9px;font-size:11px;line-height:1.5;max-height:32px;overflow:hidden}
.physical-page .section-row h2{font-size:27px}
/* Project index leaf; the real tree is a table of contents only, not glued to all spreads. */
.book-project-intro,.book-generic{height:100%;display:flex;flex-direction:column;align-items:flex-start;padding:4px 6px}
.page-kicker{font:700 10px var(--sans);letter-spacing:.14em;color:#a28b70;text-transform:uppercase}
.book-project-intro h2,.book-generic h2,.book-page-preview h2{font:normal clamp(23px,2.7vw,35px) var(--serif);line-height:1.2;color:#5a5248;margin:22px 0 16px;overflow-wrap:anywhere}
.book-project-intro p,.book-generic p{font-size:14px;line-height:1.8;color:#7e756a;white-space:pre-wrap}
.project-leaves-count{margin:25px 0 auto;padding-top:11px;border-top:1px solid #cfc0af;font:12px var(--serif);width:100%;color:#837868}
.book-project-intro .primary-btn{margin:16px 0 7px}.book-project-intro .text-button{font-size:11px}
.physical-page .tree-panel{max-height:none;height:100%;overflow-y:auto;background:none;border:0;border-radius:0;box-shadow:none;padding:0 6px 14px;min-height:0}
.physical-page .tree-panel-head{position:sticky;top:0;background:#f4ede3f7;padding:6px 3px 16px}
.physical-page .tree-panel-head strong{font:normal 24px var(--serif)}
.physical-page .tree-entry{font-size:12px}
.physical-page .editor-panel{min-height:0;height:auto;overflow:visible!important;background:none;border:0;box-shadow:none;border-radius:0;padding:0}
.physical-page .editor{padding:0 2px 18px}
.physical-page .editor-top{border:0;border-bottom:1px solid #d2c6b6;padding:0 0 12px;margin:0 0 17px;align-items:center}
.physical-page .editor-actions{gap:6px}
.physical-page .editor-actions .text-button{padding:4px 6px;font-size:10px}
.physical-page .title-field{font-size:23px;min-height:57px;max-height:108px;margin:4px 0 0}
.physical-page .field-label{margin-bottom:11px;font-size:10px;color:#74685d}
.physical-page .field-label select,.physical-page .field-label input{padding:7px 9px;background:#fffbf4a8}
.physical-page .meta-grid{gap:9px}
.physical-page .notes-field{height:clamp(135px,20vh,235px);min-height:135px;resize:vertical;background:#fffaf2ad;border:1px solid #d5cabc;line-height:1.65;font:15px var(--author-writing)}
.physical-page textarea::selection,.physical-page textarea::-moz-selection{background-color:rgba(133,105,77,.82);color:#fdfcfa}
.physical-page .editor-bottom{margin-top:8px}
.book-page-preview{height:100%;display:flex;flex-direction:column;padding:4px 2px 16px}
.book-page-preview .preview-path{font-size:11px;color:#a39887;line-height:1.4;margin-bottom:18px}
.book-page-preview .preview-prose{font:14px/1.8 var(--author-writing);white-space:pre-wrap;overflow-y:auto;min-height:80px;max-height:56%;color:#5b5449;margin:8px 0 23px;padding:0 3px 3px 0;overflow-wrap:anywhere}
.book-page-preview button{align-self:start;margin-top:auto}
/* Secondary views must also live on a leaf instead of changing the window geometry. */
.physical-page .search-screen,.physical-page .trash-screen{min-height:0;padding:0;background:none;border:0;border-radius:0;box-shadow:none;max-width:none}
.physical-page .search-screen h1,.physical-page .trash-screen h1{font-size:30px}
.physical-page .search-results,.physical-page .trash-list{max-height:none}
.physical-page .followup-panel{border:0;background:none;box-shadow:none;margin:0;padding:0;max-height:none}
.physical-page .followup-head{flex-direction:column;gap:12px}
.physical-page .followup-list{grid-template-columns:1fr;max-height:none;overflow:visible}
.search-dock{bottom:11px;left:calc((100vw - 258px) / 2);z-index:15;width:min(490px,calc(100vw - 300px));box-shadow:0 8px 20px #4b463322}
@media(max-width:1120px){.physical-book{height:clamp(500px,calc(100vh - 210px),700px)}.physical-page{padding:22px}.physical-page .editor-actions{flex-wrap:wrap}.physical-page .welcome-head h1{font-size:30px}.physical-page .project-card h3{font-size:18px}}
@media(max-width:780px){.content-scroll{padding:53px 15px 22px}.physical-book{height:clamp(520px,calc(100dvh - 202px),800px);min-height:520px}.physical-book::before{display:none}.book-spread{grid-template-columns:1fr}.physical-page{padding:26px 23px;box-shadow:none!important;border-radius:10px}.physical-page.mobile-off{display:none}.physical-book .bookmark-tabs{left:12px;top:-45px;height:49px;gap:3px}.physical-book .bookmark-tab{height:49px;padding:9px 12px 14px;font-size:11px}.book-ribbon{left:auto;right:24px}.book-controls{height:62px;gap:6px}.page-arrow{padding:10px 9px}.book-tools{gap:3px}.page-tool{padding:9px 7px;font-size:11px}.book-counter{font-size:10px}.physical-book .bookmark-tab:nth-child(4){display:none}.physical-page .search-screen h1{font-size:27px}.search-dock{left:50%;width:calc(100vw - 40px);bottom:8px}}
@media(max-width:420px){.book-controls .page-arrow span{display:none}.physical-book .bookmark-tab{padding-inline:9px;font-size:10px}.physical-page{padding:21px 17px}.physical-page .welcome-head h1{font-size:30px}.physical-page .editor-actions .text-button{font-size:9px}.physical-page .notes-field{height:185px}}
@media(prefers-reduced-motion:reduce){.physical-book.turn-next .book-turn-sheet,.physical-book.turn-back .book-turn-sheet{display:none!important;animation:none!important}}

@media(max-width:780px){.physical-book .bookmark-tab:nth-child(4){display:block}}

/* Search must never cover the page-turn buttons. */
.search-dock{display:none!important}body.search-active .search-dock{display:flex!important}

/* =============================================================
   ETAPE 05.1 — Harmonisation visuelle. Le moteur du livre reste intact.
   Les objets ont maintenant un rôle : classeur = marque, corbeille = supprimer.
   ============================================================= */
.brand{margin-bottom:35px}.brand-cabinet{width:49px;height:55px;object-fit:contain;flex-shrink:0;image-rendering:pixelated;filter:drop-shadow(1px 3px 2px #46403424)}
.trash-link{display:flex;align-items:center;justify-content:flex-start;gap:9px;min-height:58px;padding:5px 2px}.trash-link .trash-object{width:37px;height:46px;object-fit:contain;image-rendering:pixelated}.trash-link #trash-count{margin-left:auto}
.top-search{display:flex;align-items:center;gap:8px;min-width:190px;max-width:480px;flex:1;border:1px solid #d0c5b3;background:#fffdf9bb;border-radius:8px;height:38px;padding:0 11px}
.top-search:focus-within{outline:2px solid #a2a990;outline-offset:1px}.top-search .search-icon{font-size:19px;color:#837565}.top-search input{background:transparent;border:0;outline:0;min-width:0;width:100%;font:12px var(--sans);color:#454139}
.top-search input::-webkit-search-cancel-button{cursor:pointer}.topbar .breadcrumb.visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.physical-book .bookmark-tab:nth-child(3){background:linear-gradient(100deg,#af7770,#d5a59d 55%,#b5847e)}
.physical-page .home-guide{max-width:500px;background:#f5f0e8a6;border:1px solid #dcd2c1;border-radius:8px;padding:20px 23px;color:#6f6659;font-size:14px;line-height:1.8}
.physical-page .home-guide p{margin:0 0 15px}.physical-page .home-guide p:last-child{margin:0}
.tree-panel-head .icon-button{height:34px;width:37px;display:grid;place-items:center;border:1px solid #d8cebb;background:#f8f5edb8}
.logo-bis{width:23px;height:23px;object-fit:contain;transition:transform .2s ease}.is-collapsed .logo-bis{transform:rotate(180deg)}
/* La recherche n'est plus flottante ; les feuilles conservent leur espace. */
.search-dock,body.search-active .search-dock{display:none!important}
@media(max-width:780px){.topbar{gap:7px;padding:0 10px}.top-search{flex:1;min-width:85px;height:34px;padding:0 7px}.top-search input{font-size:11px}.top-right{gap:4px}.topbtn{font-size:10px;padding:6px 7px}.brand-cabinet{width:44px}.physical-book .bookmark-tab:nth-child(3){display:block}.physical-page .home-guide{padding:12px;font-size:12px}}
@media(prefers-reduced-motion:reduce){.logo-bis{transition:none}}

/* 05.2 — cassette indépendante de l'enregistrement automatique local. */
.cassette-action{display:flex;align-items:center;gap:5px;background:#fbf7edaa;border:1px solid #cfc4af;border-radius:7px;padding:4px 8px;font:600 11px var(--sans);color:#5d5245;white-space:nowrap;min-height:38px}
.cassette-action img{width:43px;height:29px;object-fit:contain;image-rendering:pixelated}.cassette-action:hover{background:#fffdf9}
.cassette-config{height:34px;width:28px;padding:0;border:1px solid #cfc4af;border-radius:7px;background:#fbf7ed99;font-size:15px;color:#766853}
.external-settings{margin:15px 0;padding:16px;background:#f5f0e7;border:1px solid #d6c7b5;border-radius:10px}.external-settings-heading{display:flex;align-items:center;gap:12px}.external-settings-heading img{width:65px;max-height:54px;object-fit:contain;image-rendering:pixelated}.external-settings-heading h3{font:normal 21px var(--serif);margin:0}.external-settings-heading p{margin:4px 0 0;font-size:12px;color:#847362;line-height:1.5}
.external-path{border:1px dashed #c8b9a4;background:#fffaf4;margin:15px 0 7px;padding:9px 10px;overflow-wrap:anywhere;font-size:12px;color:#675849}
#external-feedback{font-size:11px;line-height:1.6}.external-settings .backup-row{font-size:11px}
@media(max-width:1200px){.cassette-action span{display:none}.cassette-action img{width:34px}.topbar .top-right{gap:4px}}
@media(max-width:450px){.cassette-action{padding:2px 3px;height:33px;min-height:33px}.cassette-action img{width:28px;height:26px}.cassette-config{width:25px;height:31px}.external-settings{padding:10px}}

/* ETAPE 05.3 — Ecriture compacte + suites sur feuilles séparées (un seul texte sauvegardé).
   Special Elite is used only if locally available; offline fallback is intentional.
   We do not redistribute the font binary in this checkpoint. */
:root{--author-writing:'Special Elite','Courier New',monospace}
.physical-page .notes-field,#field-body,.flow-continuation,.book-page-preview .preview-prose{
  font-family:var(--author-writing)!important;font-size:12.5px!important;line-height:1.53!important;
  letter-spacing:0!important;color:#50483e;
}
.physical-page .notes-field{height:178px!important;min-height:148px!important;max-height:200px;resize:none;overflow-y:hidden}
.physical-page #field-title{font-size:21px!important;line-height:1.32;min-height:48px;max-height:85px}
.flow-page{display:flex;flex-direction:column;height:100%;min-height:0;gap:18px}
.flow-page .page-kicker{font-size:9px;letter-spacing:.06em;white-space:normal;line-height:1.5}
.flow-continuation{width:100%;flex:1;min-height:0;background:none;border:0;outline-offset:3px;resize:none;white-space:pre-wrap;overflow:hidden;padding:4px 1px}
.insert-sheet{font-size:10px!important;margin:3px 0 12px}
.book-page-preview .preview-prose{max-height:none;flex:1;min-height:0;overflow-y:auto}
@media(max-width:780px){.physical-page .notes-field{height:140px!important;min-height:130px!important}}

/* 05.4 Image sheets: an image lives in the canonical note JSON and shifts with text offsets. */
.embedded-image-page{display:flex;flex-direction:column;gap:10px;min-height:0;height:100%}
.embedded-image{width:100%;max-height:min(65vh,420px);flex:1;min-height:50px;object-fit:contain;object-position:center;border-radius:3px}
.embedded-image-caption{width:100%;flex:0 0 65px;min-height:55px;background:transparent;border:1px solid #d0c5b6;border-radius:4px;resize:vertical;padding:8px;font:12px/1.5 var(--author-writing);color:#5d5348}
.embedded-image-caption:read-only{border-color:transparent}
.embedded-image-actions{display:flex;justify-content:flex-end}
@media(max-width:780px){.embedded-image{max-height:60vh}.embedded-image-caption{flex-basis:52px}}

/* 5.5 — Documents originaux, sans interférer avec les pages du livre */
.document-archive{margin:1rem 0;padding:.8rem;border:1px solid #d7cdbf;border-radius:8px;background:#f7f2e9}.document-row{display:flex;align-items:center;flex-wrap:wrap;gap:.65rem;padding:.5rem 0;border-bottom:1px solid #ded5c8}.document-row span{flex:1;min-width:140px;overflow-wrap:anywhere}.doc-help{font-size:.75rem}.document-archive .field-label{font-size:.67rem;letter-spacing:.05em}

/* ÉTAPE 05.8 — filtres de suivi lisibles sur une page réelle du carnet.
   Les contrôles restent en deux colonnes quand il y a de la place, puis se replient. */
.followup-filters{display:flex;flex:0 0 auto;flex-wrap:wrap;align-items:start;gap:9px;max-width:100%}
.followup-filters label{min-width:150px;max-width:235px;flex:1 1 150px}
.followup-filters select{width:100%;max-width:none}
.physical-page .followup-filters{width:100%}
.physical-page .followup-filters label{min-width:130px;flex:1 1 140px}
@media(max-width:780px){.followup-filters{width:100%}.followup-filters label{min-width:0;flex:1 1 125px}}

/* 05.8 — Les actions sous le livre ne doivent pas sortir du viewport mobile.
   Les flèches restent accessibles; les outils se répartissent sur deux rangées. */
@media(max-width:600px){
  .book-controls{display:grid;grid-template-columns:auto minmax(0,1fr) auto;
    grid-template-areas:"previous count next" "tools tools tools";align-items:center;
    height:auto;min-height:100px;row-gap:8px;column-gap:7px;padding:9px 3px 12px}
  #previous-spread{grid-area:previous;justify-self:start}
  #next-spread{grid-area:next;justify-self:end}
  #spread-counter{grid-area:count;min-width:0;white-space:normal}
  .book-tools{grid-area:tools;margin:0;display:flex;flex-wrap:wrap;
    align-items:center;justify-content:center;min-width:0;max-width:100%;gap:6px}
  .page-tool{flex:0 0 auto;font-size:10px;min-height:32px;padding:7px 9px}
}

/* 05.10 : controls live BELOW a reserved clear strip. The book itself never moves. */
.book-controls{margin-top:30px;min-height:66px;align-items:flex-start;padding-top:8px}
.book-ribbon{pointer-events:auto;cursor:pointer;border:0;z-index:6;transition:filter .14s ease}
.book-ribbon:hover,.book-ribbon.has-favorite{filter:drop-shadow(0 3px 3px #6e382b99)}
.book-ribbon:focus-visible{outline:2px solid #493c31;outline-offset:4px}
.drawer-toggle{border:0;background:transparent;padding:0;display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0}
.drawer-toggle .brand-cabinet{width:49px;height:55px;object-fit:contain;image-rendering:pixelated;margin:0}
.drawer-toggle[aria-expanded=true]{filter:drop-shadow(0 2px 3px #71605255)}
.drawer-dialog{width:min(720px,calc(100vw - 26px));max-height:min(85vh,850px);overflow:auto}
.drawer-dialog .settings-header button{border:0;background:transparent;font-size:23px}
.drawer-search{font:12px var(--sans);display:flex;flex-direction:column;gap:7px;color:#665a4d;margin:10px 0}
.drawer-search input{border:1px solid #c9bca9;border-radius:8px;padding:10px 12px;background:#fffdf9}
.drawer-subtitle{font:bold 10px var(--sans);letter-spacing:.11em;color:#9b8267;margin:18px 0 6px}
.drawer-list{display:flex;flex-direction:column;gap:7px}
.drawer-entry{padding:10px;border:1px solid #dfd5c7;border-radius:9px;background:#faf6ef;display:flex;justify-content:space-between;gap:12px;align-items:center}
.drawer-entry strong{font:600 13px var(--sans);overflow-wrap:anywhere}
.drawer-entry small{display:block;font-size:11px;color:#786c5d;margin-top:5px}
.drawer-entry .drawer-actions{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end}
.drawer-entry a,.drawer-entry button{border:1px solid #cfc2ae;background:#fffdf8;border-radius:5px;padding:8px 9px;font-size:11px;color:#554b3d;text-decoration:none}
.external-manual-panel{padding:12px;background:#f3eee4;border:1px solid #d8cbb8;border-radius:8px}
.external-manual-panel label{font-size:12px}
.external-manual-panel input{min-width:170px;flex:1;border:1px solid #c8baa7;border-radius:6px;padding:9px}
.external-manual-panel .settings-actions{margin:8px 0}
@media(max-width:780px){.book-controls{margin-top:28px;align-items:center}.drawer-toggle .brand-cabinet{width:44px}.drawer-entry{align-items:flex-start;flex-direction:column}}
@media(max-width:600px){.book-controls{margin-top:30px;padding-top:9px}}

.drawer-toggle-mobile{display:none;border:0;padding:0;background:transparent;align-items:center;justify-content:center;flex:0 0 36px;cursor:pointer}
.drawer-toggle-mobile img{width:32px;height:38px;object-fit:contain;image-rendering:pixelated}
@media(max-width:780px){.drawer-toggle-mobile{display:flex}}
@media(max-width:420px){.topbar{gap:4px}.drawer-toggle-mobile{flex-basis:27px}.drawer-toggle-mobile img{width:27px;height:32px}}

/* 05.10: screen-reader-only instruction; never visible underneath the book. */
.bookmark-hint.visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
/* Non-modal library: second click on the cabinet can close it. */
.drawer-dialog{position:fixed;top:68px;right:calc(min(264px, 20vw) + 12px);left:auto;margin:0;box-shadow:0 18px 60px #332b2666;z-index:55}
@media(max-width:780px){.drawer-dialog{top:61px;right:8px;left:8px;width:auto;max-height:calc(100dvh - 75px)}}

/* 05.10a — retouche strictement visuelle : pictogramme Sommaire et tirettes.
   Le bouton du Sommaire conserve sa surface cliquable et son fonctionnement.
   Toutes les zones défilantes conservent le défilement NATIF (molette, clavier,
   geste tactile et saisie directe de la poignée). Aucun défilement JS ajouté. */
.tree-panel-head .logo-bis{width:16px;height:16px}

/* Chrome / Edge / Safari : même objet clair, avec rail bordé et poignée arrondie.
   La bordure intérieure sert de contour sans assombrir le contenu du carnet. */
*::-webkit-scrollbar{width:16px;height:16px}
*::-webkit-scrollbar-track{
  background:#f6f2eb;
  border:1px solid #ded6ca;
  border-radius:10px;
  box-shadow:inset 0 0 0 2px #fcfaf5;
}
*::-webkit-scrollbar-thumb{
  background:linear-gradient(90deg,#e1d9cd,#c5b9a9 52%,#e0d8ca);
  border:3px solid #f6f2eb;
  border-radius:999px;
  box-shadow:inset 0 0 0 1px #a99b88;
  min-height:32px;
}
*::-webkit-scrollbar-thumb:hover{
  background:linear-gradient(90deg,#d8cdbd,#b6a793 52%,#d8cdbd);
  box-shadow:inset 0 0 0 1px #91836f;
}
*::-webkit-scrollbar-thumb:active{
  background:#b9ab97;
}
*::-webkit-scrollbar-corner{background:#f6f2eb}
*::-webkit-scrollbar-button:single-button{
  background-color:#f6f2eb;
  border:1px solid #ded6ca;
  border-radius:7px;
  background-repeat:no-repeat;
  background-position:center;
  background-size:9px 9px;
}
*::-webkit-scrollbar-button:single-button:vertical:decrement{
  height:17px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='9' viewBox='0 0 9 9'%3E%3Cpath d='M1.5 6 4.5 3 7.5 6' fill='none' stroke='%23968874' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5'/%3E%3C/svg%3E");
}
*::-webkit-scrollbar-button:single-button:vertical:increment{
  height:17px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='9' viewBox='0 0 9 9'%3E%3Cpath d='M1.5 3 4.5 6 7.5 3' fill='none' stroke='%23968874' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5'/%3E%3C/svg%3E");
}
*::-webkit-scrollbar-button:single-button:horizontal{width:17px}

/* La page du livre avait une règle standard 'thin' qui neutralisait le rendu
   à contours sur Chromium récent ; restauration du mode WebKit pour ces zones. */
@supports selector(::-webkit-scrollbar){
  .physical-page,.bookmark-tabs{scrollbar-width:auto;scrollbar-color:auto}
}
/* Firefox : personnalisation standard, sans masquer ni simuler la poignée. */
@supports (-moz-appearance:none){
  *{scrollbar-width:thin;scrollbar-color:#bcae9c #f6f2eb}
}
/* Respect du contraste choisi par le système. */
@media(forced-colors:active){
  *{scrollbar-color:auto!important;scrollbar-width:auto!important}
  *::-webkit-scrollbar-thumb,*::-webkit-scrollbar-track,*::-webkit-scrollbar-button{forced-color-adjust:auto}
}

/* 05.10c : geste de mise à la corbeille. Aucun changement de moteur de pages. */
.trash-link.trash-drop-target{background:#e0e6d6;border-radius:9px;outline:2px solid #77856d;outline-offset:2px;box-shadow:0 0 0 5px #b2c5a63b}
.trash-is-dragging,.trash-is-dragging *{cursor:grabbing!important}
.trash-drag-ghost{position:fixed;z-index:10000;pointer-events:none;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:#faf8f0ee;border:1px solid #c5b6a3;border-radius:8px;padding:8px 13px;color:#585045;box-shadow:0 8px 22px #564e4230;font-size:13px}
.trash-bottom{margin-top:22px;padding-top:16px;border-top:1px solid #d8cdbd}
.trash-bottom .muted{font-size:11px;line-height:1.55;max-width:620px}
.trash-empty{color:#8e493f;border-color:#d9ada6}
.trash-empty:disabled{opacity:.45;cursor:not-allowed}
@media(max-width:620px){.trash-item{gap:10px;flex-wrap:wrap}.trash-drag-ghost{display:none}}

/* 05.10l — Logotype Notulîre vectorisé (Valley Sans Bold).
   Utilisable sans installation de police et sans aucun appel reseau.
   Le bouton garde son aria-label et sa navigation existante. */
.brand-home{appearance:none;border:0;background:transparent;padding:4px 0;min-width:0;max-width:100%;display:flex;align-items:center;justify-content:flex-start;cursor:pointer;text-align:left}
.notulire-wordmark{display:block;width:auto;max-width:100%;height:32px;object-fit:contain;object-position:left center}
.brand-home:hover .notulire-wordmark{opacity:.82}
.brand-home:focus-visible{outline:2px solid #85694d;outline-offset:4px;border-radius:3px}
@media(max-width:1100px){.notulire-wordmark{height:30px}}
@media(max-width:780px){.mobile-brand{display:flex;align-items:center}.notulire-mobile-wordmark{display:block;width:auto;height:13px;max-width:100%}}

/* 05.10m — Le numéro vient de /api/bootstrap, source canonique Go.
   En bas à droite de la fenêtre, y compris avec la barre latérale à droite.
   Non interactif ; n'empêche ni les clics ni le glissement dans le carnet. */
.app-version{position:fixed;right:18px;bottom:10px;z-index:15;
  pointer-events:none;user-select:none;
  padding:3px 7px;border-radius:5px;
  color:#746957;background:rgba(245,242,234,.76);
  font:600 10px/1.3 var(--sans);letter-spacing:.06em;
  font-variant-numeric:tabular-nums;white-space:nowrap}
@media(max-width:780px){.app-version{right:9px;bottom:6px;font-size:9px}}
@media(forced-colors:active){.app-version{color:CanvasText;background:Canvas}}


/* 05.10o — Retouches ciblées demandées sur les captures du 21 octobre.
   Les dimensions du livre et la logique des commandes sont inchangées. */
.book-controls{margin-top:12px}
/* La corbeille reste cliquable : seule son image bouge lors d'un dépôt. */
.sidebar-foot{padding-bottom:23px}
.trash-link{min-height:76px;gap:11px;overflow:visible}
.trash-link .trash-object{width:56px;height:68px;flex:0 0 auto;transform-origin:50% 58%}
.trash-link.trash-drop-target .trash-object{animation:notulire-trash-tilt .62s ease-in-out infinite}
@keyframes notulire-trash-tilt{
  0%,100%{transform:rotate(0deg)}
  25%{transform:rotate(-9deg)}
  75%{transform:rotate(9deg)}
}
/* La version appartient au bas GAUCHE de la fenêtre, pas à la corbeille (à droite). */
.app-version{left:18px;right:auto}
@media(max-width:780px){
  .book-controls{margin-top:14px}
  .app-version{left:9px;right:auto}
}
@media(max-width:600px){.book-controls{margin-top:14px}}
@media(prefers-reduced-motion:reduce){
  .trash-link.trash-drop-target .trash-object{animation:none!important}
}
