@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: url('https://images.unsplash.com/photo-1544620347-c4fd4a3d5957?q=80&w=1920&auto=format&fit=crop') no-repeat center center/cover;
    overflow: hidden;
    position: relative;
}

/* Overlay sombre avec gradient */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(20, 30, 48, 0.85) 0%, rgba(36, 59, 85, 0.85) 100%);
    z-index: 1;
}

/* Animation de fondu à l'ouverture */
.wrapper {
    position: relative;
    width: 420px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(25px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 45px 40px;
    color: #fff;
    z-index: 2;
    animation: slideUp 0.6s ease-out;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 35px 60px -15px rgba(0, 0, 0, 0.6),
                0 0 0 1px rgba(255, 255, 255, 0.1);
}

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

.wrapper h1 {
    font-size: 32px;
    text-align: center;
    margin-bottom: 25px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.company-logo {
    text-align: center;
    margin-bottom: 15px;
}

.company-logo i {
    font-size: 56px;
    color: #fff;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.wrapper .input-box {
    position: relative;
    width: 100%;
    height: 55px;
    margin: 22px 0;
}

.input-box input {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    outline: none;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-size: 15px;
    color: #fff;
    padding: 20px 50px 20px 20px;
    transition: all 0.3s ease;
}

.input-box input:focus {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
}

.input-box input::placeholder {
    color: rgba(255, 255, 255, 0.7);
    transition: opacity 0.3s ease;
}

.input-box input:focus::placeholder {
    opacity: 0.5;
}

.input-box i {
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
}

.input-box input:focus + i {
    color: #fff;
}

.wrapper .btn {
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    border: none;
    outline: none;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    font-size: 16px;
    color: #2d3748;
    font-weight: 600;
    margin-top: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.wrapper .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.wrapper .btn:hover::before {
    left: 100%;
}

.wrapper .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

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

.alert {
    padding: 14px;
    background: rgba(245, 101, 101, 0.9);
    color: white;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
    border-left: 4px solid #dc2626;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Responsivité Mobile */
@media (max-width: 480px) {
    .wrapper {
        width: 90%;
        margin: 20px;
        padding: 35px 25px;
    }
    
    .wrapper h1 {
        font-size: 26px;
    }
    
    .company-logo i {
        font-size: 48px;
    }
}

@media (max-width: 360px) {
    .wrapper {
        padding: 30px 20px;
    }
}