/**
 * ==============================================
 * STYLES PAGES DE CONNEXION
 * ==============================================
 */

body {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

body::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
}

body::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    animation: float 15s ease-in-out infinite;
    pointer-events: none;
}

.login-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    max-width: 400px;
    width: 100%;
    animation: slideIn 0.6s ease-out, containerFloat 6s ease-in-out infinite;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
}

.login-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
    color: white;
    padding: 20px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: shimmer 3s ease-in-out infinite;
    pointer-events: none;
}

.login-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    opacity: 0.6;
    animation: pulse 4s ease-in-out infinite;
}

.login-header > * {
    position: relative;
    z-index: 1;
}

.login-header h1 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 4px 0;
    letter-spacing: -0.3px;
}

.login-header p {
    font-size: 12px;
    opacity: 0.9;
    font-weight: 400;
    margin: 0;
}

.login-icon {
    font-size: 36px;
    margin-bottom: 8px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    animation: iconFloat 3s ease-in-out infinite;
    display: inline-block;
}

.login-body {
    padding: 24px 30px;
}

.alert {
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 12px;
    display: none;
    border-left: 3px solid;
    animation: fadeIn 0.3s;
}

.alert.show {
    display: block;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border-left-color: #ef4444;
    border: 1px solid #fee2e2;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 12px;
    border-left: 3px solid #ef4444;
    animation: fadeIn 0.3s;
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border-left-color: #10b981;
    border: 1px solid #d1fae5;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #374151;
    font-weight: 500;
    font-size: 13px;
}

.input-wrapper {
    position: relative;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
    outline: none;
    background: white;
    color: #1e293b;
}

input[type="text"]:hover,
input[type="password"]:hover {
    border-color: #94a3b8;
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-1px);
    transition: all 0.3s ease;
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
}

.checkbox-group label {
    margin: 0;
    cursor: pointer;
    font-weight: 400;
    font-size: 13px;
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.2px;
}

.btn-login:hover {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 41, 59, 0.4);
    animation: buttonPulse 2s ease-in-out infinite;
}

@keyframes buttonPulse {
    0%, 100% {
        box-shadow: 0 6px 20px rgba(30, 41, 59, 0.4);
    }
    50% {
        box-shadow: 0 8px 24px rgba(30, 41, 59, 0.5);
    }
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-microsoft {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #ffffff;
    color: #111827;
    border: 1px solid #d1d5db;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-microsoft::before {
    content: '';
    width: 16px;
    height: 16px;
    border-radius: 2px;
    background:
        linear-gradient(#f25022, #f25022) 0 0 / 7px 7px no-repeat,
        linear-gradient(#7fba00, #7fba00) 9px 0 / 7px 7px no-repeat,
        linear-gradient(#00a4ef, #00a4ef) 0 9px / 7px 7px no-repeat,
        linear-gradient(#ffb900, #ffb900) 9px 9px / 7px 7px no-repeat;
    flex-shrink: 0;
}

.btn-microsoft:hover {
    background: #f9fafb;
    color: #0f172a;
    border-color: #9ca3af;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    animation: none;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 16px;
    padding-bottom: 8px;
    border-top: 1px solid #e5e7eb;
}

.login-footer a {
    color: #64748b;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.login-footer a:hover {
    color: #334155;
    gap: 6px;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

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

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translate(-30px, -30px) scale(1.1);
        opacity: 0.5;
    }
}

@keyframes shimmer {
    0% {
        transform: translate(-100%, -100%) rotate(0deg);
        opacity: 0;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        transform: translate(100%, 100%) rotate(360deg);
        opacity: 0;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.8;
    }
}

@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-8px) rotate(5deg);
    }
}

@keyframes containerFloat {
    0%, 100% {
        transform: translateY(0);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    }
    50% {
        transform: translateY(-4px);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
    }
}

/* Responsive */
@media (max-width: 480px) {
    .login-header h1 {
        font-size: 18px;
    }
    
    .login-header p {
        font-size: 11px;
    }
    
    .login-body {
        padding: 20px 24px;
    }
    
    .login-header {
        padding: 16px 24px;
    }
    
    .login-icon {
        font-size: 32px;
        margin-bottom: 6px;
    }
    
    .form-group {
        margin-bottom: 14px;
    }
    
    .login-footer {
        margin-top: 16px;
        padding-top: 12px;
    }
}

