@extends('themes.saijana.layouts.app')

@section('title', 'Réservation confirmée - '.($site_name ?? 'Mon Site'))

@section('content')
<div class="max-w-2xl mx-auto px-6 py-16 text-center">
    <div class="inline-flex items-center justify-center w-16 h-16 rounded-full bg-emerald-100 text-emerald-600 mb-6">
        <svg class="w-8 h-8" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"/></svg>
    </div>
    <h1 class="text-3xl font-bold text-slate-900 mb-4">Réservation confirmée</h1>
    <p class="text-xl text-slate-600 mb-8">Merci pour votre réservation !</p>

    <div class="bg-white rounded-2xl border border-slate-200 p-8 text-left mb-8">
        <h3 class="font-semibold text-slate-800 mb-4">Détails</h3>
        @php
            $svc = $reservation->slot->service ?? null;
            $svcName = $svc ? (method_exists($svc, 'getTranslatedName') ? $svc->getTranslatedName($multilang_current ?? app()->getLocale(), $multilang_default ?? 'fr') : $svc->name) : '—';
        @endphp
        <p><strong>Service :</strong> {{ $svcName }}</p>
        <p class="mt-2"><strong>Date :</strong> {{ $reservation->slot->date->format('d/m/Y') }}</p>
        <p><strong>Créneau :</strong> {{ \Carbon\Carbon::parse($reservation->slot->start_time)->format('H:i') }} - {{ \Carbon\Carbon::parse($reservation->slot->end_time)->format('H:i') }}</p>
        <p class="mt-2"><strong>Nom :</strong> {{ $reservation->customer_name }}</p>
        <p><strong>Email :</strong> {{ $reservation->customer_email }}</p>
    </div>

    <a href="{{ route('reservation.index', [], false) }}" class="inline-block px-8 py-3 bg-primary-500 text-white rounded-xl font-semibold hover:bg-primary-600 transition">Nouvelle réservation</a>
</div>
@endsection
