<script setup>
import { Head, Link } from '@inertiajs/vue3';

defineProps({
    canLogin: {
        type: Boolean,
    },
});
</script>

<template>
    <Head title="Recru IT" />
    
    <div class="min-h-screen bg-neutral text-anthracite font-sans overflow-x-hidden selection:bg-highlight selection:text-anthracite">
        
        <!-- Navigation -->
        <nav class="relative z-50 flex items-center justify-between px-6 py-8 md:px-12 max-w-7xl mx-auto">
            <div class="flex items-center gap-3 group cursor-default">
                <div class="w-12 h-12 bg-primary rounded-lg flex items-center justify-center shadow-lg shadow-primary/30 group-hover:scale-105 transition-transform duration-300">
                    <svg xmlns="http://www.w3.org/2000/svg" class="h-7 w-7 text-white" fill="none" viewBox="0 0 24 24" stroke="currentColor">
                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9l-.707.707M12 18v3m4.95-4.95l.707.707M12 3c-4.418 0-8 3.582-8 8 0 2.209.895 4.209 2.343 5.657L12 21l5.657-5.343A7.994 7.994 0 0020 11c0-4.418-3.582-8-8-8z" />
                    </svg>
                </div>
                <span class="text-3xl font-serif font-bold text-primary">RECRU<span class="text-accent italic px-1">IT</span></span>
            </div>
            
            <div class="flex items-center gap-4">
                <template v-if="$page.props.auth.user">
                    <Link :href="route('dashboard')" class="px-8 py-3 bg-highlight text-[#3a2800] rounded-lg font-subtitle font-bold text-sm hover:brightness-110 hover:shadow-xl hover:shadow-highlight/20 transition-all duration-300">
                        Accéder au Tableau de bord
                    </Link>
                </template>
                <template v-else>
                    <Link :href="route('login')" class="px-8 py-3 bg-highlight text-[#3a2800] rounded-lg font-subtitle font-bold text-sm hover:brightness-110 hover:-translate-y-0.5 hover:shadow-xl hover:shadow-highlight/20 transition-all duration-300">
                        Connexion
                    </Link>
                </template>
            </div>
        </nav>

        <!-- Fond Institutionnel Hero Section -->
        <main class="relative z-10 w-full mt-4">
            <div class="max-w-[95%] mx-auto bg-primary rounded-[2.5rem] overflow-hidden shadow-2xl relative px-8 py-20 pb-32 md:px-16 md:py-32">
                
                <!-- Graphic Elements -->
                <div class="absolute top-0 right-0 w-[50%] h-full bg-gradient-to-l from-sky/40 to-transparent pointer-events-none"></div>
                <div class="absolute -bottom-24 -left-24 w-96 h-96 bg-accent/20 rounded-full blur-[100px] pointer-events-none"></div>
                
                <div class="relative z-10 grid grid-cols-1 lg:grid-cols-2 gap-16 items-center">
                    
                    <!-- Hero Content -->
                    <div class="space-y-10 text-white">
                        <div class="inline-flex items-center gap-3 px-5 py-2.5 bg-white/10 backdrop-blur-md border border-white/20 rounded-full text-white text-sm font-subtitle font-bold uppercase tracking-widest shadow-inner">
                            <span class="relative flex h-3 w-3">
                                <span class="animate-ping absolute inline-flex h-full w-full rounded-full bg-highlight opacity-75"></span>
                                <span class="relative inline-flex rounded-full h-3 w-3 bg-highlight"></span>
                            </span>
                            Évaluation des candidats
                        </div>
                        
                        <h1 class="text-5xl md:text-7xl font-serif leading-[1.1] text-white">
                            Découvrez le potentiel de vos  <span class="text-highlight">futures équipes</span>.
                        </h1>

                        <p class="text-lg md:text-xl text-sand font-sans font-light max-w-xl leading-relaxed">
                            Recru.IT simplifie le processus d'évaluation. 
                            Générez des tests sur-mesure pour chaque poste et accédez à une analyse de compétences claire, précise et équitable.
                        </p>

                        <div class="flex flex-col sm:flex-row gap-4 pt-4">
                            <Link 
                                v-if="!$page.props.auth.user"
                                :href="route('login')" 
                                class="inline-flex items-center justify-center px-10 py-4 bg-highlight text-[#3a2800] rounded-xl font-subtitle font-bold uppercase tracking-wider text-sm hover:brightness-110 hover:-translate-y-1 hover:shadow-2xl hover:shadow-highlight/40 transition-all duration-300"
                            >
                                S'identifier
                            </Link>
                        </div>
                    </div>

                    <!-- Right illustration (abstract or UI mockup) -->
                    <div class="hidden lg:flex justify-end relative h-full">
                        <div class="w-full max-w-md bg-sand rounded-3xl p-8 shadow-2xl relative transform rotate-2 hover:rotate-0 transition-transform duration-500 border border-white/10">
                            <!-- Fake dashboard element -->
                            <div class="space-y-6">
                                <div class="flex justify-between items-center border-b border-anthracite/10 pb-4">
                                    <div class="h-6 w-32 bg-primary/20 rounded"></div>
                                    <div class="h-6 w-12 bg-accent/20 rounded-full"></div>
                                </div>
                                <div class="grid grid-cols-2 gap-4">
                                    <div class="h-24 bg-white rounded-xl shadow-sm border border-anthracite/5 p-4 flex flex-col justify-between">
                                        <div class="h-3 w-20 bg-neutral rounded"></div>
                                        <div class="h-8 w-16 bg-primary/10 rounded"></div>
                                    </div>
                                    <div class="h-24 bg-white rounded-xl shadow-sm border border-anthracite/5 p-4 flex flex-col justify-between">
                                        <div class="h-3 w-24 bg-neutral rounded"></div>
                                        <div class="h-8 w-full bg-highlight/20 rounded"></div>
                                    </div>
                                </div>
                                <div class="h-32 bg-white rounded-xl shadow-sm border border-anthracite/5 p-4 flex gap-4">
                                    <div class="w-16 h-16 bg-sky/20 rounded-full shrink-0"></div>
                                    <div class="flex-1 space-y-3 py-2">
                                        <div class="h-3 w-[60%] bg-anthracite/20 rounded"></div>
                                        <div class="h-2 w-[80%] bg-neutral rounded"></div>
                                        <div class="h-2 w-[40%] bg-neutral rounded"></div>
                                    </div>
                                </div>
                            </div>
                            
                            <!-- Floating badge -->
                            <div class="absolute -left-12 bottom-12 bg-white p-5 rounded-2xl shadow-xl flex items-center gap-4 border border-sand/50 animate-bounce" style="animation-duration: 3s">
                                <div class="w-12 h-12 bg-accent rounded-full flex items-center justify-center">
                                    <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 text-white" fill="none" viewBox="0 0 24 24" stroke="currentColor">
                                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" />
                                    </svg>
                                </div>
                                <div>
                                    <p class="text-xs text-anthracite/50 font-subtitle font-bold uppercase tracking-wider">Candidat</p>
                                    <p class="text-anthracite font-bold">Approuvé</p>
                                </div>
                            </div>
                        </div>
                    </div>
                    
                </div>
            </div>
        </main>

        <!-- Features -->
        <section class="relative z-10 bg-neutral px-6 py-24 md:px-12 -mt-16 pt-32">
            <div class="max-w-7xl mx-auto">
                <div class="text-center mb-16 space-y-4">
                    <h2 class="text-3xl md:text-5xl font-serif text-primary">Un processus optimisé</h2>
                    <p class="text-anthracite/70 font-sans max-w-2xl mx-auto text-lg pt-2">Pensé pour offrir la meilleure expérience d'évaluation technique aux communautés d'agglomération et leurs candidats.</p>
                </div>

                <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
                    <!-- Feature 1 -->
                    <div class="p-8 bg-white rounded-2xl shadow-md shadow-anthracite/5 border-b-4 border-primary hover:-translate-y-2 transition-transform duration-300">
                        <div class="w-14 h-14 bg-sky/10 rounded-xl flex items-center justify-center mb-6">
                            <svg xmlns="http://www.w3.org/2000/svg" class="h-7 w-7 text-primary" fill="none" viewBox="0 0 24 24" stroke="currentColor">
                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19.428 15.428a2 2 0 00-1.022-.547l-2.387-.477a6 6 0 00-3.86.517l-.318.158a6 6 0 01-3.86.517L6.05 15.21a2 2 0 00-1.806.547M8 4h8l-1 1v5.172a2 2 0 00.586 1.414l5 5c1.26 1.26.367 3.414-1.415 3.414H4.828c-1.782 0-2.674-2.154-1.414-3.414l5-5A2 2 0 009 10.172V5L8 4z" />
                            </svg>
                        </div>
                        <h3 class="text-xl font-subtitle font-bold text-primary mb-3">Quiz Dynamiques</h3>
                        <p class="text-anthracite/70 font-sans text-sm leading-relaxed">Une génération intelligente de questions basées sur l'Intelligence Artificielle pour cibler les attentes du poste.</p>
                    </div>

                    <!-- Feature 2 -->
                    <div class="p-8 bg-white rounded-2xl shadow-md shadow-anthracite/5 border-b-4 border-highlight hover:-translate-y-2 transition-transform duration-300">
                        <div class="w-14 h-14 bg-highlight/10 rounded-xl flex items-center justify-center mb-6">
                            <svg xmlns="http://www.w3.org/2000/svg" class="h-7 w-7 text-highlight" fill="none" viewBox="0 0 24 24" stroke="currentColor">
                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z" />
                            </svg>
                        </div>
                        <h3 class="text-xl font-subtitle font-bold text-anthracite mb-3">Sécurisé & Traçable</h3>
                        <p class="text-anthracite/70 font-sans text-sm leading-relaxed">Respect de l'intégrité des compétences et de la RGPD, sans biais lors de l'analyse des profils.</p>
                    </div>

                    <!-- Feature 3 -->
                    <div class="p-8 bg-white rounded-2xl shadow-md shadow-anthracite/5 border-b-4 border-accent hover:-translate-y-2 transition-transform duration-300">
                        <div class="w-14 h-14 bg-accent/10 rounded-xl flex items-center justify-center mb-6">
                            <svg xmlns="http://www.w3.org/2000/svg" class="h-7 w-7 text-accent" fill="none" viewBox="0 0 24 24" stroke="currentColor">
                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 18h.01M8 21h8a2 2 0 002-2V5a2 2 0 00-2-2H8a2 2 0 00-2 2v14a2 2 0 002 2z" />
                            </svg>
                        </div>
                        <h3 class="text-xl font-subtitle font-bold text-accent mb-3">Expérience fluide</h3>
                        <p class="text-anthracite/70 font-sans text-sm leading-relaxed">Une interface candidate repensée pour valoriser la marque employeur et simplifier la passation d'examens.</p>
                    </div>
                </div>
            </div>
        </section>

        <!-- Footer -->
        <footer class="relative bg-sand px-6 py-12 text-center border-t border-anthracite/10">
            <p class="text-primary font-subtitle font-bold text-xs uppercase tracking-[0.1em]">
                &copy; {{ new Date().getFullYear() }} — Communauté d'Agglomération Béziers Méditerranée — Tous droits réservés
            </p>
        </footer>
    </div>
</template>

<style>
/* Import custom typographies */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,400;0,700;1,400;1,700&family=Nunito:ital,wght@0,400;0,600;0,700;1,400&display=swap');
</style>
