/* Page Connexion - Style harmonisé PFT-INNOVALO */

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

body {
    font-family: "Google Sans Code", monospace;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Effet de fond animé */
body::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(204, 3, 3, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveBackground 20s linear infinite;
    z-index: 0;
}

@keyframes moveBackground {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Section principale */
section {
    position: relative;
    z-index: 1;
    background: white;
    padding: 50px 60px;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
    animation: fadeInUp 0.8s ease-out;
    transition: all 0.4s ease;
}

section:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 70px rgba(204, 3, 3, 0.15);
}

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

/* Titre */
h1 {
    color: #CC0303;
    font-size: 2.2em;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    font-weight: 700;
    letter-spacing: 1px;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #CC0303, #ff4444);
    border-radius: 2px;
}

/* Input boxes */
.input-box {
    position: relative;
    margin-bottom: 25px;
}

.input-box input {
    width: 100%;
    padding: 16px 20px 16px 55px;
    border: 2px solid #e8ecf1;
    border-radius: 15px;
    font-family: "Google Sans Code", monospace;
    font-size: 1em;
    color: #2c3e50;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.input-box input:focus {
    outline: none;
    border-color: #CC0303;
    background: white;
    box-shadow: 0 0 0 4px rgba(204, 3, 3, 0.1);
}

.input-box input::placeholder {
    color: #95a5a6;
}

.input-box img {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.input-box input:focus ~ img {
    opacity: 1;
    filter: brightness(0) saturate(100%) invert(11%) sepia(97%) saturate(6588%) hue-rotate(357deg) brightness(92%) contrast(118%);
}

/* Remember & Forgot */
.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    font-size: 0.95em;
}

.remember-forgot label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #34495e;
    cursor: pointer;
    transition: color 0.3s ease;
}

.remember-forgot label:hover {
    color: #CC0303;
}

.remember-forgot input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #CC0303;
}

.remember-forgot a {
    color: #CC0303;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
}

.remember-forgot a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #CC0303, #ff4444);
    transition: width 0.3s ease;
}

.remember-forgot a:hover::after {
    width: 100%;
}

/* Bouton de connexion */
.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #CC0303, #ff4444);
    color: white;
    border: none;
    border-radius: 15px;
    font-family: "Google Sans Code", monospace;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 6px 20px rgba(204, 3, 3, 0.3);
    position: relative;
    overflow: hidden;
}

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

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(204, 3, 3, 0.4);
    background: linear-gradient(135deg, #ff4444, #CC0303);
}

.login-btn:hover::before {
    left: 100%;
}

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

/* Responsive */
@media screen and (max-width: 600px) {
    section {
        padding: 40px 30px;
        border-radius: 25px;
    }

    h1 {
        font-size: 1.8em;
        margin-bottom: 30px;
    }

    .input-box input {
        padding: 14px 18px 14px 50px;
        font-size: 0.95em;
    }

    .input-box img {
        width: 20px;
        height: 20px;
        left: 16px;
    }

    .remember-forgot {
        font-size: 0.9em;
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .login-btn {
        padding: 14px;
        font-size: 1em;
    }
}

@media screen and (max-width: 400px) {
    body {
        padding: 15px;
    }

    section {
        padding: 30px 25px;
    }

    h1 {
        font-size: 1.6em;
    }
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #CC0303, #ff4444);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #990202, #CC0303);
}