<?php $__env->startSection('title', 'Message de ' . $contact->nom); ?>

<?php $__env->startSection('content'); ?>
<div class="mb-6">
    <a href="<?php echo e(route('dashboard.contacts.index')); ?>" class="inline-flex items-center gap-2 text-slate-600 hover:text-slate-900 font-medium transition">
        <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 19l-7-7m0 0l7-7m-7 7h18"/>
        </svg>
        Retour aux contacts
    </a>
</div>

<div class="max-w-6xl space-y-6">
    <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
        
        <div class="bg-white rounded-2xl shadow-sm border border-slate-200/80 overflow-hidden">
            <div class="px-6 py-4 border-b border-slate-100 bg-slate-50/50">
                <h1 class="text-xl font-bold text-slate-800">Expéditeur</h1>
                <p class="text-sm text-slate-500 mt-0.5">Coordonnées du contact</p>
            </div>
            <div class="p-6">
                <div class="flex items-start gap-4 mb-6">
                    <div class="w-14 h-14 rounded-2xl bg-amber-100 flex items-center justify-center flex-shrink-0">
                        <span class="text-2xl font-bold text-amber-600"><?php echo e(strtoupper(substr($contact->nom, 0, 1))); ?></span>
                    </div>
                    <div>
                        <h2 class="text-lg font-bold text-slate-800"><?php echo e($contact->nom); ?></h2>
                        <p class="text-sm text-slate-500"><?php echo e($contact->created_at->format('d/m/Y à H:i')); ?></p>
                    </div>
                </div>
                <dl class="space-y-4">
                    <div>
                        <dt class="text-sm font-medium text-slate-500">Email</dt>
                        <dd class="mt-1">
                            <a href="mailto:<?php echo e($contact->email); ?>" class="text-amber-600 hover:text-amber-700 font-medium flex items-center gap-2">
                                <?php echo e($contact->email); ?>

                                <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"/>
                                </svg>
                            </a>
                        </dd>
                    </div>
                    <?php if($contact->telephone): ?>
                    <div>
                        <dt class="text-sm font-medium text-slate-500">Téléphone</dt>
                        <dd class="mt-1">
                            <a href="tel:<?php echo e($contact->telephone); ?>" class="text-amber-600 hover:text-amber-700 font-medium flex items-center gap-2">
                                <?php echo e($contact->telephone); ?>

                                <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z"/>
                                </svg>
                            </a>
                        </dd>
                    </div>
                    <?php endif; ?>
                    <?php if($contact->sujet): ?>
                    <div>
                        <dt class="text-sm font-medium text-slate-500">Sujet</dt>
                        <dd class="mt-1 text-slate-800 font-medium"><?php echo e($contact->sujet); ?></dd>
                    </div>
                    <?php endif; ?>
                </dl>
                <div class="mt-6 pt-6 border-t border-slate-100 flex gap-3">
                    <a href="mailto:<?php echo e($contact->email); ?>?subject=<?php echo e(urlencode('Re: ' . ($contact->sujet ?? 'Votre message'))); ?>" class="inline-flex items-center gap-2 px-4 py-2.5 rounded-xl bg-amber-500 hover:bg-amber-600 text-white font-medium text-sm transition">
                        <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"/>
                        </svg>
                        Répondre
                    </a>
                    <a href="tel:<?php echo e($contact->telephone ?? ''); ?>" class="inline-flex items-center gap-2 px-4 py-2.5 rounded-xl border border-slate-200 text-slate-700 hover:bg-slate-50 font-medium text-sm transition <?php echo e(!$contact->telephone ? 'opacity-50 pointer-events-none' : ''); ?>">
                        <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z"/>
                        </svg>
                        Appeler
                    </a>
                </div>
            </div>
        </div>

        
        <div class="bg-white rounded-2xl shadow-sm border border-slate-200/80 overflow-hidden">
            <div class="px-6 py-4 border-b border-slate-100 bg-slate-50/50">
                <h2 class="text-xl font-bold text-slate-800">Message</h2>
                <p class="text-sm text-slate-500 mt-0.5">Contenu du message reçu</p>
            </div>
            <div class="p-6">
                <div class="prose prose-slate max-w-none">
                    <p class="text-slate-700 whitespace-pre-wrap leading-relaxed"><?php echo e($contact->message); ?></p>
                </div>
                <div class="mt-8 pt-6 border-t border-slate-100">
                    <form action="<?php echo e(route('dashboard.contacts.destroy', $contact)); ?>" method="POST" onsubmit="return confirm('Supprimer ce message ?')">
                        <?php echo csrf_field(); ?>
                        <?php echo method_field('DELETE'); ?>
                        <button type="submit" class="inline-flex items-center gap-2 px-4 py-2.5 rounded-xl border border-red-200 text-red-600 hover:bg-red-50 font-medium text-sm transition">
                            <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"/>
                            </svg>
                            Supprimer le message
                        </button>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.dashboard', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\Softsys\emelec_2\resources\views/dashboard/contacts/show.blade.php ENDPATH**/ ?>