<!DOCTYPE html>
{% load static %}
<html lang="fr">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{% block title %}ECOLUX BTP - Authentification{% endblock %}</title>
    <meta name="description" content="{% block description %}Authentification ECOLUX BTP - Votre partenaire construction au Sénégal{% endblock %}">
    
    <!-- Fonts -->
    <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:wght@400;700&display=swap">
    
    <!-- Font Awesome -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
    
    <!-- Animate.css -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css">
    
    <!-- SweetAlert2 -->
    <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
    
    <!-- jQuery -->
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    
    <style>
        :root {
            /* Couleurs ECOLUX */
            --primary: #1e1810;
            --primary-light: #3a342a;
            --primary-dark: #0f0c08;
            --secondary: #d4af37;
            --secondary-light: #e6c252;
            --secondary-dark: #b8941f;
            --accent: #c7a876;
            --background: #fafafa;
            --card: #ffffff;
            --border: #e0ddd9;
            --text: #1e1810;
            --text-muted: #6b7280;
            --success: #10b981;
            --error: #ef4444;
            
            --shadow: 0 10px 30px -10px rgba(30, 24, 16, 0.15);
            --shadow-lg: 0 20px 50px -10px rgba(30, 24, 16, 0.25);
            --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Inter', sans-serif;
            background: linear-gradient(135deg, var(--background), #f3f3f3);
            color: var(--text);
            line-height: 1.6;
            min-height: 100vh;
        }

        .auth-container {
            min-height: 100vh;
            display: flex;
        }

        .auth-left {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 2rem;
            background: linear-gradient(135deg, var(--card), var(--background));
        }

        .auth-right {
            flex: 1;
            background: linear-gradient(135deg, 
                rgba(30, 24, 16, 0.9), 
                rgba(212, 175, 55, 0.3)
            ),
            url('{% static "assets/img/construction-bg.jpg" %}') center/cover;
            position: relative;
            display: none;
        }

        .auth-right::before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(135deg,
                rgba(30, 24, 16, 0.8),
                rgba(212, 175, 55, 0.2)
            );
        }

        .auth-card {
            width: 100%;
            max-width: 400px;
            background: var(--card);
            border-radius: 1.5rem;
            padding: 3rem 2.5rem;
            box-shadow: var(--shadow-lg);
            border: 1px solid var(--border);
        }

        .auth-logo {
            display: block;
            margin: 0 auto 2rem;
            height: 4rem;
            filter: brightness(1.1);
        }

        .auth-title {
            font-family: 'Playfair Display', serif;
            font-size: 2rem;
            font-weight: 700;
            text-align: center;
            color: var(--primary);
            margin-bottom: 0.5rem;
        }

        .auth-subtitle {
            text-align: center;
            color: var(--text-muted);
            margin-bottom: 2rem;
            font-size: 0.95rem;
        }

        .form-group {
            margin-bottom: 1.5rem;
        }

        .form-label {
            display: block;
            font-weight: 600;
            color: var(--primary);
            margin-bottom: 0.5rem;
            font-size: 0.9rem;
        }

        .form-input {
            width: 100%;
            padding: 0.875rem 1rem 0.875rem 3rem;
            border: 2px solid var(--border);
            border-radius: 0.75rem;
            font-size: 1rem;
            transition: var(--transition);
            background: var(--background);
            position: relative;
        }

        .form-input:focus {
            outline: none;
            border-color: var(--secondary);
            box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
            background: var(--card);
        }

        .form-input:invalid {
            border-color: var(--error);
        }

        .input-group {
            position: relative;
        }

        .input-icon {
            position: absolute;
            left: 1rem;
            top: 50%;
            transform: translateY(-50%);
            color: var(--secondary);
            font-size: 1.1rem;
            z-index: 10;
        }

        .btn-primary {
            width: 100%;
            padding: 0.875rem 1.5rem;
            background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
            color: var(--primary);
            border: none;
            border-radius: 0.75rem;
            font-size: 1rem;
            font-weight: 700;
            cursor: pointer;
            transition: var(--transition);
            box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
        }

        .btn-primary:hover:not(:disabled) {
            background: linear-gradient(135deg, var(--secondary-light), var(--secondary));
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
        }

        .btn-primary:disabled {
            opacity: 0.7;
            cursor: not-allowed;
            transform: none;
        }

        .btn-primary.is-loading {
            position: relative;
            color: transparent;
        }

        .btn-primary.is-loading::after {
            content: '';
            position: absolute;
            width: 1.5rem;
            height: 1.5rem;
            top: 50%;
            left: 50%;
            margin-left: -0.75rem;
            margin-top: -0.75rem;
            border: 2px solid var(--primary);
            border-radius: 50%;
            border-top-color: transparent;
            animation: spin 1s linear infinite;
        }

        .auth-link {
            display: block;
            text-align: center;
            color: var(--secondary);
            text-decoration: none;
            font-weight: 600;
            margin-top: 1rem;
            transition: var(--transition);
        }

        .auth-link:hover {
            color: var(--secondary-dark);
            text-decoration: underline;
        }

        .form-hint {
            font-size: 0.8rem;
            color: var(--text-muted);
            font-style: italic;
            margin-top: 0.5rem;
            line-height: 1.4;
        }

        .alert {
            padding: 1rem;
            border-radius: 0.75rem;
            margin-bottom: 1.5rem;
            font-size: 0.9rem;
        }

        .alert-error {
            background: rgba(239, 68, 68, 0.1);
            color: var(--error);
            border: 1px solid rgba(239, 68, 68, 0.2);
        }

        .alert-success {
            background: rgba(16, 185, 129, 0.1);
            color: var(--success);
            border: 1px solid rgba(16, 185, 129, 0.2);
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .animate-fade-in {
            animation: fadeInUp 0.6s ease-out;
        }

        /* Responsive */
        @media (min-width: 768px) {
            .auth-right {
                display: block;
            }
            
            .auth-left {
                flex: 0 0 400px;
            }
        }

        @media (max-width: 480px) {
            .auth-card {
                padding: 2rem 1.5rem;
                margin: 1rem;
            }
            
            .auth-title {
                font-size: 1.75rem;
            }
        }

        /* Swal2 customization */
        .swal2-popup {
            border-radius: 1rem !important;
        }

        .swal2-confirm {
            background: var(--secondary) !important;
            color: var(--primary) !important;
            border-radius: 0.75rem !important;
            font-weight: 600 !important;
        }
    </style>

    {% block extra_css %}{% endblock %}
</head>
<body>
    {% block content %}{% endblock %}
</body>
</html>