{% extends 'base.html.twig' %}{% block title %}Actualités & Blog - WA BENIN{% endblock %}{% block body %}<div class="page-header" style="height: 35vh; min-height: 250px; margin-bottom: 40px;"><div class="container fade-up"><h1 class="page-title">Actualités</h1></div></div><section class="section-padding" style="padding-top: 0;"><div class="container"><div style="display: flex; gap: 40px; align-items: flex-start;"><!-- Main Content (Articles) --><div style="flex: 2;">{% if featured_article %}<!-- Article à la une --><div class="fade-up" style="background: #fff; border-radius: var(--border-radius); overflow: hidden; box-shadow: var(--shadow-soft); margin-bottom: 40px;"><div style="height: 400px; overflow: hidden;"><img src="{{ featured_article.image }}" alt="{{ featured_article.title }}" style="width: 100%; height: 100%; object-fit: cover; transition: var(--transition);"></div><div style="padding: 30px;"><span style="background: var(--gold); color: #fff; padding: 5px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: bold; text-transform: uppercase;">À la une</span><h2 style="margin: 15px 0; font-size: 2rem;">{{ featured_article.title }}</h2><div style="color: #888; font-size: 0.9rem; margin-bottom: 20px; display: flex; gap: 15px;"><span><i class="far fa-calendar-alt"></i> {{ featured_article.createdAt|date('d M Y') }}</span><span><i class="far fa-user"></i> Par {{ featured_article.author }}</span></div><p style="color: #555; margin-bottom: 20px; font-size: 1.1rem;">{{ featured_article.content|slice(0, 200) ~ '...' }}</p><a href="{{ path('app_article_show', {id: featured_article.id}) }}" class="btn btn-outline">Lire la suite</a></div></div>{% endif %}<!-- Grille d'articles --><div style="display: grid; grid-template-columns: 1fr 1fr; gap: 30px;">{% for article in articles %}<!-- Article --><div class="fade-up" style="background: #fff; border-radius: var(--border-radius); overflow: hidden; box-shadow: var(--shadow-soft);"><div style="height: 200px; overflow: hidden;"><img src="{{ article.image }}" alt="{{ article.title }}" style="width: 100%; height: 100%; object-fit: cover;"></div><div style="padding: 20px;"><span style="color: var(--green); font-size: 0.8rem; font-weight: bold; text-transform: uppercase;">{{ article.category }}</span><h3 style="margin: 10px 0; font-size: 1.3rem; line-height: 1.3;">{{ article.title }}</h3><p style="color: #666; font-size: 0.95rem; margin-bottom: 15px;">{{ article.content|slice(0, 100) ~ '...' }}</p><a href="{{ path('app_article_show', {id: article.id}) }}" style="color: var(--gold); font-weight: 600;">Lire l'article <i class="fas fa-arrow-right" style="font-size: 0.8rem; margin-left: 5px;"></i></a></div></div>{% else %}<p>Aucun article trouvé.</p>{% endfor %}</div><!-- Pagination -->{% if total_pages > 1 %}<div style="margin-top: 40px; display: flex; justify-content: center; gap: 10px;">{% for i in 1..total_pages %}<a href="{{ path('app_blog', {page: i, category: current_category}) }}" style="width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; {% if current_page == i %}background: var(--gold); color: #fff; border: none;{% else %}background: #fff; border: 1px solid #ddd; color: var(--black-dark);{% endif %} border-radius: 8px; font-weight: bold;">{{ i }}</a>{% endfor %}</div>{% endif %}</div><!-- Sidebar --><div style="flex: 1; max-width: 350px;"><!-- Recherche --><div style="background: #fff; padding: 25px; border-radius: var(--border-radius); box-shadow: var(--shadow-soft); margin-bottom: 30px;"><h4 style="margin-bottom: 15px; font-size: 1.2rem;">Recherche</h4><div style="position: relative;"><input type="text" placeholder="Mots-clés..." style="width: 100%; padding: 12px 15px; padding-right: 40px; border: 1px solid #ddd; border-radius: 8px; outline: none;"><i class="fas fa-search" style="position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: #888;"></i></div></div><!-- Catégories --><div style="background: #fff; padding: 25px; border-radius: var(--border-radius); box-shadow: var(--shadow-soft);"><h4 style="margin-bottom: 15px; font-size: 1.2rem;">Catégories</h4><ul style="list-style: none; padding: 0; margin: 0;"><li style="padding: 10px 0; border-bottom: 1px solid #eee;"><a href="{{ path('app_blog') }}" style="color: {% if not current_category %}var(--gold){% else %}#555{% endif %}; display: flex; justify-content: space-between; font-weight: {% if not current_category %}bold{% else %}normal{% endif %};">Toutes les catégories</a></li>{% for cat in categories %}<li style="padding: 10px 0; border-bottom: 1px solid #eee;"><a href="{{ path('app_blog', {category: cat}) }}" style="color: {% if current_category == cat %}var(--gold){% else %}#555{% endif %}; display: flex; justify-content: space-between; font-weight: {% if current_category == cat %}bold{% else %}normal{% endif %};">{{ cat }}</a></li>{% endfor %}</ul></div></div></div></div></section>{% endblock %}