:root {
    --primary-color: #36a3a3;
    --primary-dark: #2cc1b1;
    --secondary-color: #32d65d;
    --accent-color: #2cc1b1;
    --error-color: #ea4335;
    --text-color: #202124;
    --text-secondary: #5f6368;
    --bg-color: #f1f3f4;
    --white: #ffffff;
    --shadow-color: rgba(60, 64, 67, 0.3);
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--white) 100%);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background-color: transparent;
    padding: 3rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.header img {
    height: 200px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

.login-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    margin-top: -2rem;
}

.login-box {
    background-color: var(--white);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: 0 10px 30px var(--shadow-color);
    width: 100%;
    max-width: 470px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.login-box:hover {
    box-shadow: 0 15px 35px var(--shadow-color);
}

.login-box h2 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 600;
    font-size: 2rem;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
    transition: all 0.3s ease;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-group i {
    position: absolute;
    left: 1rem;
    top: 2.75rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.form-group input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.form-group input:focus {
    border-color: var(--primary-color);
    background-color: var(--white);
    box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.1);
    outline: none;
}

button[type="submit"] {
    width: 100%;
    padding: 1.2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 2rem;
    position: relative;
    overflow: hidden;
}

button[type="submit"]:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 20px rgba(26, 115, 232, 0.3);
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
}

button[type="submit"]:active {
    transform: translateY(0) scale(0.98);
}

.forgot-password {
    text-align: right;
    margin-top: 1rem;
}

.forgot-password a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.forgot-password a:hover {
    color: var(--primary-color);
    transform: translateX(3px);
}

.forgot-password i {
    font-size: 0.8rem;
}

.error {
    background-color: rgba(234, 67, 53, 0.1);
    color: var(--error-color);
    padding: 1.2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid rgba(234, 67, 53, 0.2);
    backdrop-filter: blur(8px);
}

.error i {
    font-size: 1.4rem;
    animation: shake 0.8s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

@media (max-width: 480px) {
    .login-box {
        padding: 2rem;
        margin: 1rem;
    }

    .header img {
        height: 80px;
    }

    .login-box h2 {
        font-size: 1.75rem;
    }
}

.profile-menu-wrapper {
    display: flex;
    align-items: center;
    margin-top: 20px;
}

.profile-btn {
    display: inline-block;
    cursor: pointer;
    background: none;
}

.profile-menu {
    display: none;
    position: absolute;
    top: 60px;
    right: -10px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 10;
}

.profile-menu-item {
    display: block;
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #ccc;
}

.profile-menu-item.logout {
    color: red;
}

/* Styles pour les pages de réinitialisation de mot de passe */
.message-box {
    background-color: var(--bg-color);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.message-box i {
    font-size: 2rem;
    color: var(--primary-color);
}

.message-box p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.success-icon {
    font-size: 3.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.back-to-login {
    text-align: center;
    margin-top: 2rem;
}

.back-to-login a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.back-to-login a:hover {
    color: var(--primary-color);
    transform: translateX(-3px);
}

/* Styles pour les messages de succès */
.success-message {
    text-align: center;
    margin-bottom: 2rem;
}

.success-message i {
    display: block;
    margin-bottom: 1rem;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.success-message p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}