:root{--primary-color:#4f46e5;--primary-hover:#4338ca;--bg-main:#f1f5f9;--bg-card:#fff;--toolbar-bg:#fff;--border-color:#e2e8f0;--text-main:#1e293b;--text-muted:#64748b;--shadow-sm:0 1px 2px 0 rgba(0,0,0,.05);--shadow-md:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--shadow-lg:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--glass-blur:12px}.tiptap-editor{border:1px solid var(--border-color);border-radius:16px;background:var(--bg-main);height:850px;overflow:hidden;position:relative}.tiptap-editor,.tiptap-toolbar{display:flex;flex-direction:column}.tiptap-toolbar{padding:0;background:#fff;z-index:100;color:#1e293b}.ribbon-tabs,.tiptap-toolbar{border-bottom:1px solid #e2e8f0}.ribbon-tabs{display:flex;background:#f8fafc;padding:0 10px}.ribbon-tab{padding:8px 16px;font-size:12px;font-weight:500;color:#64748b;cursor:pointer;border-bottom:2px solid transparent;transition:all .2s}.ribbon-tab:hover{color:#1e293b;background:rgba(0,0,0,.02)}.ribbon-tab.active{color:#4f46e5;border-bottom-color:#4f46e5;background:#fff}.ribbon-content{display:flex;padding:8px 12px;gap:1px;background:#fff;align-items:stretch;height:95px;overflow-x:auto;scrollbar-width:thin}.ribbon-group{display:flex;flex-direction:column;padding:0 12px;border-right:1px solid #f1f5f9;position:relative;justify-content:space-between;min-width:-moz-fit-content;min-width:fit-content}.ribbon-group:hover{background:#fcfcfc}.ribbon-group-content{display:flex;gap:4px;flex-wrap:wrap;align-content:flex-start;flex:1}.ribbon-group-label{font-size:10px;color:#94a3b8;text-align:center;padding-top:4px;text-transform:uppercase;letter-spacing:.05em}.tiptap-toolbar-btn{background:transparent;border:none;border-radius:4px;padding:6px 10px;cursor:pointer;font-size:14px;color:#475569;transition:all .2s;display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:32px}.tiptap-toolbar-btn:hover{background:#f1f5f9;color:#1e293b}.tiptap-toolbar-btn.is-active{background:#eef2ff;color:#4f46e5;box-shadow:inset 0 0 0 1px #c7d2fe}.tiptap-toolbar-btn.large{min-width:64px;height:100%;font-size:28px}.tiptap-toolbar-btn.large span{font-size:10px;margin-top:4px;font-weight:500}.tiptap-select{padding:4px 8px;border:1px solid #e2e8f0;border-radius:4px;font-size:12px;background:#fff;color:#1e293b;outline:none;height:28px}.tiptap-content-wrapper{display:flex;flex:1;overflow:hidden}.tiptap-content hr{border:none;border-top:1px solid;margin:1.5rem 0;opacity:.8}.tiptap-content{flex:1;overflow:auto;padding:40px 0;background:transparent;display:flex;flex-direction:column;align-items:center;scroll-behavior:smooth;position:relative}.page-node{-webkit-user-select:text!important;-moz-user-select:text!important;user-select:text!important;pointer-events:auto!important}.tiptap-content,.zoom-wrapper{-webkit-user-select:auto;-moz-user-select:auto;user-select:auto}.ProseMirror,.tiptap-page-content{-webkit-user-select:text!important;-moz-user-select:text!important;user-select:text!important;pointer-events:auto!important}.zoom-wrapper{transition:transform .2s cubic-bezier(.4,0,.2,1);transform-origin:top center}.ProseMirror,.zoom-wrapper{display:flex;flex-direction:column;align-items:center;width:100%}.ProseMirror{outline:none;background:transparent;margin:0 auto;transition:width .4s ease;color:#1a1a1a;line-height:1.6;font-family:Inter,system-ui,-apple-system,sans-serif;position:relative}.tiptap-editor .page-node,.zoom-wrapper .page-node{background:#fff!important;margin:40px auto!important;border:1px solid #e2e8f0!important;position:relative;box-sizing:border-box;border-radius:0;transition:all .2s ease;box-shadow:none!important}.page-node.active-page{border:2px solid #3b82f6!important;outline:none}.page-node:first-of-type{margin-top:40px!important}.editor-page-size-a2 .page-node{width:420mm;min-height:594mm}.editor-page-size-a3 .page-node{width:297mm;min-height:420mm}.editor-page-size-a4 .page-node{width:210mm;min-height:297mm}.editor-page-size-a5 .page-node{width:148mm;min-height:210mm}.editor-page-size-a6 .page-node{width:105mm;min-height:148mm}.editor-page-size-a7 .page-node{width:74mm;min-height:105mm}.editor-page-size-a8 .page-node{width:52mm;min-height:74mm}.editor-property-panel{width:320px;background:#fff;border-left:1px solid #e2e8f0;padding:24px;display:flex;flex-direction:column;gap:28px;overflow-y:auto;z-index:100;box-shadow:-4px 0 15px rgba(0,0,0,.05)}.property-group{display:flex;flex-direction:column;gap:14px}.property-label{font-size:11px;font-weight:800;color:#64748b;text-transform:uppercase;letter-spacing:.12em}.property-control{display:flex;flex-direction:column;gap:8px}.property-input{width:100%;padding:10px 12px;border:1px solid #e2e8f0;border-radius:10px;font-size:13px;outline:none;transition:all .2s;background:#f8fafc}.property-input:focus{border-color:#4f46e5;background:#fff;box-shadow:0 0 0 3px rgba(79,70,229,.1)}.property-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}.layout-row{display:flex;gap:20px;margin:1.5em 0;min-height:60px;padding:15px;border:1px dashed transparent;transition:all .2s;border-radius:8px}.layout-row:hover{border-color:#cbd5e1;background:rgba(248,250,252,.5)}.layout-col{flex:1;min-width:0;display:flex;flex-direction:column}.flex-row{display:flex;flex-direction:row}.flex-col{display:flex;flex-direction:column}.flex-center{justify-content:center;align-items:center}.flex-between{justify-content:space-between}.flex-around{justify-content:space-around}.gradient-primary{background:linear-gradient(135deg,#4f46e5,#7c3aed);color:#fff}.gradient-ocean{background:linear-gradient(135deg,#0ea5e9,#2563eb);color:#fff}.gradient-sunset{background:linear-gradient(135deg,#f59e0b,#ef4444);color:#fff}.shadow-soft{box-shadow:0 4px 20px rgba(0,0,0,.05)}.shadow-medium{box-shadow:0 10px 30px rgba(0,0,0,.1)}.shadow-hard{box-shadow:0 20px 50px rgba(0,0,0,.2)}.editor-section{padding:40px;margin:20px 0;border-radius:12px}.editor-divider{height:2px;background:#e2e8f0;margin:30px 0;border:none}.editor-button{display:inline-block;padding:12px 24px;border-radius:8px;font-weight:600;text-decoration:none;cursor:pointer;transition:all .2s}.editor-container{padding:20px;border-radius:8px;margin:1em 0;border:1px solid transparent;min-height:40px}[data-type=layout-block]>div,[data-type=shape-block]>div{box-sizing:border-box}[data-node-view-content]>.resizable-node{flex:0 0 auto;min-width:0;max-width:100%}[data-node-view-content]>h1,[data-node-view-content]>h2,[data-node-view-content]>h3,[data-node-view-content]>p{width:auto;min-width:0}.text-center{text-align:center!important}.text-right{text-align:right!important}.text-justify{text-align:justify!important}.shape-rect{border-radius:4px}.shape-circle{border-radius:50%;aspect-ratio:1/1;display:flex;align-items:center;justify-content:center}[data-type=layout-block]>.tiptap-page-content,[data-type=shape-block]>.tiptap-page-content{display:flex!important;width:100%}.tiptap-page-content>:first-child{margin-top:0!important}.tiptap-page-content>:last-child{margin-bottom:0!important}.ProseMirror p{margin-top:0;margin-bottom:.8em}.ProseMirror b,.ProseMirror strong{font-weight:700!important}.ProseMirror em,.ProseMirror i{font-style:italic!important}.ProseMirror u{text-decoration:underline!important}.ProseMirror del,.ProseMirror s,.ProseMirror strike{text-decoration:line-through!important}.ProseMirror ul{list-style-type:disc}.ProseMirror ol,.ProseMirror ul{padding-left:1.5em;margin-bottom:1em}.ProseMirror ol{list-style-type:decimal}.ProseMirror li{margin-bottom:.5em}.ProseMirror li p{margin-bottom:0;display:inline}.ProseMirror h1{font-size:3em;margin-bottom:.8em;font-weight:800;color:#000;letter-spacing:-.02em}.ProseMirror h2{font-size:2.2em;margin-bottom:.6em;font-weight:700;color:#1a1a1a;border-bottom:1px solid #eee;padding-bottom:.3em}.ProseMirror h3{font-size:1.8em;margin-bottom:.5em;font-weight:600;color:#333}.ProseMirror table{border-collapse:separate!important;border-spacing:0!important;margin:1.5em 0;overflow:hidden;width:100%!important;table-layout:fixed!important}.ProseMirror td,.ProseMirror th{min-width:1em;min-height:2em;border:var(--inner-border-width,1px) solid var(--inner-border-color,#e2e8f0);padding:10px 12px;vertical-align:top;box-sizing:border-box;position:relative;word-break:break-all!important;overflow-wrap:anywhere!important;line-height:1.5;max-width:0;overflow:hidden}.ProseMirror td table,.ProseMirror th table{margin:0!important;width:100%!important}.ProseMirror td>*,.ProseMirror th>*{margin-bottom:0!important}.ProseMirror td>p,.ProseMirror th>p{margin:0}.ProseMirror table[data-zebra=true] tbody tr:nth-child(2n) td{background-color:#f8fafc}.ProseMirror table td[data-background-color],.ProseMirror table th[data-background-color]{background-color:inherit}.ProseMirror td:hover{background-color:rgba(59,130,246,.02)}.ProseMirror th{font-weight:700;text-align:left;background-color:#f1f5f9}.ProseMirror .selectedCell{background-color:rgba(59,130,246,.1)!important;border:2px solid #3b82f6!important;z-index:10}.ProseMirror .selectedCell:after{z-index:2;content:"";position:absolute;left:0;right:0;top:0;bottom:0;background-color:rgba(59,130,246,.05);pointer-events:none}.ProseMirror .column-resize-handle{position:absolute;right:-2px;top:0;bottom:0;width:4px;background-color:#3b82f6;pointer-events:none;z-index:20;opacity:0;transition:opacity .2s}.ProseMirror table:hover .column-resize-handle{opacity:.4}.ProseMirror .column-resize-handle.active,.ProseMirror .column-resize-handle:hover{opacity:1;width:6px;right:-3px}.ProseMirror.resize-cursor{cursor:col-resize!important}.text-block-wrapper{transition:all .2s ease;cursor:text}.text-block-wrapper:hover{background-color:rgba(37,99,235,.02)}.text-block-wrapper.is-selected{box-shadow:0 0 0 2px rgba(37,99,235,.4);background-color:rgba(37,99,235,.03)}.group\/layout.ProseMirror-selectednode .ResizableNode-content,.group\/shape.ProseMirror-selectednode .ResizableNode-content,.group\/signature.ProseMirror-selectednode button{outline:2px solid #2563eb!important;outline-offset:1px}.ProseMirror.resize-cursor{cursor:ew-resize!important}.table-controls-btn{display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:8px;font-size:11px;font-weight:600;transition:all .2s}.ProseMirror img{max-width:100%;height:auto;display:block;margin:0 auto;border-radius:8px}.editor-zoom-controls{position:absolute;bottom:24px;left:24px;background:#fff;padding:8px 16px;border-radius:12px;gap:12px;box-shadow:var(--shadow-lg);z-index:1000}.editor-zoom-controls,.zoom-btn{display:flex;align-items:center;border:1px solid #e2e8f0}.zoom-btn{width:28px;height:28px;justify-content:center;border-radius:6px;background:#f8fafc;cursor:pointer;font-weight:700;color:#64748b}.zoom-btn:hover{background-color:#f1f5f9;color:#4f46e5}.signature-hotspot,[data-placeholder-type=signature],[data-type=signature-block]{display:inline-block;min-width:160px;min-height:70px;border:2px dashed rgba(43,174,126,.4)!important;background-color:rgba(43,174,126,.05)!important;border-radius:12px!important;position:relative!important;cursor:pointer!important;transition:all .3s ease!important;vertical-align:middle;overflow:hidden}.signature-hotspot:hover,[data-placeholder-type=signature]:hover,[data-type=signature-block]:hover{background-color:rgba(43,174,126,.1)!important;border-color:rgba(43,174,126,.8)!important;box-shadow:0 0 15px rgba(43,174,126,.1)}p:has([data-type=signature-block]){min-height:80px}@keyframes hotspot-pulse{0%{border-color:rgba(43,174,126,.4)}50%{border-color:rgba(43,174,126,.8)}to{border-color:rgba(43,174,126,.4)}}[data-type=signature-block]:not(:has(img)){animation:hotspot-pulse 2s ease-in-out infinite}.zoom-level{font-size:13px;font-weight:600;color:#475569;min-width:45px;text-align:center}.loading{display:flex;align-items:center;justify-content:center;height:100%;font-size:18px;color:#64748b}.thin-scrollbar::-webkit-scrollbar{height:4px;width:4px}.thin-scrollbar::-webkit-scrollbar-track{background:transparent}.thin-scrollbar::-webkit-scrollbar-thumb{background:#e2e8f0;border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb:hover{background:#cbd5e1}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}input[type=range]{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;cursor:pointer;width:100%}input[type=range]::-webkit-slider-runnable-track{background:#f1f5f9;height:4px;border-radius:2px}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;margin-top:-6px;background-color:#3b82f6;height:16px;width:16px;border-radius:50%;border:2px solid #fff;box-shadow:0 2px 4px rgba(0,0,0,.1);-webkit-transition:all .2s ease;transition:all .2s ease}input[type=range]:active::-webkit-slider-thumb{transform:scale(1.2);box-shadow:0 0 0 4px rgba(59,130,246,.2)}input[type=range]::-moz-range-track{background:#f1f5f9;height:4px;border-radius:2px}input[type=range]::-moz-range-thumb{background-color:#3b82f6;height:16px;width:16px;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.1);border:none}.signature-hotspot{border:2px dashed #10b981!important;background-color:rgba(16,185,129,.08)!important;border-radius:8px!important;transition:all .2s ease!important;cursor:pointer!important;position:relative!important;min-height:48px!important;display:flex!important;align-items:center!important;justify-content:center!important;overflow:visible!important;pointer-events:auto!important;z-index:40!important;box-shadow:0 4px 12px rgba(16,185,129,.1)}.signature-hotspot:hover{background-color:rgba(16,185,129,.15)!important;border-color:#059669!important;transform:translateY(-2px);box-shadow:0 8px 20px rgba(16,185,129,.2)}.signature-hotspot:after{content:"CLIQUEZ POUR SIGNER";position:absolute;bottom:-20px;left:50%;transform:translateX(-50%);font-size:8px;font-weight:800;color:#10b981;white-space:nowrap;opacity:0;transition:all .2s;letter-spacing:.1em}.signature-hotspot:hover:after{opacity:1;bottom:4px}.signature-hotspot.is-signed{border:none!important}.signature-hotspot.is-signed,.signature-hotspot.is-signed:hover{background-color:transparent!important;box-shadow:none!important;transform:none!important}.signature-hotspot.is-signed:after{display:none!important}.dark .ribbon-content,.dark .ribbon-tabs,.dark .tiptap-toolbar{background:#0f172a!important;border-color:#1e293b!important;color:#cbd5e1!important}.dark .ribbon-tab{color:#64748b}.dark .ribbon-tab:hover{background:hsla(0,0%,100%,.04);color:#cbd5e1}.dark .ribbon-tab.active{color:#4ade80;border-bottom-color:#4ade80;background:#0f172a}.dark .ribbon-group{border-color:#1e293b}.dark .ribbon-group:hover{background:hsla(0,0%,100%,.02)}.dark .tiptap-toolbar-btn{color:#94a3b8}.dark .tiptap-toolbar-btn:hover{background:#1e293b;color:#e2e8f0}.dark .tiptap-toolbar-btn.is-active{background:rgba(79,70,229,.3);color:#a5b4fc}.dark .tiptap-select{background:#1e293b;border-color:#334155;color:#e2e8f0}.dark .editor-property-panel{background:#0f172a!important;border-color:#1e293b!important;color:#e2e8f0!important}.dark .property-label{color:#475569}.dark .property-input{background:#1e293b;border-color:#334155;color:#e2e8f0}.dark .property-input:focus{background:#0f172a;border-color:#4f46e5}.dark .tiptap-content{background:transparent}.dark .tiptap-editor .page-node,.dark .zoom-wrapper .page-node{background:#fff!important;border-color:#334155!important}.dark .thin-scrollbar::-webkit-scrollbar-thumb{background:#334155}.dark .thin-scrollbar::-webkit-scrollbar-thumb:hover{background:#475569}.dark .editor-zoom-controls{background:#0f172a;border-color:#1e293b;color:#94a3b8}.dark .zoom-btn{background:#1e293b;border-color:#334155;color:#94a3b8}.dark .zoom-btn:hover{background:#334155;color:#4ade80}.dark .zoom-level{color:#94a3b8}