@cTpl>
<#-- ============ SEARCH HERO ============ -->
<@cContainer type='fluid' class='search-header border-bottom border-1 border-light'>
<#if results_list?? && results_list?size gt 0>
<#assign breadcrumbItems = [{ 'title': '#i18n{portal.search.search_results.pathLabel}', 'url': 'jsp/site/Portal.jsp?page=search' },{ 'title': '#i18n{portal.search.search_results.title}', 'url': 'jsp/site/Portal.jsp?page=search&query=${query!}'}]>
<@cBlock class='d-md-flex justify-content-between align-items-center'>
<@cBreadCrumb home='Home' items=breadcrumbItems listClass='ms-md-m' />
<@cBlock class='result-stats'>
<@cInline><@cInline type='strong'>${paginator.itemsCount} ${'#i18n{portal.search.search_results.labelResultsRange}'?lower_case}@cInline> #i18n{portal.search.search_results.labelResultsFor}@cInline> <@cBadge label='${query}' />
@cBlock>
@cBlock>
<#else>
<#assign breadcrumbItems = [{ 'title': '#i18n{portal.search.search_results.pathLabel}', 'url': 'jsp/site/Portal.jsp?page=search' }]>
<@cBreadCrumb home='Home' items=breadcrumbItems />
#if>
@cContainer>
<@cForm action='jsp/site/Portal.jsp' role='search'>
<@cSection class='search-hero'>
<@cContainer class='search-hero__inner'>
<@cInline class='search-hero__kicker'>Recherche globale@cInline>
<@cTitle level=2 class='h1' params='hidden'>Tous les services de votre collectivité, en un seul endroit@cTitle>
<@cText class='search-hero__sub' params='hidden'>Démarches, rendez-vous, documents, actualités, contacts — tapez ce que vous cherchez, nous trouvons le reste.@cText>
<@cBlock class='search-bar'>
<@cBlock class='search-box'>
<@cInput type='hidden' name='page' value='search' class='' />
<@cInput type='search' id='q' name='query' value='${query!}' autocomplete='off' placeholder='Démarche, rendez-vous, contact, document…' />
<@cBtn type='button' noclass=true class='search-box__clear' label='' params=' aria-label="Effacer"'>
@cBtn>
<@cBtn type='submit' label='#i18n{portal.search.search_results.buttonSearch}' />
@cBlock>
@cBlock>
@cContainer>
@cSection>
<#-- ============ CONTENT ============ -->
<@cContainer class='search-body'>
<@cBlock class='layout'>
<#-- ====== FILTERS ====== -->
<@cBlock type='aside' class='filter-panel' params='aria-label="Filtres"'>
<@cBlock class='filter-panel__head'>
<@cInline>Affiner@cInline>
<@cBtn type='button' noclass=true class='filter-reset' label='Tout effacer' />
@cBlock>
<@cBlock class='filter-group'>
<@cBlock class='filter-group-title'>Type de contenu@cBlock>
<#if type_filter != "none">
<#-- type_filter -->
<@cLabel for='type_filter' label='#i18n{portal.search.search_results.typeFilter}' />
<#if type_filter == "option">
<@cSelect id='type_filter' name='type_filter'>
<#list list_type_and_link as map>
<#assign optLabel><#if map_index != 0>${map.type}<#else>#i18n{portal.search.search_results.typeFilterNone}#if>#assign>
<@cOption value=map.type! label=optLabel selected=(selected_types![])?seq_contains(map.type) />
#list>
@cSelect>
<#else>
<#list list_type_and_link as map>
<#if type_filter != "checkbox" || map_index != 0>
<#assign tfLabel><#if map_index != 0>${map.type?lower_case?capitalize}<#else>#i18n{portal.search.search_results.typeFilterNone}#if>#assign>
<@cFormCheck type=type_filter! name='type_filter' value=map.type! labelClass='filter-check' checked=(selected_types![])?seq_contains(map.type) label=tfLabel />
#if>
#list>
#if>
#if>
<#-- default_operator and/or -->
<@cLabel for='default_operator' label='#i18n{portal.search.search_results.operator}' />
<@cSelect id='default_operator' name='default_operator' class='sort-select'>
<#list ["OR","AND"] as operator>
<@cOption value=operator! selected=(operator = default_operator) label='#i18n{portal.search.advanced_parameters.defaultOperator.${operator?upper_case}}' />
#list>
@cSelect>
@cBlock>
<#if taglist?has_content>
<#if tag_filter == "1" && taglist?trim != ''>
<@cBlock class='filter-group'>
<@cBlock class='filter-group-title'>Tags@cBlock>
<#-- tag_filter -->
<#list taglist?split(" ") as tag>
<#if tag?? && tag?trim != ''>
<@cFormCheck type='checkbox' checked=true labelClass='filter-check' label='${tag?lower_case?capitalize}' />
#if>
#list>
@cBlock>
#if>
#if>
<#if date_filter == '1'>
<#-- date_filter 0/1 -->
<@cBlock class='filter-group'>
<@cBlock class='filter-group-title'>Mise à jour@cBlock>
<@cFormCheck type='radio' labelClass='filter-check' id='filter-seven' name='datefilter' value='seven' checked=(selected_datefilter!'') == 'seven' label='7 derniers jours' />
<@cFormCheck type="radio" labelClass='filter-check' id="filter-month" name="datefilter" value="month" checked=(selected_datefilter!'') == 'month' label='Ce mois-ci' />
<@cFormCheck type="radio" labelClass='filter-check' id="filter-year" name="datefilter" value="year" checked=(selected_datefilter!'') == 'year' label='Cette année' />
<@cFormCheck type="radio" labelClass='filter-check' id="filter-all" name="datefilter" value="all" checked=(selected_datefilter!'') == 'all' label='Toutes dates' />
<@cFieldset id='date_filter' legend='#i18n{portal.search.search_results.dateFilter}' >
<@cField label='#i18n{portal.search.search_results.dateFilterAfter}' for='date_after'>
<@cInputDate name='date_after' label='#i18n{portal.search.search_results.dateFilterAfter}' value='${date_after_value!""}' format='${date_picker_format!"dd/mm/yyyy"}' showFormat='${date_picker_format!"dd/mm/yyyy"}' />
@cField>
<@cField label='#i18n{portal.search.search_results.dateFilterBefore}' for='date_before' >
<@cInputDate name='date_before' label='#i18n{portal.search.search_results.dateFilterBefore}' value='${date_before_value!""}' format='${date_picker_format!"dd/mm/yyyy"}' showFormat='${date_picker_format!"dd/mm/yyyy"}' />
@cField>
@cFieldset>
@cBlock>
#if>
@cBlock>
<@cSection class='results-col'>
<#-- Toolbar -->
<@cBlock class='toolbar'>
<#if query?? && query?trim != ''>
<@cBlock class='toolbar__right ms-auto'>
<@cBlock type='label' params='style="display:flex;align-items:center;gap:8px;"'>
<@cInline>Trier :@cInline>
<@cSelect name='sort' class='sort-select' params='aria-label="Trier par"'>
<@cOption value='relevance' label='Pertinence' />
<@cOption value='date' label='Date (récent)' />
<@cOption value='alpha' label='Alphabétique (A → Z)' />
<@cOption value='duration' label='Durée' />
@cSelect>
@cBlock>
<@cBlock class='view-toggle' params='role="group" aria-label="Affichage"'>
<@cBtn type='button' noclass=true class='' label='' params=' aria-pressed="true" aria-label="Vue liste" title="Vue liste" data-view="list"'>
@cBtn>
<@cBtn type='button' noclass=true class='' label='' params=' aria-pressed="false" aria-label="Vue grille" title="Vue grille" data-view="grid"'>
@cBtn>
@cBlock>
@cBlock>
#if>
@cBlock>
<#-- Results -->
<@cBlock class='results' id='results'>
<#if error?has_content><@cAlert title=error type='danger' />#if>
<#-- included sponsored links if available - might be null -->
${sponsoredlinks_set!}
<#if results_list??>
<#if results_list?size gt 0>
<@chList>
<#list results_list as result>
<#assign resultUrl = result.url! />
<#assign resultTitle = result.title! />
<#assign resultDescription = result.summary! />
<@chItem>
<@cLink href=resultUrl class='result-card' label=''>
<@cBlock class='result-card__icon result-card__icon--coral'>
@cBlock>
<@cBlock>
<@cBlock class='result-card__meta'>
<@cInline class='badge'>${result.type!}@cInline>
<@cInline type='small' class='mx-3'>${(result.date?date?string.short)!}@cInline>
@cBlock>
<@cTitle level=2 class='result-card__title'>${resultTitle}@cTitle>
<@cText class='result-card__desc'>${resultDescription}@cText>
<@cBlock class='result-card__crumb' params='hidden'>
<@cInline>Accueil@cInline>
<@cInline>Démarches@cInline>
<@cInline>Papiers d'identité@cInline>
<@cInline>Carte nationale d'identité@cInline>
@cBlock>
@cBlock>
<@cInline class='result-card__arrow' params='aria-hidden="true"'>
@cInline>
@cLink>
@chItem>
#list>
@chList>
<#else>
<#if query?? && query?trim != ''>
<@cEmpty title='#i18n{portal.search.search_results.labelNoResult}' subtitle='#i18n{portal.search.search_results.labelTryOther}' />
<#else>
#if>
#if>
#if>
@cBlock>
<#if results_list??>
<#if results_list?size gt 0>
<@cBlock class='mt-m'>
<@cPagination paginator=paginator class='mb-0' />
<@cText class='mb-0'>#i18n{portal.search.search_results.labelResultsCount} : <@cInline type='strong'>${paginator.itemsCount}@cInline> #i18n{portal.search.search_results.labelResultsRange} : <@cInline type='strong'>${paginator.rangeMin} - ${paginator.rangeMax}@cInline>@cText>
@cBlock>
#if>
#if>
@cSection>
@cBlock>
@cContainer>
@cForm>
<@cSearchSetResultPageTitle />
@cTpl>