:root {
            --primary-color: #667eea;
            --primary-dark: #764ba2;
            --secondary: #10b981;
            --bg-primary: #0f172a;
            --bg-secondary: #1e293b;
            --bg-tertiary: #334155;
            --text-primary: #ffffff;
            --text-secondary: #e2e8f0;
            --text-muted: #94a3b8;
            --border-color: rgba(255, 255, 255, 0.1);
            --card-bg: rgba(30, 41, 59, 0.95);
            --glass-bg: rgba(30, 41, 59, 0.8);
            --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Inter', sans-serif;
            background: #0f172a;
            min-height: 100vh;
            display: flex;
            flex-direction: column; /* Colonne pour mettre footer en bas */
            position: relative;
            overflow-x: hidden;
        }
        
        /* Beautiful animated background */
        body::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: 
                radial-gradient(circle at 20% 30%, rgba(102, 126, 234, 0.3) 0%, transparent 40%),
                radial-gradient(circle at 80% 70%, rgba(118, 75, 162, 0.3) 0%, transparent 40%),
                radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.15) 0%, transparent 50%);
            animation: backgroundPulse 15s ease-in-out infinite;
            z-index: 1;
        }
        
        body::after {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-image: 
                repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(102, 126, 234, 0.03) 2px, rgba(102, 126, 234, 0.03) 4px),
                repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(118, 75, 162, 0.03) 2px, rgba(118, 75, 162, 0.03) 4px);
            z-index: 2;
        }
        
        @keyframes backgroundPulse {
            0%, 100% {
                opacity: 1;
                transform: scale(1);
            }
            50% {
                opacity: 0.8;
                transform: scale(1.1);
            }
        }
        
        /* Main container */
        .login-wrapper {
            position: relative;
            z-index: 10;
            width: 100%;
            max-width: 1100px;
            max-height: calc(100vh - 120px); /* Limite la hauteur pour laisser place au footer */
            background: var(--card-bg);
            backdrop-filter: blur(20px);
            border: 1px solid var(--border-color);
            border-radius: 24px;
            box-shadow: var(--shadow);
            overflow: hidden;
            animation: slideUp 0.6s ease-out;
            flex: 1; /* Prend l'espace disponible */
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 20px auto; /* Centré horizontalement */
        }
        
        @keyframes slideUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .login-container {
            display: grid;
            grid-template-columns: 1fr 1fr;
            min-height: 600px;
        }
        
        /* Left side - Login form */
        .login-form-section {
            padding: 60px 50px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            background: var(--glass-bg);
            border-right: 1px solid var(--border-color);
        }
        
        .logo-section {
            margin-bottom: 40px;
        }
        
        .logo {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 8px;
        }
        
        .logo-icon {
            width: 48px;
            height: 48px;
            background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 24px;
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
            animation: iconPulse 3s ease-in-out infinite;
        }
        
        @keyframes iconPulse {
            0%, 100% {
                box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
                transform: scale(1);
            }
            50% {
                box-shadow: 0 8px 24px rgba(102, 126, 234, 0.6);
                transform: scale(1.05);
            }
        }
        
        .logo-text {
            font-size: 28px;
            font-weight: 800;
            background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            animation: textShine 3s ease-in-out infinite;
        }
        
        @keyframes textShine {
            0%, 100% {
                filter: brightness(1);
            }
            50% {
                filter: brightness(1.2);
            }
        }
        
        .logo-subtitle {
            color: var(--text-muted);
            font-size: 14px;
            margin-left: 60px;
        }
        
        .welcome-text {
            margin-bottom: 32px;
        }
        
        .welcome-text h1 {
            font-size: 32px;
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 8px;
            animation: fadeInUp 0.8s ease-out;
            text-shadow: 0 2px 10px rgba(102, 126, 234, 0.2);
        }
        
        .welcome-text p {
            color: var(--text-muted);
            font-size: 16px;
            animation: fadeInUp 1s ease-out;
        }
        
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        /* Success message banner */
        .success-banner {
            background: linear-gradient(135deg, #10b981, #059669);
            color: white;
            padding: 16px 20px;
            border-radius: 12px;
            margin-bottom: 24px;
            display: flex;
            align-items: center;
            gap: 12px;
            animation: slideDown 0.5s ease-out;
            box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
        }
        
        @keyframes slideDown {
            from {
                opacity: 0;
                transform: translateY(-20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .success-banner i {
            font-size: 24px;
        }
        
        .success-banner strong {
            font-weight: 600;
        }
        
        /* Form styles */
        .form-group {
            margin-bottom: 24px;
            animation: fadeInUp 1.2s ease-out;
        }
        
        .form-group:nth-child(1) {
            animation-delay: 0.2s;
        }
        
        .form-group:nth-child(2) {
            animation-delay: 0.4s;
        }
        
        .form-label {
            display: block;
            font-weight: 600;
            color: var(--text-secondary);
            margin-bottom: 8px;
            font-size: 14px;
        }
        
        .form-control {
            width: 100%;
            padding: 14px 16px;
            border: 1px solid var(--border-color);
            border-radius: 12px;
            font-size: 15px;
            transition: all 0.3s ease;
            background: rgba(15, 23, 42, 0.5);
            color: #ffffff !important;
            position: relative;
        }
        
        .form-control:-webkit-autofill,
        .form-control:-webkit-autofill:hover,
        .form-control:-webkit-autofill:focus {
            -webkit-text-fill-color: #ffffff !important;
            -webkit-box-shadow: 0 0 0 1000px rgba(15, 23, 42, 0.5) inset !important;
            transition: background-color 5000s ease-in-out 0s;
        }
        
        .form-control:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2), 0 0 20px rgba(102, 126, 234, 0.1);
            background: rgba(15, 23, 42, 0.7);
            transform: translateY(-2px);
        }
        
        .form-control::placeholder {
            color: var(--text-muted);
        }
        
        .btn-login {
            width: 100%;
            padding: 14px 24px;
            background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
            color: white;
            border: none;
            border-radius: 12px;
            font-weight: 600;
            font-size: 16px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
            position: relative;
            overflow: hidden;
        }
        
        .btn-login::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.3);
            transform: translate(-50%, -50%);
            transition: width 0.6s, height 0.6s;
        }
        
        .btn-login:hover::before {
            width: 300px;
            height: 300px;
        }
        
        .btn-login:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(102, 126, 234, 0.5), 0 0 30px rgba(102, 126, 234, 0.3);
        }
        
        .btn-login:active {
            transform: translateY(0);
        }
        
        .btn-login i,
        .btn-login span {
            position: relative;
            z-index: 1;
        }
        
        .btn-login:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }
        
        /* Loading spinner */
        .loading {
            display: none;
            text-align: center;
            margin-top: 16px;
            color: var(--text-muted);
        }
        
        .spinner {
            width: 24px;
            height: 24px;
            border: 3px solid var(--border-color);
            border-top-color: var(--primary-color);
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
            margin: 0 auto 8px;
        }
        
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        
        /* Right side - Microsoft login */
        .microsoft-section {
            background: rgba(15, 23, 42, 0.5);
            padding: 60px 50px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            position: relative;
        }
        
        .microsoft-section::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" fill="none"/><circle cx="50" cy="50" r="40" fill="none" stroke="%23667eea" stroke-width="0.5" opacity="0.1"/></svg>') repeat;
            opacity: 0.3;
        }
        
        .microsoft-content {
            position: relative;
            z-index: 1;
            text-align: center;
            max-width: 360px;
        }
        
        .microsoft-icon {
            width: 80px;
            height: 80px;
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            border: 1px solid var(--border-color);
            border-radius: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 24px;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
            animation: floatIcon 3s ease-in-out infinite;
        }
        
        @keyframes floatIcon {
            0%, 100% {
                transform: translateY(0);
            }
            50% {
                transform: translateY(-10px);
            }
        }
        
        .microsoft-icon svg {
            width: 48px;
            height: 48px;
        }
        
        .microsoft-content h2 {
            font-size: 24px;
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 12px;
        }
        
        .microsoft-content p {
            color: var(--text-muted);
            margin-bottom: 32px;
            line-height: 1.6;
        }
        
        .btn-microsoft {
            width: 100%;
            padding: 14px 24px;
            background: linear-gradient(135deg, #00a4ef 0%, #0078d4 100%);
            color: white !important;
            border: none;
            border-radius: 12px;
            font-weight: 600;
            font-size: 16px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            box-shadow: 0 4px 12px rgba(0, 120, 212, 0.4);
            opacity: 1;
            text-decoration: none;
        }
        
        .btn-microsoft:hover {
            background: linear-gradient(135deg, #0078d4 0%, #005a9e 100%);
            box-shadow: 0 8px 20px rgba(0, 120, 212, 0.6);
            transform: translateY(-2px);
            color: white !important;
        }
        
        .btn-microsoft:active {
            transform: translateY(0);
        }
        
        /* Alert messages */
        .alert {
            padding: 14px 18px;
            border-radius: 12px;
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            gap: 12px;
            animation: slideDown 0.5s ease-out;
        }
        
        .alert-danger {
            background: #fee2e2;
            border: 1px solid #fecaca;
            color: #dc2626;
        }
        
        .alert-success {
            background: #d1fae5;
            border: 1px solid #a7f3d0;
            color: #059669;
        }
        
        .alert i {
            font-size: 20px;
        }
        
        /* PWA Install Popup */
        .pwa-popup-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.7);
            backdrop-filter: blur(5px);
            z-index: 9999;
            align-items: center;
            justify-content: center;
            padding: 20px;
            animation: fadeIn 0.3s ease-out;
        }
        
        .pwa-popup-overlay.show {
            display: flex;
        }
        
        @keyframes fadeIn {
            from {
                opacity: 0;
            }
            to {
                opacity: 1;
            }
        }
        
        .pwa-install-prompt {
            background: var(--card-bg);
            backdrop-filter: blur(20px);
            border: 1px solid var(--border-color);
            border-radius: 20px;
            padding: 30px;
            max-width: 400px;
            width: 100%;
            position: relative;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
            animation: popupSlideUp 0.4s ease-out;
        }
        
        @keyframes popupSlideUp {
            from {
                opacity: 0;
                transform: translateY(30px) scale(0.9);
            }
            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }
        
        .pwa-close-btn {
            position: absolute;
            top: 15px;
            right: 15px;
            width: 32px;
            height: 32px;
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
            color: var(--text-muted);
        }
        
        .pwa-close-btn:hover {
            background: rgba(239, 68, 68, 0.2);
            color: var(--danger);
            transform: rotate(90deg);
        }
        
        .pwa-prompt-header {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 16px;
        }
        
        .pwa-prompt-icon {
            width: 48px;
            height: 48px;
            background: linear-gradient(135deg, var(--primary-color), var(--secondary));
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 24px;
            animation: iconPulse 3s ease-in-out infinite;
        }
        
        .pwa-prompt-title {
            flex: 1;
            text-align: left;
        }
        
        .pwa-prompt-title h4 {
            color: var(--text-primary);
            font-size: 18px;
            font-weight: 700;
            margin: 0 0 4px 0;
        }
        
        .pwa-prompt-title p {
            color: var(--text-muted);
            font-size: 13px;
            margin: 0;
        }
        
        .pwa-features {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 12px;
            margin-bottom: 16px;
        }
        
        .pwa-feature {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            padding: 12px 8px;
            text-align: center;
            transition: all 0.3s ease;
        }
        
        .pwa-feature:hover {
            background: rgba(102, 126, 234, 0.1);
            transform: translateY(-2px);
        }
        
        .pwa-feature i {
            font-size: 24px;
            color: var(--primary-color);
            margin-bottom: 6px;
            display: block;
        }
        
        .pwa-feature span {
            color: var(--text-secondary);
            font-size: 12px;
            font-weight: 600;
            display: block;
        }
        
        .btn-install-pwa {
            width: 100%;
            padding: 12px 20px;
            background: linear-gradient(135deg, var(--secondary), #059669);
            color: white;
            border: none;
            border-radius: 12px;
            font-weight: 600;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
        }
        
        .btn-install-pwa:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(16, 185, 129, 0.5);
        }
        
        /* Microsoft button compact for mobile */
        .btn-microsoft-compact {
            display: none;
            width: 100%;
            padding: 12px 20px;
            background: linear-gradient(135deg, #00a4ef 0%, #0078d4 100%);
            color: white !important;
            border: none;
            border-radius: 12px;
            font-weight: 600;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.3s ease;
            align-items: center;
            justify-content: center;
            gap: 8px;
            margin-top: 16px;
            opacity: 1;
            text-decoration: none;
            box-shadow: 0 4px 12px rgba(0, 120, 212, 0.4);
        }
        
        .btn-microsoft-compact:hover {
            background: linear-gradient(135deg, #0078d4 0%, #005a9e 100%);
            box-shadow: 0 8px 20px rgba(0, 120, 212, 0.6);
            transform: translateY(-2px);
            color: white !important;
        }
        
        .btn-microsoft-compact svg {
            width: 18px;
            height: 18px;
        }
        
        /* Responsive */
        @media (max-width: 968px) {
            .login-container {
                grid-template-columns: 1fr;
            }
            
            .login-form-section {
                border-right: none;
            }
            
            .microsoft-section {
                display: none !important;
            }
            
            .btn-microsoft-compact {
                display: flex;
            }
            
            .login-form-section {
                padding: 40px 30px;
            }
        }
        
        @media (max-width: 576px) {
            .login-wrapper {
                border-radius: 16px;
            }
            
            .login-form-section {
                padding: 30px 20px;
            }
            
            .welcome-text h1 {
                font-size: 24px;
            }
            
            .logo-text {
                font-size: 22px;
            }
            
            .pwa-features {
                grid-template-columns: 1fr;
                gap: 8px;
            }
            
            .pwa-feature {
                display: flex;
                align-items: center;
                gap: 12px;
                padding: 10px 12px;
                text-align: left;
            }
            
            .pwa-feature i {
                margin-bottom: 0;
                font-size: 20px;
            }
        }