








<!DOCTYPE html>
<html lang="fr">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Connexion - Voyagedifiant</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
    <style>
        :root {
            --primary-color: #020548;
            --secondary-color: #040a8c;
            --accent-color: #ff6b6b;
            --light-color: #f8f9fa;
            --text-color: #333333;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        .login-container {
            background-color: white;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(2, 5, 72, 0.2);
            overflow: hidden;
            width: 100%;
            max-width: 500px;
        }

        .login-header {
            background: var(--primary-color);
            color: white;
            padding: 25px;
            text-align: center;
            position: relative;
            overflow: hidden;
        }

        .login-header::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
        }

        .login-header h1 {
            font-size: 2.2rem;
            margin-bottom: 5px;
            font-weight: 700;
        }

        .login-header p {
            font-size: 1rem;
            opacity: 0.9;
            margin-bottom: 0;
        }

        .login-body {
            padding: 30px;
        }

        .form-control {
            height: 50px;
            border-radius: 8px;
            border: 1px solid #ddd;
            padding-left: 15px;
            transition: all 0.3s;
        }

        .form-control:focus {
            border-color: var(--secondary-color);
            box-shadow: 0 0 0 0.2rem rgba(4, 10, 140, 0.25);
        }

        .form-group label {
            font-weight: 600;
            color: var(--text-color);
            margin-bottom: 8px;
        }

        .btn-login {
            background-color: var(--primary-color);
            border: none;
            height: 50px;
            font-weight: 600;
            font-size: 1.1rem;
            letter-spacing: 0.5px;
            color: white;
            transition: all 0.3s;
        }

        .btn-login:hover {
            background-color: var(--secondary-color);
            transform: translateY(-2px);
        }

        .form-footer {
            display: flex;
            justify-content: center;
            align-items: center;
            margin-top: 20px;
            padding-top: 15px;
            border-top: 1px solid #eee;
        }

        .form-footer a {
            color: var(--secondary-color);
            text-decoration: none;
            font-weight: 500;
            transition: all 0.2s;
        }

        .form-footer a:hover {
            color: var(--primary-color);
            text-decoration: underline;
        }

        .remember-me {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 15px;
        }

        .remember-me label {
            margin-bottom: 0;
        }

        .text-danger {
            font-size: 0.9rem;
            margin-top: 5px;
            display: block;
            color: var(--accent-color);
        }

        .input-icon {
            position: relative;
        }

        .input-icon i {
            position: absolute;
            right: 15px;
            top: 50%;
            transform: translateY(-50%);
            color: #aaa;
        }

        .logo-icon {
            color: white;
            margin-right: 10px;
            font-size: 1.8rem;
            vertical-align: middle;
        }

        .password-link {
            color: var(--secondary-color);
            text-decoration: none;
            font-weight: 500;
            font-size: 0.9rem;
            cursor: pointer;
        }

        .password-link:hover {
            color: var(--primary-color);
            text-decoration: underline;
        }

        /* Styles pour la modale de récupération */
        .modal-content {
            border-radius: 15px;
            overflow: hidden;
        }

        .modal-header {
            background: var(--primary-color);
            color: white;
        }

        .modal-title {
            font-weight: 700;
        }

        .btn-recover {
            background-color: var(--primary-color);
            color: white;
            font-weight: 600;
        }

        .btn-recover:hover {
            background-color: var(--secondary-color);
            color: white;
        }
    </style>
</head>
<body>
    <div class="login-container">
        <div class="login-header">
            <h1><i class="fas fa-car logo-icon"></i> Voyagedifiant</h1>
            <p>Bienvenue sur votre dashboard de voyage</p>
        </div>

        <div class="login-body">
            <?php if(session('status')): ?>
                <div class="alert alert-success">
                    <?php echo e(session('status')); ?>

                </div>
            <?php endif; ?>

            <form method="POST" action="<?php echo e(route('login')); ?>" id="loginForm">
                <?php echo csrf_field(); ?>

                <div class="form-group">
                    <label for="email">Adresse email</label>
                    <div class="input-icon">
                        <input type="text" class="form-control" name="email" id="email"
                               placeholder="votre@email.com" value="<?php echo e(old('email')); ?>" required>
                        <i class="fas fa-envelope"></i>
                    </div>
                    <?php $__errorArgs = ['email'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <span class="text-danger"><?php echo e($message); ?></span>
                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                </div>

                <div class="form-group">
                    <label for="password">Mot de passe</label>
                    <div class="input-icon">
                        <input type="password" class="form-control" name="password"
                               id="password" placeholder="••••••••" required>
                        <i class="fas fa-lock"></i>
                    </div>
                    <?php $__errorArgs = ['password'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <span class="text-danger"><?php echo e($message); ?></span>
                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                </div>

                <div class="remember-me">
                    <div>
                        <input type="checkbox" class="form-check-input" id="remember" name="remember">
                        <label class="form-check-label" for="remember">Se souvenir de moi</label>
                    </div>
                    <a href="<?php echo e(route('password.request')); ?>" class="password-link" id="passwordLink">Mot de passe oublié ?</a>
                </div>

                <button type="submit" class="btn btn-block btn-login">
                    <i class="fas fa-sign-in-alt"></i> Se connecter
                </button>

                <div class="form-footer">
                    <a class="password-link" id="footerPasswordLink">Mot de passe oublié ?</a>
                </div>
            </form>
        </div>
    </div>

    <!-- Modale de récupération de mot de passe -->
    <div class="modal fade" id="passwordRecoveryModal" tabindex="-1" aria-labelledby="passwordRecoveryModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="passwordRecoveryModalLabel"><i class="fas fa-key mr-2"></i>Récupération de mot de passe</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true" style="color: white;">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    <p>Entrez votre adresse email pour recevoir un lien de réinitialisation de mot de passe.</p>
                    <form id="passwordRecoveryForm">
                        <div class="form-group">
                            <label for="recoveryEmail">Adresse email</label>
                            <div class="input-icon">
                                <input type="email" class="form-control" id="recoveryEmail"
                                       placeholder="votre@email.com" required>
                                <i class="fas fa-envelope"></i>
                            </div>
                            <small id="emailHelp" class="form-text text-muted">Nous vous enverrons un lien de réinitialisation à cette adresse.</small>
                        </div>
                    </form>
                </div>
                
            </div>
        </div>
    </div>

    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.bundle.min.js"></script>
    <script>
        $(document).ready(function() {
            // Ouvrir la modale lors du clic sur "Mot de passe oublié"
            $('.password-link').on('click', function() {
                $('#passwordRecoveryModal').modal('show');
            });

            // Simulation de l'envoi du formulaire de récupération
            $('#sendRecoveryButton').on('click', function() {
                const email = $('#recoveryEmail').val();

                if (!email) {
                    alert('Veuillez entrer votre adresse email.');
                    return;
                }

                // Simulation d'envoi (à remplacer par votre code backend)
                console.log('Envoi du lien de réinitialisation à: ' + email);

                // Afficher un message de succès
                alert('Un lien de réinitialisation a été envoyé à ' + email);

                // Fermer la modale
                $('#passwordRecoveryModal').modal('hide');

                // Réinitialiser le formulaire
                $('#recoveryEmail').val('');
            });

            // Permettre la soumission avec la touche Entrée
            $('#recoveryEmail').on('keypress', function(e) {
                if (e.which === 13) {
                    $('#sendRecoveryButton').click();
                    return false;
                }
            });
        });
    </script>
</body>
</html>
<?php /**PATH C:\Users\LENOVO\Documents\voyagedifiantDashboard\resources\views/page/connexion.blade.php ENDPATH**/ ?>