/* Outils d'édition (rediger.php) */
.ed-tb{position:sticky;top:0;z-index:30;display:flex;flex-wrap:wrap;gap:6px;align-items:center;background:#fff;border:1px solid #dfe5df;border-radius:12px;padding:6px 8px;margin-bottom:12px;box-shadow:0 4px 14px rgba(0,0,0,.06)}
.ed-tb .tb-g{display:flex;gap:2px;align-items:center;padding-right:6px;border-right:1px solid #eee}
.ed-tb .tb-g:last-child{border-right:0}.ed-tb .tb-end{margin-left:auto}
.ed-tb button{display:inline-flex;align-items:center;gap:5px;min-width:32px;height:32px;padding:0 7px;border:0;border-radius:7px;background:transparent;color:#1d2421;font:600 14px Inter,sans-serif;cursor:pointer}
.ed-tb button:hover{background:#eef5ee}.ed-tb select{height:32px;border:1px solid #dfe5df;border-radius:7px;font:14px Inter,sans-serif;padding:0 4px;background:#fff}
.ed-tb .tb-lbl{font-size:13px}.ed-tb .tb-ortho{background:#eef5ee;color:#177a1c}.ed-tb .tb-ia{background:#fff1e3;color:#b35a00}
.tb-color{position:relative;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:7px;cursor:pointer;font:700 15px Georgia,serif}
.tb-color:hover{background:#eef5ee}.tb-color span{border-bottom:4px solid #c0392b;line-height:1}.tb-hl span{border-bottom-color:#fff27a;font:600 13px Inter,sans-serif}
.tb-color input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%}
.ed-sheet-hf{width:794px;background:#fff;padding:18px 70px;box-sizing:border-box;outline:1px dashed #b9d8bb;outline-offset:-6px;position:relative;font-size:13px}
.ed-sheet-hf::before{content:attr(data-label);position:absolute;top:-1px;right:12px;font:600 10px Inter,sans-serif;color:#177a1c;background:#e3f4e5;padding:1px 6px;border-radius:0 0 6px 6px;letter-spacing:.04em;text-transform:uppercase}
.ed-sheet-hf p{margin:0}.ed-sheet-hf.only-num{min-height:0;padding:6px 70px}
#numBadge{font:12px Arial,sans-serif;color:#555;padding-top:6px}
.rdpage img,.ed-sheet-hf img{max-width:100%;height:auto;cursor:pointer}
.ed-imgbar{position:absolute;z-index:60;display:flex;gap:2px;background:#1d2421;border-radius:8px;padding:4px}
.ed-imgbar button{background:transparent;color:#fff;border:0;border-radius:6px;padding:6px 9px;font:600 13px Inter,sans-serif;cursor:pointer}
.ed-imgbar button:hover{background:#3a4440}.ed-imgbar .del{color:#ffb4a8}
.ed-panel{position:fixed;top:0;right:0;bottom:0;z-index:80;width:min(380px,100vw);background:#fff;box-shadow:-8px 0 30px rgba(0,0,0,.15);padding:16px;overflow:auto;font-family:Inter,sans-serif}
.ed-ph{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;font-size:17px}
.ed-x{border:0;background:#f1f1f1;border-radius:50%;width:32px;height:32px;font-size:20px;cursor:pointer}
.ed-m{border:1px solid #eee;border-radius:10px;padding:10px;margin-bottom:10px}
.ed-ctx{font-size:14px;color:#555;cursor:pointer}.ed-ctx mark{background:#ffd6d1;color:#a11;padding:0 2px;border-radius:3px}
.ed-msg{font-size:13px;color:#333;margin:6px 0}.ed-reps{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.ed-rep{border:1px solid #177a1c;background:#eef5ee;color:#145c18;border-radius:999px;padding:5px 12px;font:600 13px Inter,sans-serif;cursor:pointer}
.ed-rep:disabled{opacity:.4;cursor:default}.ed-ok{color:#177a1c;font-weight:600}.ed-sum{font-size:14px;color:#444}.ed-load{color:#666}
.ed-ia-acts{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 14px}.ed-ia-q{display:grid;gap:6px;font-weight:600;font-size:14px;margin-bottom:10px}
.ed-ia-q textarea{border:1px solid #ccc;border-radius:10px;padding:10px;font:inherit}
.ed-ia-out{background:#f7f8f7;border-radius:10px;padding:12px;margin:12px 0;font-size:14px;line-height:1.55;white-space:normal}
.ed-dlg .modal-in{max-width:620px}.ed-tabs{display:flex;gap:6px;margin-bottom:12px}
.ed-tabs button{border:1px solid #dfe5df;background:#fff;border-radius:999px;padding:7px 14px;font:600 14px Inter,sans-serif;cursor:pointer}.ed-tabs .on{background:#177a1c;color:#fff;border-color:#177a1c}
.ed-drop{display:grid;place-items:center;min-height:150px;border:2px dashed #b9d8bb;border-radius:12px;text-align:center;cursor:pointer;padding:12px;color:#555}
.ed-drop img{max-width:100%;max-height:180px}.ed-chk{display:flex;gap:8px;align-items:center;font-size:14px;margin:10px 0}
#edPad{width:100%;height:auto;border:2px dashed #b9d8bb;border-radius:12px;touch-action:none;background:#fff;cursor:crosshair}
.ed-w{display:flex;gap:10px;align-items:center;font-size:14px;margin:10px 0}
.rd-preview{position:relative;max-height:620px;overflow:hidden;border-radius:12px}
.rd-preview::after{content:"";position:absolute;left:0;right:0;bottom:0;height:60%;background:linear-gradient(rgba(233,236,233,0),#e9ece9 85%)}
.rd-gate{position:relative;z-index:2;margin:-90px auto 40px;max-width:560px;background:#fff;border-radius:16px;box-shadow:0 10px 40px rgba(0,0,0,.12);padding:24px;text-align:center}
.rd-gate h2{margin:0 0 6px}.rd-gate .btn{margin:6px}
@media(max-width:700px){.ed-tb .tb-lbl{display:none}.ed-tb .tb-end{margin-left:0}.ed-sheet-hf{padding:14px 30px}}
@media print{.ed-tb,.ed-panel,.ed-imgbar{display:none!important}}
