module.exports=[98205,a=>{"use strict";let b=(0,a.i(29892).default)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);a.s(["Save",()=>b],98205)},68565,a=>{"use strict";let b=(0,a.i(29892).default)("pen-line",[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);a.s(["Edit3",()=>b],68565)},49089,a=>{"use strict";let b=(0,a.i(29892).default)("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);a.s(["Clock",()=>b],49089)},71549,a=>{"use strict";var b=a.i(78352),c=a.i(28091),d=a.i(33782),e=a.i(40400),f=a.i(29892);let g=(0,f.default)("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]),h=(0,f.default)("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]),i=(0,f.default)("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);var j=a.i(49089),k=a.i(63287);let l=(0,f.default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);var m=a.i(46451),n=a.i(68565),o=a.i(98205);let p={plot:{label:"Intrigue",color:"bg-rose-100 text-rose-800 border-rose-200",icon:k.Lightbulb},character:{label:"Personnage",color:"bg-blue-100 text-blue-800 border-blue-200",icon:l},research:{label:"Recherche",color:"bg-amber-100 text-amber-800 border-amber-200",icon:l},todo:{label:"À faire",color:"bg-slate-100 text-slate-800 border-slate-200",icon:h}},q={todo:"Idées / À faire",progress:"En cours",done:"Terminé / Validé"},r=({ideas:a,onUpdate:f})=>{let[l,r]=(0,c.useState)(""),[s,t]=(0,c.useState)("plot"),[u,v]=(0,c.useState)(null),[w,x]=(0,c.useState)(null),y=b=>{confirm("Supprimer cette carte ?")&&(f(a.filter(a=>a.id!==b)),w?.id===b&&x(null))},z=a=>{x({title:"",description:"",category:"plot",status:a})},A=a=>{x({...a})},B=a=>{a.preventDefault(),a.dataTransfer.dropEffect="move"},C=({title:c,status:e,icon:h})=>{let i=a.filter(a=>a.status===e);return(0,b.jsxs)("div",{className:"flex-1 bg-theme-bg/50 rounded-xl border border-theme-border flex flex-col h-full overflow-hidden transition-colors hover:border-blue-300",onDragOver:B,onDrop:b=>{b.preventDefault(),u&&(f(a.map(a=>a.id===u?{...a,status:e}:a)),v(null))},onDoubleClick:()=>z(e),title:"Double-cliquez dans le vide pour ajouter une carte ici",children:[(0,b.jsxs)("div",{className:`p-4 border-b border-theme-border flex justify-between items-center transition-colors duration-300 ${"todo"===e?"bg-theme-bg":"progress"===e?"bg-indigo-500/10":"bg-green-500/10"}`,children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 font-bold text-theme-text",children:[(0,b.jsx)(h,{size:18}),c]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("button",{onClick:a=>{a.stopPropagation(),z(e)},className:"p-1 hover:bg-theme-panel rounded-full text-theme-muted hover:text-blue-600 transition-colors",children:(0,b.jsx)(d.Plus,{size:16})}),(0,b.jsx)("span",{className:"text-xs font-semibold bg-theme-panel px-2 py-1 rounded-full border border-theme-border text-theme-muted",children:i.length})]})]}),(0,b.jsxs)("div",{className:"flex-1 overflow-y-auto p-3 space-y-3 custom-scrollbar",children:[i.map(a=>{let c=a.description.length>300?a.description.substring(0,300)+"...":a.description;return(0,b.jsxs)("div",{draggable:!0,onDragStart:b=>{v(a.id),b.dataTransfer.effectAllowed="move"},onDoubleClick:b=>{b.stopPropagation(),A(a)},className:"bg-theme-panel p-3 rounded-lg shadow-sm border border-theme-border cursor-grab active:cursor-grabbing hover:shadow-md hover:border-blue-300 transition-all group relative animate-in zoom-in-95 duration-200",children:[(0,b.jsxs)("div",{className:"flex justify-between items-start mb-2",children:[(0,b.jsx)("span",{className:`text-[10px] uppercase font-bold px-2 py-0.5 rounded-full flex items-center gap-1 ${p[a.category].color}`,children:p[a.category].label}),(0,b.jsxs)("div",{className:"flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,b.jsx)("button",{onClick:b=>{b.stopPropagation(),A(a)},className:"text-slate-300 hover:text-blue-500",children:(0,b.jsx)(n.Edit3,{size:14})}),(0,b.jsx)("button",{onClick:b=>{b.stopPropagation(),y(a.id)},className:"text-slate-300 hover:text-red-500",children:(0,b.jsx)(m.Trash2,{size:14})})]})]}),(0,b.jsxs)("div",{className:"mb-2",children:[(0,b.jsx)("h4",{className:"font-bold text-theme-text text-sm mb-1 leading-tight",children:a.title}),a.description&&(0,b.jsx)("p",{className:"text-xs text-theme-muted line-clamp-3 leading-relaxed",title:a.description.length>300?"Description tronquée (voir détail)":void 0,children:c})]}),(0,b.jsxs)("div",{className:"flex justify-between items-center text-xs text-theme-muted border-t border-theme-border pt-2 mt-2 transition-colors duration-300",children:[(0,b.jsxs)("span",{className:"flex items-center gap-1",children:[(0,b.jsx)(j.Clock,{size:10})," ",new Date(a.createdAt).toLocaleDateString()]}),(0,b.jsx)(g,{size:14,className:"opacity-20"})]})]},a.id)}),0===i.length&&(0,b.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-slate-300 text-sm italic border-2 border-dashed border-indigo-200 rounded-lg m-1",children:[(0,b.jsx)("span",{className:"mb-2",children:"Vide"}),(0,b.jsx)("span",{className:"text-xs opacity-70",children:"Double-cliquez pour ajouter"})]})]})]})};return(0,b.jsxs)("div",{className:"flex flex-col h-full bg-theme-bg p-6 gap-6 relative transition-colors duration-300 -m-8",children:[(0,b.jsxs)("div",{className:"flex flex-col md:flex-row justify-between items-start md:items-center gap-4 bg-theme-panel p-4 rounded-xl border border-theme-border shadow-sm shrink-0 transition-colors duration-300",children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("h2",{className:"text-2xl font-bold text-theme-text flex items-center gap-2",children:[(0,b.jsx)(k.Lightbulb,{className:"text-yellow-500"})," Boîte à Idées"]}),(0,b.jsx)("p",{className:"text-theme-muted text-sm",children:"Organisez vos tâches, idées de scènes et recherches."})]}),(0,b.jsxs)("form",{onSubmit:b=>{b.preventDefault(),l.trim()&&(f([...a,{id:`idea-${Date.now()}`,title:l,description:"",category:s,status:"todo",createdAt:Date.now()}]),r(""))},className:"flex-1 w-full md:w-auto max-w-2xl flex gap-2",children:[(0,b.jsx)("select",{value:s,onChange:a=>t(a.target.value),className:"bg-theme-bg border border-theme-border text-theme-text text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 p-2.5 outline-none transition-colors duration-300",children:Object.entries(p).map(([a,c])=>(0,b.jsx)("option",{value:a,children:c.label},a))}),(0,b.jsx)("input",{type:"text",value:l,onChange:a=>r(a.target.value),placeholder:"Titre de la nouvelle idée...",className:"flex-1 bg-theme-bg border border-theme-border text-theme-text text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 p-2.5 outline-none font-medium transition-colors duration-300"}),(0,b.jsx)("button",{type:"submit",disabled:!l.trim(),className:"text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 disabled:opacity-50 transition-colors flex items-center gap-2",children:(0,b.jsx)(d.Plus,{size:18})})]})]}),(0,b.jsxs)("div",{className:"flex-1 grid grid-cols-1 md:grid-cols-3 gap-6 min-h-0",children:[(0,b.jsx)(C,{title:"Idées / À faire",status:"todo",icon:i}),(0,b.jsx)(C,{title:"En cours",status:"progress",icon:j.Clock}),(0,b.jsx)(C,{title:"Terminé",status:"done",icon:h})]}),w&&(0,b.jsx)("div",{className:"absolute inset-0 z-50 flex items-center justify-center bg-black/40 backdrop-blur-sm p-4 animate-in fade-in duration-200",children:(0,b.jsxs)("div",{className:"bg-theme-panel rounded-xl shadow-2xl w-full max-w-lg overflow-hidden flex flex-col max-h-[90%] transition-colors duration-300 border border-theme-border",children:[(0,b.jsxs)("div",{className:"bg-theme-bg border-b border-theme-border p-4 flex justify-between items-center",children:[(0,b.jsxs)("h3",{className:"font-bold text-theme-text flex items-center gap-2",children:[w.id?(0,b.jsx)(n.Edit3,{size:18}):(0,b.jsx)(d.Plus,{size:18}),w.id?"Éditer la carte":"Ajouter une carte"]}),(0,b.jsx)("button",{onClick:()=>x(null),className:"text-theme-muted hover:text-theme-text",children:(0,b.jsx)(e.X,{size:20})})]}),(0,b.jsxs)("div",{className:"p-6 space-y-4 overflow-y-auto",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"block text-xs font-bold text-theme-muted uppercase mb-1",children:"Titre"}),(0,b.jsx)("input",{type:"text",value:w.title,onChange:a=>x({...w,title:a.target.value}),className:"w-full p-3 bg-theme-bg border border-theme-border rounded-lg focus:ring-2 focus:ring-blue-500 outline-none font-bold text-theme-text transition-colors duration-300",placeholder:"Titre de la tâche ou de l'idée...",autoFocus:!0})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"block text-xs font-bold text-theme-muted uppercase mb-1",children:"Description"}),(0,b.jsx)("textarea",{value:w.description,onChange:a=>x({...w,description:a.target.value}),maxLength:500,className:"w-full p-3 bg-theme-bg border border-theme-border rounded-lg focus:ring-2 focus:ring-blue-500 outline-none min-h-[120px] text-sm text-theme-text leading-relaxed resize-none transition-colors duration-300",placeholder:"Détails, notes, liens..."}),(0,b.jsxs)("div",{className:`text-right text-xs mt-1 transition-colors ${(w.description?.length||0)>=500?"text-red-500 font-bold":(w.description?.length||0)>450?"text-orange-500":"text-slate-400"}`,children:[w.description?.length||0," / ",500," caractères"]})]}),(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"block text-xs font-bold text-theme-muted uppercase mb-1",children:"Catégorie"}),(0,b.jsx)("select",{value:w.category,onChange:a=>x({...w,category:a.target.value}),className:"w-full p-2 bg-theme-bg border border-theme-border rounded-lg text-theme-text text-sm outline-none focus:border-blue-500 transition-colors duration-300",children:Object.entries(p).map(([a,c])=>(0,b.jsx)("option",{value:a,children:c.label},a))})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"block text-xs font-bold text-theme-muted uppercase mb-1",children:"Statut"}),(0,b.jsx)("select",{value:w.status,onChange:a=>x({...w,status:a.target.value}),className:"w-full p-2 bg-theme-bg border border-theme-border rounded-lg text-theme-text text-sm outline-none focus:border-blue-500 transition-colors duration-300",children:Object.entries(q).map(([a,c])=>(0,b.jsx)("option",{value:a,children:c},a))})]})]})]}),(0,b.jsxs)("div",{className:"p-4 border-t border-theme-border bg-theme-bg flex justify-end gap-2 shrink-0 transition-colors duration-300",children:[w.id&&(0,b.jsx)("button",{onClick:()=>y(w.id),className:"mr-auto text-red-500 hover:text-red-700 text-sm font-medium px-3 py-2",children:"Supprimer"}),(0,b.jsx)("button",{onClick:()=>x(null),className:"px-4 py-2 text-theme-text hover:bg-theme-panel border border-transparent rounded-lg text-sm font-medium transition-colors duration-300",children:"Annuler"}),(0,b.jsxs)("button",{onClick:()=>{w&&w.title?.trim()&&(w.id?f(a.map(a=>a.id===w.id?{...a,...w}:a)):f([...a,{id:`idea-${Date.now()}`,title:w.title||"",description:w.description||"",category:w.category||"plot",status:w.status||"todo",createdAt:Date.now()}]),x(null))},disabled:!w.title?.trim(),className:"px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg text-sm font-medium shadow-sm disabled:opacity-50 flex items-center gap-2",children:[(0,b.jsx)(o.Save,{size:16})," Enregistrer"]})]})]})})]})};var s=a.i(46344);function t(){let{project:a,updateProject:c}=(0,s.useProjectContext)();return(0,b.jsx)(r,{ideas:a.ideas||[],onUpdate:a=>c({ideas:a})})}a.s(["default",()=>t],71549)}]; //# sourceMappingURL=Documents_00%20-%20projet_plumeia_834a77e3._.js.map