{% extends "clairvia/base.html" %}
{% block page %}results{% endblock %}
{%- from "clairvia/_ai.html" import ai_marker, ai_mention with context %}
{% block meta %}{% endblock %}
{% block feeds %}{% if feed_url %}{% endif %}{% endblock %}
{#- Ce que la page dit d'elle-meme, a l'oreille (RGAA 8.6, 7.5) : nombre de resultats et moteurs muets,
dans le titre (lu en premier, meme sans script) et dans l'annonce du lecteur d'ecran (clairvia.js). #}
{%- set a11y_state = (t('partial_title') if results else t('down_title')) if engines_down else (t('fam_title') if family_on else (t('sov_title') if sovereign_on else '')) %}
{%- set a11y_engines = [] %}
{%- for e in engines_down %}{% set _ = a11y_engines.append(e.name|title ~ ', ' ~ t('reason_' ~ e.reason) ~ (', ' ~ t('suspended') if e.suspended else '')) %}{% endfor %}
{%- set a11y_count = t('a11y_count', n=results|length) if results else t('no_results') %}
{% block title %}{{ q }} - {{ a11y_count }}{% if a11y_state %} - {{ a11y_state }}{% endif %} - Clairvia{% endblock %}
{% block header %}
{{ t('partial_d') if results else t('down_d') }}
{{ t('sov_banner_d') }}
{%- if sovereign_excluded %}{{ t('sov_not_asked', n=sovereign_excluded|length) }} {{ sovereign_excluded|map('title')|join(', ') }}
{%- endif %}{{ t('fam_banner_d') }}
{%- if family_excluded %}{{ t('fam_not_asked', n=family_excluded|length) }} {{ family_excluded|map('title')|join(', ') }}
{%- endif %} {%- if family_blocked %}{{ t('fam_blocked', n=family_blocked) }}
{%- endif %}{{ ic.icon('shield') }}{{ t('bang_relayed', bang='!!' ~ bang_relay.bang, engine=bang_relay.engine|title) }}
{%- endif %} {%- if summarize_url %}{{ ic.icon('summary') }}{{ t('sm_go') }} · {{ summarize_url|truncate(80, True) }}
{%- endif %} {%- if corrections %} {#- « vouliez-vous dire » (clairvia.spelling) : la correction en tete du vote des moteurs, qui la propose, qui l'a deja appliquee #} {%- set top = corrections[0] %}{{ t('did_you_mean') }} {%- for c in corrections %}{% if not loop.first %} {{ t('sp_or') }}{% endif %} {{ c.text }} {%- if c.engines %} {{ t('sp_by') }}{% for e in c.engines %} {{ e }}{% endfor %}{% endif %} {%- endfor %}
{%- if top.applied %}{{ t('sp_applied', engines=top.applied|map('title')|join(', ')) }}
{%- endif %}{{ tq.searched }}
{%- if tq.status in ('untranslated', 'unavailable') %}{{ ic.icon('info') }}{{ t('tr_q_' ~ tq.status) }}
{%- endif %} {%- if tr.status in ('partial', 'rejected', 'unavailable') %}{{ ic.icon('info') }}{{ t('tr_r_' ~ tr.status) }}
{%- endif %}{%- if claim.opinion %}{#- Avis, pas fait (CDC) : seules des sources d'avis -- forum, satire -- la portent (answer.opinion_of). #} {{ ic.icon('chat' if claim.opinion == 'community' else 'info') }}{{ t('ans_opinion_' ~ claim.opinion) }} {%- endif %}{{ claim.text }}{% for c in claim.citations %}{{ c }}{% endfor %}
{%- if claim.evidence %} {#- Ce qui la soutient : le passage de chaque source citee, lu par le verrou (carte P2). #}{{ e.passage }}
{{ ic.icon('info') }}{{ t(key ~ turn.status) }}
{%- endif %} {%- endmacro %} {%- macro source_list(turn, prefix) %}{{ ic.icon('info') }}{{ t('fu_' ~ conv.status, max=conv.max_turns) }}
{%- endif %} {%- if conv and conv.history %}{{ ic.icon('chat') }}{{ conv.question }}
{%- if conv.query_status in ('rewritten', 'combined') %}{{ ic.icon('search') }}{{ t('fu_searched') }} {{ conv.searched }}
· {{ t('fu_q_' ~ conv.query_status) }}
{{ ic.icon('info') }}{{ t('fu_last', max=conv.max_turns) }}
{%- endif %}{{ step.query }}
{{ ic.icon('shield') }}{{ t('rs_cost', searches=rs.budget.searches, upstream=rs.budget.upstream) }}
{{ ic.icon('info') }}{{ t('rs_plan_' ~ rs.plan.status) }}
{%- elif rs.plan.refused %}{{ ic.icon('shield') }}{{ t('rs_plan_guarded', n=rs.plan.refused) }}
{%- endif %} {%- if rs.budget.status in ('instance', 'throttled', 'cap') %}{{ ic.icon('clock') }}{{ t('rs_budget_' ~ rs.budget.status, max=rs.budget.max_searches) }}
{%- endif %} {%- if rs.budget.spared and rs.budget.searches > 1 %}{{ ic.icon('shield') }}{{ t('rs_spared', engines=rs.budget.spared|map('title')|join(', ')) }}
{%- endif %} {{ answer_body(rs, 'rsource-', 'rs_') }} {%- if rs.sources %}{{ ic.icon('lock') }}{{ t('rs_note') }}
{{ ic.icon('alert') }}{{ t('rank_error') }}
{%- endif %} {%- if rank_off %} {%- set args = dict(page_args) %}{% set _ = args.pop('rank') %}{{ ic.icon('info') }}{{ t('rank_off') }} {{ t('rank_on') }}
{%- endif %} {%- if rank_blocked_n %}{{ ic.icon('ban') }}{{ t('rank_blocked', n=rank_blocked_n, sites=rank_blocked|map('first')|join(', ')) }} {{ t('rank_show_all') }} · {{ t('rank_manage') }}
{%- endif %} {%- if lens_id %} {%- set args = dict(page_args) %}{% set _ = args.pop('lens') %}{% set _ = args.pop('pageno', None) %}{{ ic.icon('lens') }}{{ t('rank_lens_on', lens=lens_name or t('lens_' ~ lens_id), n=rank_lensed) }} {{ t('rank_lens_off') }} {%- if lens_name %} · {{ t('lens_see') }}{% endif %}
{%- endif %} {%- if image_outcome %} {%- set args = dict(page_args) %}{% set _ = args.pop('pageno', None) %}{% for f in image_fields %}{% set _ = args.pop(f, None) %}{% endfor %} {%- if image_outcome.error %}{{ ic.icon('alert') }}{{ t('img_filter_error') }} {{ t('img_filter_off') }}
{%- else %} {%- set labels = [] %}{% for group, field in (('size', 'image_size'), ('layout', 'image_layout'), ('format', 'image_format'), ('license', 'image_license')) %}{% if image_filter.get(field) %}{% set _ = labels.append(image_label(group, image_filter[field])) %}{% endif %}{% endfor %}{{ ic.icon('image') }}{{ t('img_filter_on', filters=labels|join(', '), n=image_outcome.removed) }} {%- if image_outcome.unknown > image_outcome.unknown_license %} {{ t('img_filter_unknown', n=image_outcome.unknown - image_outcome.unknown_license) }}{% endif %} {%- if image_outcome.unknown_license %} {{ t('img_filter_unlicensed', n=image_outcome.unknown_license) }}{% endif %} {{ t('img_filter_local') }} {{ t('img_filter_off') }}
{%- endif %} {%- endif %} {%- if ops_outcome %} {#- Operateurs de la requete (clairvia.operators) tenus sur les resultats de tous les moteurs, apres la fusion. #} {%- set args = dict(page_args, ops='off') %}{% set _ = args.pop('pageno', None) %} {%- if ops_outcome.error %}{{ ic.icon('alert') }}{{ t('ops_error') }}
{%- else %}{{ ic.icon('target') }}{{ t('ops_on', ops=ops_written|join(' '), n=ops_outcome.removed, engines=ops_engines|map('title')|join(', ')) }} {%- if ops_outcome.unknown_type %} {{ t('ops_unknown', n=ops_outcome.unknown_type) }}{% endif %} {{ t('ops_show') }}
{%- endif %} {%- elif ops_off %} {%- set args = dict(page_args) %}{% set _ = args.pop('ops', None) %}{% set _ = args.pop('pageno', None) %}{{ ic.icon('target') }}{{ t('ops_unchecked') }} {{ t('ops_check') }}
{%- endif %} {%- if demoted_count %} {#- Declassement (clairvia.spam) : jamais un tri secret. Le motif est sur chaque resultat, la recherche sans declassement a un clic. #} {%- set args = dict(page_args, demote='off') %}{% set _ = args.pop('pageno', None) %}{{ ic.icon('lower') }}{{ t('demoted_on', n=demoted_count) }} {{ t('demoted_show') }}
{%- elif demote_off %} {%- set args = dict(page_args) %}{% set _ = args.pop('demote', None) %}{% set _ = args.pop('pageno', None) %}{{ ic.icon('lower') }}{{ t('demoted_off') }} {{ t('demoted_restore') }}
{%- endif %} {%- if time_skipped %}{{ ic.icon('clock') }}{{ t('time_skipped', engines=time_skipped|map('title')|join(', ')) }}
{%- endif %} {#- Rien de tiers charge ici (lecteur, fond de carte) : dit en tete si le premier resultat est concerne, sinon juste avant le premier qui l'est (clairvia.ui.privacy_note). #} {%- macro privacy_notice() %}{{ ic.icon('shield') }}{{ t(privacy ~ '_private') }}
{%- endmacro %} {%- if privacy and not privacy_at %}{{ privacy_notice() }}{% endif %} {%- for a in answers %} {%- if a.kind == 'weather' %}{{ a.message }}
{%- else %} {%- if a.question %}{{ a.question }}
{% endif %}{{ a.value }}
{{ a.sky }}
{% for d in a.details %}{{ d }}{% endfor %}{% if a.wind %}{% if a.wind_to %}{{ ic.icon('arrow', 'wind-' ~ a.wind_to) }}{% endif %}{{ a.wind }}{% endif %}
{%- if a.hours %}{{ ic.icon('shield') }}{{ a.note }}
{{ a.question }}
{% endif %} {#- LA TAILLE DEPEND DE LA LONGUEUR, et c'est tout l'objet de cette classe. `instant-value` est calibre pour une reponse COURTE -- un calcul, une temperature, un taux : on la lit d'un coup d'oeil, et le grand corps est son interet. Applique a un paragraphe encyclopedique, il devient un mur qui ecrase les resultats en dessous (porteur, 2026-09-28 : << c'est peut etre ecrit un peu gros >>). Le seuil separe une REPONSE d'une PROSE : au-dela de deux lignes, ce n'est plus un chiffre qu'on saisit, c'est un texte qu'on lit. Deux lignes sur le plus petit telephone, pas sur un ecran de bureau : il est decide par `clairvia.ui.instant.prose` (`GLANCE`). -#}{{ a.value }}
{#- Mode traduction : comme un resultat traduit, l'original a cote, replie sur la ligne de la source -- c'est au-dessus du premier resultat que chaque ligne se paie sur telephone. -#} {%- set foot = 'div' if a.translation else 'p' %}{# details n'entre pas dans un p #} {%- if a.source or a.translation %}<{{ foot }} class="instant-source"> {%- if a.source %}{{ t('via') }} {{ a.source.name }}{% endif %} {%- if a.translation %}{{ a.translation.content }}
{% for d in a.details %}{{ d }}{% endfor %}
{% endif %} {%- if a.link %}{{ a.link.label }}{{ ic.icon('arrow', 'flip-rtl') }}
{% endif %} {%- if a.note %}{{ ic.icon('shield') }}{{ a.note }}
{% endif %}{{ t('disc_cap', k=disc_cap) }} · {{ t('disc_all') }}
{{ ic.icon('layers') }}{{ t('event_head', n=r.event.articles, s=r.event.sources|length) }}{% if r.event.sources %} · {{ r.event.sources|join(', ') }}{% endif %} {%- if r.event.sources|length == 1 %}{{ t('event_single') }}{% endif %}
{%- elif r.event %}{{ t('event_same') }}
{%- endif %} {%- if r.discussion and r.discussion.community %}{{ r.discussion.community }}
{%- endif %} {{ r.host }}{% for p in r.path %}/{{ p }}{% endfor %}{{ r.package }}
{{ ic.icon('alert') }}{{ t('sci_retracted') }} · {{ t('sci_retracted_d', by=t('sci_by_title') if r.retracted == 'title' else r.retracted) }}
{% endif %} {%- if r.content %}{{ r.content }}
{% endif %} {%- if r.code %}{% for n, line in r.code %}{{ n }}{{ line }}
{% endfor %}
{%- endif %}
{#- Lieux (clairvia.hours) : etat a l'heure du lieu et semaine, lus dans opening_hours ; illisible = valeur brute dans les faits #}
{%- if r.hours %}
{{ ic.icon('clock') }}{{ r.hours.label }}{% if r.hours.line %} · {{ r.hours.line }}{% endif %} {{ t('oh_by') }}
{{ t('oh_ph_note') }}
{% endif %}{%- for a in r.actions %} {{ ic.icon(a.icon) }}{{ a.label }} {%- endfor %}
{%- endif %} {#- Citer (clairvia.cite) : BibTeX (et RIS, CSL-JSON a telecharger) ecrit avec ce que les moteurs ont dit de l'article, sans appel de plus #} {%- if r.bibtex %}{{ t('cite_d') }}
{{ r.bibtex }}
{{ ic.icon('download') }}{{ t('cite_bib') }} {{ ic.icon('download') }}{{ t('cite_ris') }} {{ ic.icon('download') }}{{ t('cite_csl') }}
{{ r.translation.title }}
{%- if r.translation.content %}{{ r.translation.content }}
{% endif %}{{ t('via') }}{% for e, n in r.why.ranks %}{{ e }}{{ t('why_pos', rank=n) }}{% endfor %}
{%- else %}{{ t('via') }}{% for e in r.engines %}{{ e }}{% endfor %}
{%- endif %} {%- if r.summarize %} {{ ic.icon('summary') }}{{ t('sm_go') }} · {{ r.host }} {%- endif %} {%- if r.site and not rank_off %} {%- endif %}{{ r.why.sentence }}
{{ t('ops_empty_d', n=ops_outcome.removed) }}
{{ t('img_filter_empty_d', n=image_outcome.removed) }}
{{ t('fam_empty_d') }}
{{ t('sov_empty_d') }}
{{ t('no_results_d') }}
{{ ic.icon('feed') }}{{ t('follow') }} {{ t('follow_d') }}
{%- endif %} {%- if suggestions %} {%- endif %}