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),p=a.i(54607);let q={plot:{labelKey:"ideaboard.cat_plot",color:"bg-rose-100 text-rose-800 border-rose-200",icon:k.Lightbulb},character:{labelKey:"ideaboard.cat_char",color:"bg-blue-100 text-blue-800 border-blue-200",icon:l},research:{labelKey:"ideaboard.cat_research",color:"bg-amber-100 text-amber-800 border-amber-200",icon:l},todo:{labelKey:"ideaboard.cat_todo",color:"bg-slate-100 text-slate-800 border-slate-200",icon:h}},r={todo:"ideaboard.stat_todo",progress:"ideaboard.stat_prog",done:"ideaboard.stat_done"},s=({ideas:a,onUpdate:f})=>{let{t:l}=(0,p.useLanguage)(),[s,t]=(0,c.useState)(""),[u,v]=(0,c.useState)("plot"),[w,x]=(0,c.useState)(null),[y,z]=(0,c.useState)(null),A=b=>{confirm(l("ideaboard.delete")+" ?")&&(f(a.filter(a=>a.id!==b)),y?.id===b&&z(null))},B=a=>{z({title:"",description:"",category:"plot",status:a})},C=a=>{z({...a})},D=a=>{a.preventDefault(),a.dataTransfer.dropEffect="move"},E=({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:D,onDrop:b=>{b.preventDefault(),w&&(f(a.map(a=>a.id===w?{...a,status:e}:a)),x(null))},onDoubleClick:()=>B(e),title:l("ideaboard.empty_desc"),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(),B(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=>{x(a.id),b.dataTransfer.effectAllowed="move"},onDoubleClick:b=>{b.stopPropagation(),C(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 ${q[a.category].color}`,children:l(q[a.category].labelKey)}),(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(),C(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(),A(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("fr-FR")]}),(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:l("ideaboard.empty")}),(0,b.jsx)("span",{className:"text-xs opacity-70",children:l("ideaboard.empty_desc")})]})]})]})};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"})," ",l("ideaboard.title")]}),(0,b.jsx)("p",{className:"text-theme-muted text-sm",children:l("ideaboard.desc")})]}),(0,b.jsxs)("form",{onSubmit:b=>{b.preventDefault(),s.trim()&&(f([...a,{id:`idea-${Date.now()}`,title:s,description:"",category:u,status:"todo",createdAt:Date.now()}]),t(""))},className:"flex-1 w-full md:w-auto max-w-2xl flex gap-2",children:[(0,b.jsx)("select",{value:u,onChange:a=>v(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(q).map(([a,c])=>(0,b.jsx)("option",{value:a,children:l(c.labelKey)},a))}),(0,b.jsx)("input",{type:"text",value:s,onChange:a=>t(a.target.value),placeholder:l("ideaboard.add_idea"),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:!s.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)(E,{title:l("ideaboard.stat_todo"),status:"todo",icon:i}),(0,b.jsx)(E,{title:l("ideaboard.stat_prog"),status:"progress",icon:j.Clock}),(0,b.jsx)(E,{title:l("ideaboard.stat_done"),status:"done",icon:h})]}),y&&(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:[y.id?(0,b.jsx)(n.Edit3,{size:18}):(0,b.jsx)(d.Plus,{size:18}),y.id?l("ideaboard.edit_card"):l("ideaboard.add_card")]}),(0,b.jsx)("button",{onClick:()=>z(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:l("ideaboard.title_label")}),(0,b.jsx)("input",{type:"text",value:y.title,onChange:a=>z({...y,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:l("ideaboard.add_idea"),autoFocus:!0})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"block text-xs font-bold text-theme-muted uppercase mb-1",children:l("ideaboard.desc_label")}),(0,b.jsx)("textarea",{value:y.description,onChange:a=>z({...y,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 ${(y.description?.length||0)>=500?"text-red-500 font-bold":(y.description?.length||0)>450?"text-orange-500":"text-slate-400"}`,children:[y.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:l("ideaboard.cat_label")}),(0,b.jsx)("select",{value:y.category,onChange:a=>z({...y,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(q).map(([a,c])=>(0,b.jsx)("option",{value:a,children:l(c.labelKey)},a))})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"block text-xs font-bold text-theme-muted uppercase mb-1",children:l("ideaboard.stat_label")}),(0,b.jsx)("select",{value:y.status,onChange:a=>z({...y,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(r).map(([a,c])=>(0,b.jsx)("option",{value:a,children:l(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:[y.id&&(0,b.jsx)("button",{onClick:()=>A(y.id),className:"mr-auto text-red-500 hover:text-red-700 text-sm font-medium px-3 py-2",children:l("ideaboard.delete")}),(0,b.jsx)("button",{onClick:()=>z(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:l("ideaboard.cancel")}),(0,b.jsxs)("button",{onClick:()=>{y&&y.title?.trim()&&(y.id?f(a.map(a=>a.id===y.id?{...a,...y}:a)):f([...a,{id:`idea-${Date.now()}`,title:y.title||"",description:y.description||"",category:y.category||"plot",status:y.status||"todo",createdAt:Date.now()}]),z(null))},disabled:!y.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})," ",l("ideaboard.save")]})]})]})})]})};var t=a.i(46344);function u(){let{project:a,updateProject:c}=(0,t.useProjectContext)();return(0,b.jsx)(s,{ideas:a.ideas||[],onUpdate:a=>c({ideas:a})})}a.s(["default",()=>u],71549)}]; //# sourceMappingURL=Documents_00%20-%20projet_plumeia_834a77e3._.js.map