{{ define "main" }}
<div class="gradient-bg py-12 md:py-16 lg:py-24">
    <div class="container mx-auto px-4 sm:px-6 lg:px-8">
        <div class="max-w-3xl mx-auto text-center">
            <div class="flex justify-center space-x-2 mb-6">
                {{ with .Params.categories }}
                    {{ range first 2 . }}
                        <a href="/{{ . | anchorize }}"><span class="bg-blue-100 text-blue-800 text-sm font-medium px-3 py-1 rounded-full">{{ . }}</span></a>
                        
                    {{ end }}
                {{ end }}
            </div>
            <h1 class="text-4xl md:text-5xl font-bold text-gray-900 mb-6">{{ .Title }}</h1>
            <div class="flex items-center justify-center space-x-4 text-gray-600">
                <div class="flex items-center">
                    <a href="/author/{{ .Params.author | urlize }}" class="text-blue-600 hover:text-blue-800 underline decoration-blue-600 hover:decoration-blue-800 transition-colors">{{ .Params.author | default "Auteur" }}</a>
                </div>
                <span>•</span>
                <span>{{ .Date.Format "2 janvier 2006" }}</span>
                <span>•</span>
                <span>{{ .ReadingTime }} min de lecture</span>
            </div>
        </div>
    </div>
</div>

<!-- Article Content -->
<article class="py-12 md:py-16">
    <div class="container mx-auto px-4 sm:px-6 lg:px-8">
        <div class="max-w-3xl mx-auto">
            {{ if .Params.featured_image }}
                <img src="{{ .Params.featured_image }}" alt="{{ .Title }}" class="w-full h-auto rounded-lg mb-8">
            {{ end }}
            <div class="prose">
                {{ .Content }}
            </div>
        </div>
    </div>
</article>

<!-- Author Bio -->
<div class="py-12 bg-gray-50">
    <div class="container mx-auto px-4 sm:px-6 lg:px-8">
        <div class="max-w-3xl mx-auto">
            <div class="flex items-start space-x-6">
                <div>
                    <span class="text-2xl">Article rédigé par {{ .Params.author | default "Auteur" }}</span>
                </div>
            </div>
        </div>
    </div>
</div>


{{ end }}
