1import{u as H,j as e}from"./vendor-query-CnVJgDtS.js";import{c as Ie,u as Pe,d as Ee,r as o}from"./vendor-react-B9UTwVUJ.js";import{p as Fe}from"./purify.es-BKfhsMPj.js";import{s as c,u as Te,B as b,n as Re}from"./index-Cx49XYBu.js";import{L as T}from"./Layout-BZTG21Wl.js";import{S as ze}from"./SEO-DcvjisX6.js";import{B as j}from"./badge-CGmXKLhB.js";import{C as De}from"./card-CU6MTvUa.js";import{u as $e}from"./use-toast-tfTEdvO_.js";import{u as Oe}from"./useProfileManager-Iiiak9U-.js";import{P as Be,E as Me}from"./themes-wHKdMhXe.js";import{r as R}from"./utils-CS3tZPw8.js";import{S as He}from"./StoryCard-OkUHWRD0.js";import{u as Ue}from"./useStoryStats-cDJVnmvL.js";import{F as Ve}from"./FavoriteButton-DiPfbifw.js";import{S as se}from"./sparkles-Cy9dIcCr.js";import{L as Ke}from"./lock-C6qimmfF.js";import{A as L}from"./arrow-right-BIkgX-iq.js";import{E as Ge}from"./eye-RyZK6Udq.js";import{H as We}from"./heart-C8AYHbD8.js";import"./vendor-supabase-C6GHtIgE.js";import"./vendor-ui-KzfIh-gD.js";import"./sheet-DhRWtD2W.js";import"./dialog-BzZESAe8.js";import"./createLucideIcon-DcuJWPyU.js";import"./separator-BhN3qP2C.js";import"./engagementMilestones-Ox9hKC8e.js";import"./crown-Ulhw-YL6.js";import"./settings-k-fEU8RX.js";import"./animations-COR3hUgG.js";import"./index-CqtmjIGR.js";import"./StoryRatingBadge-C83DHpSO.js";import"./storyRatings-B5hbuQAP.js";import"./useStoryRatings-BAslRd3k.js";import"./triangle-alert-DFWs3IRB.js";const Qe=()=>{const{data:m=[]}=H({queryKey:["vote-stats"],queryFn:async()=>{const{data:p,error:d}=await c.rpc("get_story_vote_stats");if(d)throw d;return(p||[]).map(n=>({story_id:n.story_id,total_votes:Number(n.total_votes),likes_count:Number(n.likes_count),like_percentage:Number(n.like_percentage)}))},staleTime:3e5});return{voteStats:m,getVoteStats:p=>m.find(n=>n.story_id===p)||null}},Ye=[...Be,...Me],M=m=>(m||"").replace(/[\u{1F000}-\u{1F9FF}\u{2600}-\u{26FF}\u{2700}-\u{27BF}]/gu,"").replace(/[-_]/g," ").trim().toLowerCase(),ae=(m,u=!1)=>{const p=M(m),d=Ye.find(n=>{const f=M(n.name),N=M(n.id);return f===p||N===p||f.includes(p)||p.includes(f)||N.includes(p)||p.includes(N)});return d?u&&d.category==="educational"?d.name.replace(/[\u{1F000}-\u{1F9FF}\u{2600}-\u{26FF}\u{2700}-\u{27BF}]/gu,"").trim():d.name:m.split(/[-_\s]+/).map(n=>n.charAt(0).toUpperCase()+n.slice(1).toLowerCase()).join(" ")},Rt=()=>{const{slug:m}=Ie(),u=Pe(),p=Ee(),{toast:d}=$e(),{readerName:n,activeProfileId:f,activeProfileAgeRange:N}=Oe(),{getReadCount:re}=Ue(),{getVoteStats:ie}=Qe(),{subscribed:q,subscriptionEnd:U,availableCredits:Je,useCredit:Xe,ownedStoryIds:V,refreshOwnedStories:Ze,loading:et}=Te(),[s,ne]=o.useState(null),[le,K]=o.useState(!0),[h,G]=o.useState(null),[oe,z]=o.useState(!1),[D,ce]=o.useState(!1),[me,W]=o.useState(!1);o.useState(!1),o.useState(!1);const[Q,de]=o.useState([]),[Y,J]=o.useState(null);o.useEffect(()=>{if(!h||!q){J(null);return}c.from("credit_transactions").select("created_at").eq("user_id",h.id).eq("type","earned").order("created_at",{ascending:!1}).limit(1).maybeSingle().then(({data:a})=>J(a?.created_at??null))},[h,q]),(()=>{if(!q)return null;let a=null;if(Y){const r=new Date(Y);r.setMonth(r.getMonth()+1),a=r}else U&&(a=new Date(U));if(!a)return null;const t=Math.max(0,Math.ceil((a.getTime()-Date.now())/(1e3*60*60*24)));return{date:a,days:t}})();const{data:ue=!1}=H({queryKey:["storyNarrativeAudio",s?.id],queryFn:async()=>{if(!s?.id)return!1;const{data:a}=await c.from("sequences").select("id, audio_url").eq("story_id",s.id).not("audio_url","is",null);return(a||[]).some(t=>!!t.audio_url?.trim())},enabled:!!s?.id,staleTime:10*60*1e3});H({queryKey:["storyPackInfo",s?.id],queryFn:async()=>{if(!s?.id)return null;const{data:a}=await c.from("story_packs").select("id, name, pack_size, price_cents, story_ids").eq("is_active",!0);if(!a)return null;const t=a.find(r=>(r.story_ids||[]).includes(s.id));return t?{packId:t.id,packName:t.name,packSize:t.pack_size,priceCents:t.price_cents}:null},enabled:!!s?.id,staleTime:10*60*1e3}),o.useEffect(()=>{const{data:{subscription:a}}=c.auth.onAuthStateChange((t,r)=>{G(r?.user||null)});return c.auth.getSession().then(({data:t})=>{G(t.session?.user||null)}),()=>{a.unsubscribe()}},[]),o.useEffect(()=>{(async()=>
1{if(!h){z(!1);return}try{const{data:t}=await c.functions.invoke("check-subscription");z(t?.subscribed===!0)}catch{z(!1)}})()},[h]),o.useEffect(()=>{if(!h||!s){W(!1);return}W(V.includes(s.id))},[h,s,V]),o.useEffect(()=>{(async()=>{if(m){K(!0);try{let{data:t,error:r}=await c.from("stories").select("*").eq("slug",m).eq("is_draft",!1).maybeSingle();if(!t&&!r&&/prenom/i.test(m)){const l=m.replace(/prenom/gi,"capitaine-aventure"),{data:C,error:A}=await c.from("stories").select("*").eq("slug",l).eq("is_draft",!1).maybeSingle();t=C,r=A}if(!t&&!r){const{data:l,error:C}=await c.from("stories").select("*").eq("id",m).eq("is_draft",!1).maybeSingle();t=l,r=C}if(r)throw r;if(!t){d({title:"Histoire introuvable",description:"Cette histoire n'existe pas ou a été supprimée.",variant:"destructive"}),u("/bibliotheque");return}const be={id:t.id,title:t.name,description:t.description||"",coverImage:t.cover_image_url,ageRange:t.age_range||"7-9",themes:t.themes||[],fearLevel:t.fear_level||1,isGenerated:!1,createdAt:t.created_at,storyType:t.type||"gratuit",sequences:[],slug:t.slug,firstSequenceId:t.first_sequence,ambient_music_url:t.ambient_music_url};ne(be),ce(t.is_free_demo===!0);const{data:ve}=await c.from("read_stories").select("story_id").eq("user_id",f||""),S=new Set(ve?.map(l=>l.story_id)||[]),{data:ye}=await c.from("child_profiles").select("age_range").eq("id",f||"").maybeSingle(),E=ye?.age_range||N||t.age_range,F=["4-6","7-9","10-12","12-14","14+"],we=F.indexOf(E),{data:je}=await c.functions.invoke("check-subscription"),Ne=je?.subscribed===!0,_e=t.type==="premium",{data:Se}=await c.from("park_story_assignments").select("story_id"),ke=new Set((Se||[]).map(l
1=>l.story_id));let B=c.from("stories").select("*").eq("is_draft",!1).neq("id",t.id);_e&&!Ne&&(B=B.eq("type","gratuit"));const{data:Ce}=await B.limit(50),k=(Ce||[]).filter(l=>!(ke.has(l.id)&&!l.show_in_library||l.is_custom_story||(l.is_waiting_room||l.is_fabrikus_world)&&!l.show_in_library));if(k){const l=k.filter(i=>!S.has(i.id)&&i.age_range===E),C=k.filter(i=>{const w=F.indexOf(i.age_range);return!S.has(i.id)&&w<we&&w>=0}).sort((i,w)=>F.indexOf(w.age_range)-F.indexOf(i.age_range)),A=[...l,...C];let y=[];if(A.length>=3)y=A.slice(0,3);else{y=[...A];const i=k.filter(g=>S.has(g.id)&&g.age_range===E),w=k.filter(g=>S.has(g.id)&&g.age_range!==E),Le=[...i,...w];for(const g of Le){if(y.length>=3)break;y.find(qe=>qe.id===g.id)||y.push(g)}}const Ae=y.map(i=>({id:i.id,title:i.name,description:i.description||"",coverImage:i.cover_image_url,ageRange:i.age_range||"7-9",themes:i.themes||[],fearLevel:i.fear_level||1,isGenerated:!1,createdAt:i.created_at,storyType:i.type||"gratuit",sequences:[],slug:i.slug,isRead:S.has(i.id)}));de(Ae)}}catch{d({title:"Erreur",description:"Impossible de charger cette histoire.",variant:"destructive"})}finally{K(!1)}}})()},[m,u,d,f]);const[pe,X]=o.useState(!1),$=()=>{if(!s)return;const a=new URLSearchParams(p.search),t=a.toString()?`?${a.toString()}`:"",r=`/reader/${s.id}${t}`;u(Re(r))},I=async()=>{if(!s)return;const a=new URLSearchParams(p.search),t=a.toString()?`?${a.toString()}`:"";if(!h&&D){X(!0),await new Promise(r=>setTimeout(r,800)),u(`/reader/${s.id}${t}`);return}if(!h){d({title:"Connexion requise",description:"Créez un compte gratuit pour commencer cette aventure !"}),$();return}if(s.storyType==="verrouille"&&!f){d({title:"Profil requis",description:"Créez un profil enfant pour accéder à cette histoire."}),u("/profile?tab=children");return}X(!0),await new Promise(r=>setTimeout(r,800)),u(`/reader/${s.id}${t}`)};if(pe)return e.jsx(T,{children:e.jsxs("div",{className:"fixed inset-0 z-50 flex flex-col items-center justify-center bg-gradient-to-b from-primary/90 to-primary gap-6",children:[e.jsxs("div",{className:"relative",children:[e.jsx("span",{className:"text-7xl adventure-loading-bounce",style:{display:"inline-block"},children:"ð"}),e.jsx("span",{className:"absolute -top-4 -right-4 text-3xl adventure-loading-sparkle",children:"â¨"}),e.jsx("span",{className:"absolute -bottom-2 -left-4 text-2xl adventure-loading-sparkle",style:{animationDelay:"0.3s"},children:"â"}),e.jsx("span",{className:"absolute top-0 -left-6 text-xl adventure-loading-sparkle",style:{animationDelay:"0.6s"},children:"ð«"})]}),e.jsx("p",{className:"text-2xl md:text-3xl font-bold text-white animate-pulse drop-shadow-lg",children:"C'est parti pour l'aventure !"})]})});if(le)return e.jsx(T,{children:e.jsxs("div",{className:"fixed inset-0 z-50 flex flex-col items-center justify-center bg-gradient-to-b from-primary/90 to-primary gap-6",children:[e.jsxs("div",{className:"relative",children:[e.jsx("span",{className:"text-7xl adventure-loading-bounce",style:{display:"inline-block"},children:"ð"}),e.jsx("span",{className:"absolute -top-4 -right-4 text-3xl adventure-loading-sparkle",children:"â¨"}),e.jsx("span",{className:"absolute -bottom-2 -left-4 text-2xl adventure-loading-sparkle",style:{animationDelay:"0.3s"},children:"â"})]}),e.jsx("p",{className:"text-2xl md:text-3xl font-bold text-white animate-pulse drop-shadow-lg",children:"Chargement de l'aventure..."})]})});if(!s)return(document.querySelector('meta[name="robots"]')||(()=>{const t=document.createElement("meta");return t.setAttribute("name","robots"),document.head.appendChild(t),t})()).setAttribute("content","noindex, nofollow"),e.jsx(T,{children:e.jsxs("div",{className:"max-w-5xl mx-auto px-4 py-16 text-center",children:[e.jsx("h2",{className:"text-2xl font-bold mb-4",children:"Histoire introuvable"}),e.jsx("p",{className:"text-muted-foreground mb-6",children:"Cette histoire n'existe pas ou a été supprimée."}),e.jsx(b,{onClick:()=>u("/bibliotheque"),children:"Retour à la bibliothèque"})]})});const P=s.themes?.map(a=>ae(a))||[],xe=R(s.title,n),he=Fe.sanitize(R(s.description,n),{ALLOWED_TAGS:["b","i","em","strong","span","br"],ALLOWED_ATTR:["class"]}),_=s.storyType==="premium",Z=s.storyType==="verrouille",v=re(s.id),x=ie(s.id),ee=(()=>{const a=x?.like_percentage??0,t=x?.total_votes??0;return t>=5&&a>=90?`â¤ï¸ Préférée des familles â ${Math.round(a)} % de coups de cÅur`:t>=3&&a>=75?"â Coup de cÅur des abonnés":v>=20?`ð Déjà ${v} enfants ont vécu cette aventure`:null})(),fe=a=>
1a<=1?"Doux":a===2?"Modéré":"Palpitant",O=s.title.replace(/\{prenom\}/gi,"Capitaine Aventure"),te=s.slug?.replace(/-prenom/gi,"-capitaine-aventure")||s.slug,ge={"@context":"https://schema.org","@graph":[{"@type":"Book",name:O,description:s.description?.replace(/\{prenom\}/gi,"Capitaine Aventure").replace(/<[^>]*>/g,""),author:{"@type":"Organization",name:"Capitaine Aventure",url:"https://capitaineaventure.fr"},publisher:{"@type":"Organization",name:"Capitaine Aventure"},inLanguage:"fr",genre:["Interactive Fiction","Children's Literature","Educational",...P],audience:{"@type":"PeopleAudience",suggestedMinAge:parseInt(s.ageRange?.split("-")[0]||"7"),suggestedMaxAge:parseInt(s.ageRange?.split("-")[1]||s.ageRange?.replace("+","")||"9")},educationalUse:["reading comprehension","decision making","vocabulary development"],interactivityType:"active",learningResourceType:"interactive story",image:s.coverImage,url:`https://capitaineaventure.fr/histoires/${te}`,isAccessibleForFree:s.storyType==="gratuit",offers:s.storyType==="gratuit"?{"@type":"Offer",price:"0",priceCurrency:"EUR",availability:"https://schema.org/InStock"}:{"@type":"Offer",price:"3.99",priceCurrency:"EUR",availability:"https://schema.org/InStock",description:"Achat unitaire ou inclus dans l'abonnement à 3,99â¬/mois"},keywords:P.join(", "),typicalAgeRange:`${s.ageRange} ans`,aggregateRating:x?{"@type":"AggregateRating",ratingValue:x.like_percentage,ratingCount:x.total_votes,bestRating:100,worstRating:0}:void 0},{"@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Accueil",item:"https://capitaineaventure.fr/"},{"@type":"ListItem",position:2,name:"Bibliothèque",item:"https://capitaineaventure.fr/bibliotheque"},{"@type":"ListItem",position:3,name:O,item:`https://capitaineaventure.fr/histoires/${te}`}]}]};return e.jsxs(T,{children:[e.jsx(ze,{title:`${O} | Histoire Interactive pour Enfants | Capitaine Aventure`,description:`${s.description?.replace(/\{prenom\}/gi,"Capitaine Aventure").replace(/<[^>]*>/g,"").slice(0,150)}... Histoire interactive personnalisée pour enfants de ${s.ageRange} ans. Thèmes : ${P.join(", ")}.`,ogImage:s.coverImage||"https://storage.googleapis.com/gpt-engineer-file-uploads/uT648K3Ov3aFEExmDwNPq7OaDSK2/social-images/social-1762791481767-Capitaine%20aventure%20(1500%20x%201500%20px).jpg",keywords:`histoire interactive enfant, ${P.join(", ")}, aventure ${s.ageRange} ans, lecture personnalisée, histoire dont tu es le héros`,ogType:"article",structuredData:ge}),e.jsxs("div",{className:"relative w-full min-h-[100svh] -mt-20 flex flex-col justify-between",children:[e.jsxs("div",{className:"absolute inset-0 z-0",children:[e.jsx("img",{src:s.coverImage,alt:s.title,className:"w-full h-full object-cover object-top"}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-black/30 via-transparent to-black/60"})]}),e.jsxs("div",{className:"relative z-10 pt-24 md:pt-28 px-4 text-center text-white",children:[e.jsxs("div",{className:"flex flex-wrap justify-center items-center gap-3 mb-3",children:[_&&!oe&&e.jsxs(j,{className:"text-sm px-3 py-1.5 bg-amber-500/90 backdrop-blur-md text-white border-0",children:[e.jsx(se,{className:"w-3 h-3 mr-1"}),"Premium"]}),Z&&!_&&e.jsxs(j,{className:"text-sm px-3 py-1.5 bg-blue-500/90 backdrop-blur-md text-white border-0",children:[e.jsx(Ke,{className:"w-3 h-3 mr-1"}),"Inscription requise"]})]}),e.jsx("h1",{className:"text-2xl md:text-5xl font-bold text-white drop-shadow-2xl leading-tight max-w-3xl mx-auto",children:xe}),ee&&e.jsx("div",{className:"mt-3 flex justify-center",children:e.jsx("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-white/15 backdrop-blur-md border border-white/25 text-white text-xs md:text-sm px-3 py-1.5 font-semibold",children:ee})})]}),e.jsx("div",{className:"relative z-10 pb-8 md:pb-12 px-4",children:e.jsx("div",{className:"max-w-md mx-auto flex flex-col items-center gap-3",children:h?e.jsxs(e.Fragment,{children:[(_||Z)&&!me&&!D?e.jsx(e.Fragment,{children:q?e.jsxs(b,{size:"lg",onClick:I,className:"w-full relative text-base md:text-lg px-6 py-5 md:py-6 bg-gradient-to-r from-amber-500 via-yellow-500 to-amber-500 hover:from-amber-600 hover:via-yellow-600 hover:to-amber-600 shadow-2xl transform hover:scale-105 transition-all duration-200 overflow-hidden group rounded-2xl font-bold",children:[e.jsx("span",{className:"absolute inset-0 w-full h-full",children:e.jsx("span",{className:"absolute inset-0 w-1/3 h-full bg-gradient-to-r from-transparent via-white/40 to-transparent -translate-x-full animate-shimmer"})}),e.jsxs("span",{className:"relative z-10 flex items-center justify-center text-white font-bold",children:["ð Lire l'histoire",e.jsx(L,{className:"w-5 h-5 ml-2"})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs(b,{size:"lg",onClick:()=>u("/abonnement"),className:"w-full relative text-base md:text-lg px-6 py-5 md:py-6 bg-gradient-to-r from-amber-500 via-yellow-500 to-amber-500 hover:from-amber-600 hover:via-yellow-600 hover:to-amber-600 shadow-2xl transform hover:scale-105 transition-all duration-200 overflow-hidden group rounded-2xl font-bold",children:[e.jsx("span",{className:"absolute inset-0 w-full h-full",children:e.jsx("span",{className:"absolute inset-0 w-1/3 h-full bg-gradient-to-r from-transparent via-white/40 to-transparent -translate-x-full animate-shimmer"})}),e.jsxs("span",{className:"relative z-10 flex flex-col items-center justify-center text-white font-bold leading-tight",children:[e.jsx("span",{children:"⨠Débloquer toute l'aventure"}),e.jsx("span",{className:"text-[11px] font-normal text-white/85 mt-0.5",children:"3,99 â¬/mois ⢠Sans engagement"})]})]}),h&&_&&e.jsx(b,{size:"lg",variant:"outline",onClick:I,className:"w-full mt-3 text-base px-6 py-5 rounded-2xl bg-white/10 border-white/40 text-white hover:bg-white/20",children:"ð Commencer l'aperçu gratuit"}),e.jsx("p",{className:"text-[12px] text-white/80 text-center mt-2 mb-4",children:"Histoires illimitées ⢠Grand Voyage ⢠Atelier création ⢠8 profils enfants"})]})}):e.jsxs(b,{size:"lg",onClick:I,className:"w-full relative text-base md:text-lg px-6 py-5 md:py-6 bg-primary hover:bg-primary/90 shadow-2xl transform hover:scale-105 transition-all duration-200 overflow-hidden group shimmer-button rounded-2xl",children:[e.jsx("span",{className:"absolute inset-0 w-full h-full",children:e.jsx("span",{className:"absolute inset-0 w-1/3 h-full bg-gradient-to-r from-transparent via-white/40 to-transparent -translate-x-full animate-shimmer"})}),e.jsxs("span",{className:"relative z-10 flex items-center justify-center",children:[e.jsx("span",{className:"text-lg md:text-xl mr-2",children:"ð"}),"Commencer l'aventure",e.jsx(L,{className:"w-5 h-5 ml-2"})]})]}),e.jsx("button",{onClick:()=>u("/bibliotheque"),className:"text-white/60 hover:text-white/90 text-sm text-center transition-colors flex items-center justify-center gap-1.5",children:"ð Explorer les autres histoires"}),e.jsx(Ve,{storyId:s.id,profileId:f,size:"lg",variant:"icon",className:"!h-12 !w-12 bg-white/20 backdrop-blur-sm hover:bg-white/30 text-white"})]}):e.jsxs(e.Fragment,{children:[D?e.jsxs(b,{size:"lg",onClick:I,className:"w-full relative text-base md:text-lg px-6 py-5 md:py-6 bg-primary hover:bg-primary/90 shadow-2xl transform hover:scale-105 transition-all duration-200 overflow-hidden group shimmer-button rounded-2xl",children:[e.jsx("span",{className:"absolute inset-0 w-full h-full",children:e.jsx("span",{className:"absolute inset-0 w-1/3 h-full bg-gradient-to-r from-transparent via-white/40 to-transparent -translate-x-full animate-shimmer"})}),e.jsxs("span",{className:"relative z-10 flex items-center justify-center",children:[e.jsx("span",{className:"text-lg md:text-xl mr-2",children:"ð"}),"Commencer l'aventure",e.jsx(L,{className:"w-5 h-5 ml-2"})]})]}):_?e.jsxs(b,{size:"lg",onClick:$,className:"w-full h-auto min-h-[56px] relative text-sm sm:text-base md:text-lg px-3 sm:px-6 py-3 md:py-4 bg-gradient-to-r from-amber-500 via-yellow-500 to-amber-500 hover:from-amber-600 hover:via-yellow-600 hover:to-amber-600 shadow-2xl transform hover:scale-105 transition-all duration-200 overflow-hidden group rounded-2xl",children:[e.jsx("span",{className:"absolute inset-0 w-full h-full",children:e.jsx("span",{className:"absolute inset-0 w-1/3 h-full bg-gradient-to-r from-transparent via-white/40 to-transparent -translate-x-full animate-shimmer"})}),e.jsxs("span",{className:"relative z-10 flex w-full items-center justify-center gap-2 whitespace-normal text-center font-bold leading-tight text-white",children:[e.jsx("span",{className:"min-w-0",children:"Créer un compte gratuit et commencer cette histoire"}),e.jsx(L,{className:"h-5 w-5 shrink-0"})]})]}):e.jsxs(b,{size:"lg",onClick:$,className:"w-full h-auto min-h-[56px] relative text-sm sm:text-base md:text-lg px-3 sm:px-6 py-3 md:py-4 bg-primary hover:bg-primary/90 shadow-2xl transform hover:scale-105 transition-all duration-200 overflow-hidden group shimmer-button rounded-2xl",children:[e.jsx("span",{className:"absolute inset-0 w-full h-full",children:e.jsx("span",{className:"absolute inset-0 w-1/3 h-full bg-gradient-to-r from-transparent via-white/40 to-transparent -translate-x-full animate-shimmer"})}),e.jsxs("span",{className:"relative z-10 flex w-full items-center justify-center gap-2 whitespace-normal text-center leading-tight",children:[e.jsx("span",{className:"hidden shrink-0 text-lg sm:inline md:text-xl",children:"â¨"}),e.jsx("span",{className:"min-w-0",children:"Créer un compte gratuit et commencer cette histoire"}),e.jsx(L,{className:"h-5 w-5 shrink-0"})]})]}),e.jsx("button",{onClick:()=>u("/histoires-gratuites"),className:"text-white/60 hover:text-white/90 text-sm text-center transition-colors flex items-center justify-center gap-1.5",children:"ð Découvrir d'autres histoires"})]})})})]}),e.jsxs("div",{className:"max-w-5xl mx-auto px-4 py-16",children:[e.jsxs(De,{className:"p-6 md:p-8 mb-12 bg-card/50 backdrop-blur-sm border-2",children:[e.jsxs("h2",{className:"text-xl md:text-2xl font-bold mb-6 flex items-center justify-center gap-2 text-center",children:[e.jsx("span",{className:"text-xl md:text-2xl",children:"ð"}),"à propos de cette histoire interactive"]}),e.jsxs("div",{className:"flex flex-col items-center text-center space-y-4",children:[e.jsx("div",{className:"text-base md:text-lg leading-relaxed text-foreground max-w-2xl",dangerouslySetInnerHTML:{__html:he}}),e.jsxs("div",{className:"pt-4 border-t w-full",children:[e.jsx("h3",{className:"font-semibold mb-3 text-muted-foreground",children:"Durée estimée"}),e.jsx(j,{variant:"secondary",className:"text-sm",children:"â±ï¸ 10-15 minutes"})]}),e.jsxs("div",{className:"pt-4 border-t w-full",children:[e.jsx("h3",{className:"font-semibold mb-3 text-muted-foreground",children:"Niveau de frisson"}),e.jsxs(j,{variant:"secondary",className:"text-sm",children:["ð» ",fe(s.fearLevel)]})]}),(v>=100||x&&x.total_votes>=50)&&e.jsxs("div",{className:"flex flex-wrap justify-center gap-4 text-sm text-muted-foreground pt-2",children:[v>=100&&e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(Ge,{className:"w-4 h-4"}),e.jsxs("span",{children:[v," lecture",v>1?"s":""]})]}),x&&x.total_votes>=50&&e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(We,{className:"w-4 h-4 text-pink-500",fill:"currentColor"}),e.jsxs("span",{children:[x.like_percentage,"% conquis (",x.total_votes," vote",x.total_votes>1?"s":"",")"]})]})]}),e.jsxs("div",{className:"pt-4 border-t w-full",children:[e.jsx("h3",{className:"font-semibold mb-3 text-muted-foreground",children:"Thèmes abordés"}),e.jsx("div",{className:"flex flex-wrap justify-center gap-2",children:s.themes?.map((a,t)=>e.jsx(j,{variant:"secondary",className:"text-sm",children:ae(a,!0)},t))})]}),ue&&e.jsxs("div",{className:"pt-4 border-t w-full",children:[e.jsx("h3",{className:"font-semibold mb-3 text-muted-foreground",children:"ð§ Narration audio humaine"}),e.jsx(j,{className:"bg-emerald-600 text-white text-sm",children:"ð Audio disponible"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Cette histoire est racontée par Stéphanie, la maman créatrice du projet : une vraie voix humaine, chaleureuse et expressive !"})]})]})]}),Q.length>0&&e.jsxs("div",{children:[e.jsxs("h2",{className:"text-3xl font-bold mb-8 flex items-center gap-2",children:[e.jsx(se,{className:"w-8 h-8"}),"Autres histoires à découvrir"]}),e.jsx("div",{className:"grid md:grid-cols-3 gap-6",children:Q.map((a,t)=>{const r={...a,title:R(a.title,n),description:R(a.description,n)};return e.jsx(He,{story:r,index:t,activeProfileId:f||void 0},a.id)})})]})]})]})};export{Rt as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.