{% extends 'base.html.twig' %} {% block title %}{{ 'detection.page_title'|trans({}, 'AiDetection') }} — Shamra Academia{% endblock %} {% block og_title %}{{ 'detection.page_title'|trans({}, 'AiDetection') }} — Shamra Academia{% endblock %} {% block og_description %}{{ 'detection.page_description'|trans({}, 'AiDetection') }}{% endblock %} {% block metaDescription %}{{ 'detection.page_description'|trans({}, 'AiDetection') }}{% endblock %} {% block metaKeywords %}كشف الذكاء الاصطناعي, فحص نسبة الذكاء الاصطناعي في النص, نسبة الاقتباس من الذكاء الاصطناعي, كشف نص الذكاء الاصطناعي, كشف المحتوى المولد, AI detection, AI text detector, AI content checker, شمرا أكاديميا, shamra academia{% endblock %} {% block stylesheets %} {{ parent() }} {% endblock %} {% block body %}
{# ── Hero ── #}

{{ 'detection.title'|trans({}, 'AiDetection') }}

{{ 'detection.subtitle'|trans({}, 'AiDetection') }}

{{ 'detection.badge_arabic'|trans({}, 'AiDetection') }} {{ 'detection.badge_stats'|trans({}, 'AiDetection') }} {{ 'detection.badge_corpus'|trans({}, 'AiDetection') }}
{% if app.request.locale == 'ar' %} شرح تقنيّ عن آلية عمل النموذج {% else %} Learn how our tool works {% endif %}
{# ── State 1: Visitor (not logged in) — show full UI with login overlay ── #} {% if not app.user %}
{{ 'detection.login_prompt'|trans({'%login_url%': path('app_login')}, 'AiDetection')|raw }}
{# Show disabled UI preview for visitors #}
{% elseif canAnalyze %} {# ── State 2 & 3: Logged in + subscribed, OR logged in + free toggle ON ── #} {% set credits = subscription ? subscription.availableCredits : 0 %} {% set tier = subscription ? subscription.tier : 'none' %} {% if isSubscribed %} {# Subscribed user: show credits bar #}
{{ 'detection.credits_available'|trans({}, 'AiDetection') }}: {{ credits }} {{ tier }}
{{ 'detection.cost_per_analysis'|trans({}, 'AiDetection') }}: 3 {{ 'detection.credits_unit'|trans({}, 'AiDetection') }}
{% else %} {# Non-subscribed + free toggle ON: show beta access badge #}
{{ 'detection.free_access_badge'|trans({}, 'AiDetection') }}
{{ 'detection.cost_per_analysis'|trans({}, 'AiDetection') }}: 3 {{ 'detection.credits_unit'|trans({}, 'AiDetection') }}
{% endif %} {# ── Alert box ── #}
{# ── Text input ── #}
{% else %} {# ── State 4: Logged in, NOT subscribed, toggle OFF → subscribe prompt ── #}
{{ 'detection.subscribe_prompt'|trans({'%subscribe_url%': path('shamra_academia_subscription')}, 'AiDetection')|raw }}
{# Show disabled UI preview #}
{% endif %} {# ── Results section ── #}
{# Score card #}
/ 100
{# Key signals #}

{{ 'detection.signals_title'|trans({}, 'AiDetection') }}

    {# Sentence analysis #}

    {{ 'detection.sentences_title'|trans({}, 'AiDetection') }}

    {# Baseline stats #}
    {{ 'detection.disclaimer'|trans({}, 'AiDetection') }}
    {% if app.user %} {# ── Feedback Nudge (bottom-center pill) ── #}
    {{ 'detection.feedback_nudge'|trans({}, 'AiDetection') }}
    {# ── Feedback Panel (slide-up card) ── #}

    {{ 'detection.feedback_prompt'|trans({}, 'AiDetection') }}

    {# Rating (1-5 stars) #}
    {{ 'detection.feedback_rating'|trans({}, 'AiDetection') }}
    {# NPS (1-10) #}
    {{ 'detection.feedback_recommend'|trans({}, 'AiDetection') }}
    {{ 'detection.feedback_recommend_unlikely'|trans({}, 'AiDetection') }} {{ 'detection.feedback_recommend_likely'|trans({}, 'AiDetection') }}
    {% for i in 1..10 %} {% endfor %}
    {# Comment #}
    {{ 'detection.feedback_comment'|trans({}, 'AiDetection') }}
    {% endif %} {% endblock %} {% block javascripts %} {{ parent() }} {% if app.user %} {% endif %} {% endblock %}