/* assets/style_connexion.css */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* Styles de base pour le corps */
body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #1db1be, #2980b9);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
}

/* Effet de fond animé */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 70%);
    animation: orbitalSpin 8s infinite linear;
    z-index: -1;
}

/* Conteneur principal */
.login-container {
    padding: 20px;
    width: 100%;
    max-width: 450px;
    text-align: center;
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Logo */
.logo-container {
    margin-bottom: 30px;
    animation: fadeIn 0.8s ease-in-out;
}

.logo {
    max-width: 180px;
    height: auto;
    filter: drop-shadow(2px 2px 6px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

/* Titre */
.login-title {
    color: #ffffff;
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3);
    position: relative;
}

.login-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #f8a62b, #e67e22);
    border-radius: 2px;
    animation: subtleStretch 1.5s infinite ease-in-out;
}

/* Formulaire */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Groupe de formulaire */
.form-group {
    position: relative;
    text-align: left;
}

/* Étiquettes */
.form-label {
    font-weight: 600;
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 8px;
    display: block;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

/* Conteneur des inputs avec icônes */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

/* Icônes dans les champs */
.input-icon {
    position: absolute;
    left: 15px;
    color: #f8a62b;
    font-size: 1.3rem;
    z-index: 1;
    animation: syncPulse 2s infinite ease-in-out; /* Sans glow */
}

/* Icône pour afficher/masquer le mot de passe */
.toggle-password {
    position: absolute;
    right: 15px;
    color: #f8a62b;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 1;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: #e67e22;
}

/* Champs de saisie */
.form-input {
    width: 100%;
    padding: 14px 50px 14px 50px; /* Ajusté pour laisser de la place à droite pour l'icône */
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    color: #333;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.form-input:focus {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(248, 166, 43, 0.4);
    background: #ffffff;
    outline: none;
}

.form-input::placeholder {
    color: #888;
    font-style: italic;
}

/* Bouton de connexion */
.login-btn {
    background: linear-gradient(135deg, #f8a62b, #e67e22);
    border: none;
    border-radius: 30px;
    padding: 14px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: syncPulse 2s infinite ease-in-out; /* Sans glow */
}

.login-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, #e67e22, #d35400);
}

.login-btn:hover::after {
    width: 200%;
    height: 200%;
}

.login-btn:active {
    transform: translateY(1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

/* Message d'erreur */
.error-message {
    background: rgba(231, 76, 60, 0.9); /* Rouge doux */
    color: #ffffff;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 1rem;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    animation: fadeIn 0.5s ease-in-out;
}

/* Animations */
@keyframes orbitalSpin {
    0% {
        transform: rotate(0deg) scale(1);
        opacity: 0.2;
    }
    50% {
        transform: rotate(180deg) scale(1.15);
        opacity: 0.3;
    }
    100% {
        transform: rotate(360deg) scale(1);
        opacity: 0.2;
    }
}

@keyframes subtleStretch {
    0% {
        width: 60px;
    }
    50% {
        width: 100px;
    }
    100% {
        width: 60px;
    }
}

@keyframes syncPulse {
    0% {
        transform: scale(1) translateY(0);
    }
    25% {
        transform: scale(1.05) translateY(-5px);
    }
    50% {
        transform: scale(1) translateY(0);
    }
    75% {
        transform: scale(1.05) translateY(5px);
    }
    100% {
        transform: scale(1) translateY(0);
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Adaptation mobile */
@media (max-width: 576px) {
    .login-container {
        padding: 15px;
    }

    .login-title {
        font-size: 2rem;
    }

    .form-input {
        padding: 12px 45px 12px 45px; /* Ajusté pour mobile */
        font-size: 0.9rem;
    }

    .login-btn {
        font-size: 1rem;
        padding: 12px;
    }

    .input-icon {
        font-size: 1.1rem;
    }

    .toggle-password {
        font-size: 1rem;
    }

    .form-label {
        font-size: 0.9rem;
    }
}