<?php
require 'config/database.php';

$cultes_content = <<<HTML
<div class="space-y-8">
    <p class="text-gray-600 text-lg">La commune de Kutzenhausen dispose de deux paroisses principales :</p>
    
    <div class="flex flex-col md:flex-row gap-6">
        <div class="flex-1 bg-white p-8 border border-gray-200 rounded-xl shadow-sm">
            <h3 class="text-2xl font-bold text-alsace-red mb-4">Paroisse Catholique</h3>
            <p class="mb-6 text-gray-600">Retrouvez toutes les informations de la paroisse catholique de Kutzenhausen.</p>
            <a href="https://paroisses-catholiques-ssf.com/index.php/kutzenhausen/" target="_blank" class="inline-flex items-center text-white bg-alsace-red hover:bg-red-800 font-bold py-3 px-6 rounded-lg transition">
                <i data-lucide="globe" class="w-5 h-5 mr-2"></i> Visiter le site catholique
            </a>
        </div>

        <div class="flex-1 bg-white p-8 border border-gray-200 rounded-xl shadow-sm">
            <h3 class="text-2xl font-bold text-alsace-red mb-4">Paroisse Protestante</h3>
            <p class="mb-6 text-gray-600">Retrouvez toutes les informations de la paroisse protestante du Soultzerland.</p>
            <a href="https://paroisses-soultzerland.fr/" target="_blank" class="inline-flex items-center text-white bg-alsace-red hover:bg-red-800 font-bold py-3 px-6 rounded-lg transition">
                <i data-lucide="globe" class="w-5 h-5 mr-2"></i> Visiter le site protestant
            </a>
        </div>
    </div>
</div>
HTML;

$stmt = $pdo->prepare("INSERT INTO pages (slug, title, content) VALUES ('cultes', 'Cultes et Paroisses', :content) ON DUPLICATE KEY UPDATE content=:content");
$stmt->execute(['content' => $cultes_content]);

echo "Cultes mis a jour\n";
?>
