"use client";

import { signIn } from "next-auth/react";
import { useSearchParams } from "next/navigation";

export function SignInForm() {
  const searchParams = useSearchParams();
  const callbackUrl = searchParams.get("callbackUrl") || "/";

  return (
    <div className="text-center">
      <h1 className="text-4xl font-bold text-white mb-4">Bienvenue sur Enkun</h1>
      <p className="text-white/80 mb-8">Connectez-vous pour accéder à votre espace</p>
      <button
        onClick={() => signIn("keycloak", { callbackUrl })}
        className="px-8 py-3 bg-[#0F172A] text-white rounded hover:bg-[#1E293B] transition-colors"
      >
        Se connecter
      </button>
    </div>
  );
} 