1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[713],{5765:(e,t,l)=>{"use strict";l.r(t),l.d(t,{__N_SSG:()=>d,default:()=>u});var r=l(7876),i=l(9099),a=l(4232),s=l(8725),n=l(7592);function o(e){let{actualites:t=[],types:l=[],allTypes:o=[],home:c=0}=e,[d,u]=(0,a.useState)(null),[x,f]=(0,a.useState)(!1),[m,h]=(0,a.useState)(!1),p=(0,a.useRef)(null),g=(0,a.useRef)(null),b=(0,a.useRef)(!0);(0,a.useEffect)(()=>{let e=()=>{h(window.innerWidth<1024)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);let v=(0,a.useMemo)(()=>{if(!d)return t;let e=String(d.id||d.tid||"");return t.filter(t=>{if(!t.field_tag)return!1;let l=null;if("string"==typeof t.field_tag)l=t.field_tag;else if(t.field_tag.id)l=String(t.field_tag.id);else if(t.field_tag.tid)l=String(t.field_tag.tid);else if(Array.isArray(t.field_tag)&&t.field_tag.length>0){let e=t.field_tag[0];l=String(e.id||e.tid||"")}return l===e})},[t,d]),{currentPage:y,renderPaginationBullets:w}=function(e,t,l){let s=Array.isArray(l)?l:[];(0,i.useRouter)();let[n,o]=(0,a.useState)(null),[c,d]=(0,a.useState)(null),[u,x]=(0,a.useState)(null),[f,m]=(0,a.useState)(null),[h,p]=(0,a.useState)(0);(0,a.useEffect)(()=>{o(g.current),d(b.current),x(v.current),m(y.current)},[]),(0,a.useEffect)(()=>{p(0)},[4]);let g=(0,a.useRef)(null),b=(0,a.useRef)(null),v=(0,a.useRef)(null),y=(0,a.useRef)(null),w=()=>{h>0&&p(h-1)},j=()=>{h<Math.ceil(s.length/4)-1&&p(h+1)};return{currentPage:h,renderPaginationBullets:()=>{let l=Math.ceil(s.length/t),i=h-Math.floor(2.5),a=h+Math.floor(2.5);i<0&&(i=0,a=e-1),a>=l&&(i=Math.max(0,(a=l-1)-e+1));let n=Array.from({length:a-i+1}).map((e,t)=>{let l=i+t;return(0,r.jsx)("div",{className:"cursor-pointer p-2 text-primary hover:scale-[1.2] rounded-full hover:text-primary ".concat(h===l?" font-bold ":""),onClick:()=>{p(l)},children:l+1},t)});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{className:"flex h-[37px] w-[37px] items-center justify-center transition-all duration-300 ease-out \n ".concat(0===h?"cursor-default text-primary opacity-25":"cursor-pointer text-secondary opacity-100 hover:scale-110 hover:rounded-full hover:bg-secondary hover:text-white hover:transition-all hover:ease-in"),onClick:w,children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"8.93",height:"18.761",viewBox:"0 0 8.93 18.761",stroke:"currentColor",children:(0,r.jsx)("path",{d:"M1090.5,610.13l7.885,9.294-7.885,8.81",transform:"translate(1099.049 628.568) rotate(180)","stroke-width":"1",fill:"none"})})}),n,(0,r.jsx)("button",{className:"flex h-[37px] w-[37px] items-center justify-center transition-all duration-300 ease-out \n ".concat(h===l-1?"cursor-default text-primary opacity-25":"cursor-pointer text-secondary opacity-100 hover:scale-110 hover:rounded-full hover:bg-secondary hover:text-white hover:transition-all hover:ease-in"),onClick:j,children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"8.93",height:"18.761",viewBox:"0 0 8.93 18.761",stroke:"currentColor",children:(0,r.jsx)("path",{id:"Trac\xe9_24","data-name":"Trac\xe9 24",d:"M1090.5,610.13l7.885,9.294-7.885,8.81",transform:"translate(-1090.119 -609.807)",fill:"none","stroke-width":"1"})})})]})}}}(5,4,v),j=(0,a.useMemo)(()=>{let e=4*y;return v.slice(e,e+4)},[v,y,4]);(0,a.useEffect)(()=>{if(b.current){b.current=!1;return}p.current&&p.current.scrollIntoView({behavior:"smooth",block:"start"})},[y]),(0,a.useEffect)(()=>{b.current=!0},[d]),(0,a.useEffect)(()=>{let e=e=>{g.current&&!g.current.contains(e.target)&&f(!1)};return x&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[x]);let _=e=>{u(e),f(!1)},N=(0,a.useMemo)(()=>[...l].sort(()=>Math.random()-.5).slice(0,6),[l]);return(0,r.jsxs)("div",{className:"w-full",children:[(0,r.jsxs)("div",{className:"relative z-50 py-6 mb-12 bg-ciel lg:flex lg:px-[5rem] 2xl:px-[10rem] lg:justify-between lg:items-center",children:[(0,r.jsx)("div",{className:"flex flex-wrap gap-2 px-10 mb-4 lg:mb-0",children:N.map(e=>{let t=String(e.id||e.tid||""),l=d?String(d.id||d.tid||""):"";return(0,r.jsx)("button",{type:"button",onClick:()=>{u(e===d?null:e)},className:"cursor-pointer px-4 py-2 rounded-2xl border text-[16px] transition-all ".concat(l&&t===l?"border-primary bg-primary text-white":"border-primary text-primary bg-transparent hover:bg-primary/10"),style:{color:e.color},children:e.name},e.id||e.tid)})}),(0,r.jsxs)("div",{ref:g,className:"relative z-[9999] left-1/2 -translate-x-1/2 w-full max-w-[80%] lg:left-auto lg:translate-x-0 lg:w-fit",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>f(!x),className:"flex justify-between items-center px-4 py-3 w-full text-white rounded-full border transition-colors cursor-pointer bg-primary focus:outline-none hover:bg-primary/90",children:[(0,r.jsx)("span",{className:"uppercase text-[14px] font-medium",children:d?d.name:"TOUTES LES RUBRIQUES"}),(0,r.jsx)(s.A,{className:"w-5 h-5 text-white transition-transform duration-200 ".concat(x?"rotate-180":"")})]}),x&&(0,r.jsxs)("div",{className:"absolute z-[10001] top-full left-0 w-full mt-2 bg-white rounded-lg shadow-lg border border-gray-200 max-h-[300px] overflow-y-auto",children:[(0,r.jsx)("button",{type:"button",onClick:()=>_(null),className:"w-full px-4 py-1 text-left hover:bg-gray-100 transition-colors ".concat(d?"":"bg-rouge/10 font-semibold"),children:(0,r.jsx)("span",{className:"uppercase text-[14px] text-primary",children:"TOUTES LES RUBRIQUES"})}),o.map(e=>{let t=String(e.id||e.tid||""),l=d?String(d.id||d.tid||""):"";return(0,r.jsx)("button",{type:"button",onClick:()=>_(e),className:"w-full px-4 py-1 text-left hover:bg-gray-100 transition-colors ".concat(l&&t===l?"bg-rouge/10 font-semibold":""),children:(0,r.jsx)("span",{className:"text-[14px] text-primary",children:e.name})},e.id||e.tid)})]})]})]}),(0,r.jsxs)("div",{ref:p,className:"px-4 lg:px-10",children:[0===j.length?(0,r.jsx)("div",{className:"py-12 text-center",children:(0,r.jsx)("p",{className:"text-primary text-[16px]",children:"Aucune actualit\xe9 trouv\xe9e pour cette rubrique"})}):(0,r.jsx)("div",{className:"flex flex-col gap-6 container mx-auto lg:mb-24 ".concat(0==c?"lg:grid lg:grid-cols-2 xl:grid-cols-3":"lg:grid lg:grid-cols-2 xl:grid-cols-2"),children:j.map(e=>(0,r.jsx)(n.A,{actu:e},e.id||e.uuid))}),v.length>4&&(0,r.jsx)("div",{className:"flex gap-2 justify-center items-center mt-8",children:w()})]})]})}var c=l(955),d=!0;function u(e){let{globals:t,home:l,types:i,pages:a}=e;return(0,r.jsxs)(c.A,{globals:t,title:"Actualit\xe9s - Reims Habitat",description:"D\xe9couvrez nos derni\xe8res actualit\xe9s",louer:!0,breadcrumbs:[{label:"Accueil",path:"/"},{label:"Actualit\xe9s",path:null}],image:a.homepage.field_medias[0].field_media_image,showBreadcrumbs:!0,children:[(0,r.jsx)("div",{className:"p-10",children:(0,r.jsx)("h1",{className:"text-[22px] font-semibold text-primary mb-2 lg:text-[40px] lg:text-center",children:"Actualit\xe9s"})}),(0,r.jsx)(o,{actualites:t.contenu.actualites||[],types:i||[],allTypes:i||[],home:l})," "]})}},7592:(e,t,l)=>{"use strict";l.d(t,{A:()=>c});var r=l(7876),i=l(7025),a=l(4587),s=l.n(a),n=l(1247),o=l(5555);function c(e){var t,l,a,c,d,u,x;let{actu:f}=e;(null==(l=f.field_tag)||null==(t=l.field_couleur)?void 0:t.color)||null==(a=f.field_tag)||a.field_couleur;let m=(null==(u=f.field_media)||null==(d=u.field_media_image)||null==(c=d.uri)?void 0:c.url)?(0,i.rf)(f.field_media.field_media_image.uri.url):null;return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{className:"md:col-span-1 h-[280px] rounded-3xl overflow-hidden relative group cursor-pointer",children:[m?(0,r.jsx)(s(),{src:m,alt:f.title||"Actualit\xe9",fill:!0,className:"object-cover transition-transform duration-500 group-hover:scale-110"}):(0,r.jsx)("div",{className:"w-full h-full bg-gray-300"}),(0,r.jsx)("div",{className:"absolute inset-0 bg-gradient-to-t to-transparent from-black/70"}),(0,r.jsx)("div",{className:"absolute right-6 bottom-6 left-6 transition-opacity duration-300 group-hover:opacity-0",children:(0,r.jsx)("h3",{className:"text-xl font-bold text-white",children:f.title})}),(0,r.jsx)("div",{className:"absolute inset-0 rounded-3xl opacity-0 transition-opacity duration-500 z-1 bg-primary group-hover:opacity-100"}),(0,r.jsxs)("div",{className:"flex absolute inset-0 z-20 flex-col p-6 transition-opacity duration-500 group-hover:opacity-100",children:[(0,r.jsxs)("div",{className:"flex relative z-10 flex-col h-full",children:[(0,r.jsxs)("div",{className:"flex justify-between items-start mb-4 w-full",children:[(0,r.jsx)("span",{className:"text-xs text-white opacity-80",children:f.field_date&&(0,r.jsx)(r.Fragment,{children:(()=>
1{if(!f.field_date)return"";let e=(0,i.Yq)(f.field_date);if(f.field_date_fin){let t=(0,i.Yq)(f.field_date_fin);return"".concat(e," - ").concat(t)}return e})()})}),f.field_tag&&(0,r.jsx)("span",{className:"self-end px-3 py-1 text-xs font-bold bg-white rounded-full text-brand-navy",children:f.field_tag.name})]}),(0,r.jsxs)("div",{className:"mt-auto opacity-0 group-hover:opacity-100",children:[f.field_lieu&&(0,r.jsx)("span",{className:"block mb-1 text-sm font-bold tracking-widest uppercase text-brand-blue",children:f.field_lieu}),(0,r.jsx)("h3",{className:"mb-4 text-2xl font-bold text-white",children:f.title}),f.field_description&&(0,r.jsx)(n.A,{value:(0,i.IN)(f.field_description.value||f.field_description,200),className:"mb-6 text-sm text-white opacity-90 line-clamp-3"}),(0,r.jsx)(o.A,{title:"En savoir plus",link:(null==(x=f.path)?void 0:x.alias)||"#",className:"text-white border-white hover:bg-white hover:text-primary"})]})]}),(0,r.jsx)("div",{className:"absolute -right-20 -bottom-20 w-64 h-64 rounded-full blur-3xl bg-blue-900/50"})]})]})})})}},7939:(e,t,l)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/actualites",function(){return l(5765)}])}},e=>{e.O(0,[599,304,636,593,792],()=>e(e.s=7939)),_N_E=e.O()}]);
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.