@extends('layouts.app')

<style>
    body {
        background: linear-gradient(135deg, rgba(23, 162, 184, 0.8), rgba(0, 123, 255, 0.8)), 
            url('https://www.example.com/your-background-image.jpg') no-repeat center center fixed;
        background-size: cover;
        height: 100vh;
        margin: 0;
        font-family: Arial, sans-serif;
    }
    .card {
        border-radius: 15px;
        overflow: hidden;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
    }
    .card-header {
        background: #17a2b8;
        color: white;
        padding: 20px;
        text-align: center;
        font-size: 1.8rem;
        font-weight: bold;
    }
    .card-body {
        padding: 30px;
        text-align: center;
    }
    a {
        text-decoration: none;
        color: #17a2b8;
        font-weight: bold;
        font-size: 1.25rem;
    }
    a:hover {
        color: #117a8b;
    }
    iframe {
        margin-top: 20px;
        border-radius: 8px;
        overflow: hidden;
        border: none;
    }
</style>

@section('content')
<div class="container h-100 d-flex justify-content-center align-items-center">
    <div class="row w-100">
        <div class="col-12 col-md-8 offset-md-2">
            <div class="card">
                <div class="card-header">
                    Vous êtes connecté {{ Auth::user()->name }}
                </div>
                <div class="card-body">

                    <a href="{{ asset('dashboard') }}">
                        <div class="card-header">{{ __('Allez au Dashboard') }}</div>
                    </a>

                    <div class="card-body">
                        @if (session('status'))
                            <div class="alert alert-success" role="alert">
                                {{ session('status') }}
                            </div>
                        @endif

                        {{ __('Gestion stock') }}

                        @if(Auth::check())
                            @if(Auth::user()->hasRole('admin'))
                                <a href="{{ route('dashadmin') }}">Accéder au tableau de bord admin</a>
                            @else
                                <a href="{{ route('dashboarduser') }}">Accéder au tableau de bord utilisateur</a>
                            @endif
                        @endif
                    </div>
                    
                </div>
            </div>
        </div>
    </div>
</div>
@endsection
