* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: url('https://media.istockphoto.com/id/1417380971/video/vj-80s-retro-futuristic-grid-horizon.jpg?s=640x640&k=20&c=wRQabaKHWy6TUKIhw6ltVK7KrtPeCiT0hdUrNYE_3GE=') no-repeat center center fixed;
    background-size: cover;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-container {
    display: flex;
    background: rgba(10, 5, 20, 0.6);
    border: 1px solid #444;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    width: 90%;
    max-width: 480px;
    max-height: 650px;
    padding: 30px 20px;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.5);
}

.guest-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
}

.form-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* important */
    padding: 20px;
    position: relative;
}

.toggle-header {
    display: flex;
    justify-content: space-around;
    position: relative;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.tab {
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    color: #fff;
}

.tab.active {
    color: #fff;
}

.underline {
    position: absolute;
    bottom: -2px;
    height: 2px;
    width: 50%;
    background: white;
    left: 0;
    transition: left 0.3s ease;
}

.form-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* centre le formulaire + auth */
    align-items: center;
    padding-bottom: 40px;
    /* espace pour le texte fixe en bas */
}

.form {
    display: flex;
    flex-direction: column;
    gap: 7px;
    width: 90%;
    max-width: 420px;
    margin: 0 auto;
}

input {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #444;
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.input-icon {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

/* Penultimate input (e.g. password) – remove extra space */
/* .auth-container .input-icon:nth-last-child(2) {
    margin-bottom: 10px;
} */


.input-icon input {
    width: 100%;
    padding-left: 40px;
    /* espace pour l’icône à gauche */
}

.input-icon .icon {
    position: absolute;
    left: 12px;
    color: #aaa;
    font-size: 1rem;
    pointer-events: none;
}


button {
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: var(--gradient-primary);
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    opacity: 0.9;
}

.oauth-label {
    text-align: center;
    font-size: 0.9rem;
    color: #ccc;
    margin: 0;
    font-weight: 500;
    margin-top: 10px;
}

.oauth-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.oauth-btn {
    width: 33px;
    height: 33px;
    border-radius: 50%;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    cursor: pointer;
}

.oauth-btn img {
    width: 24px;
    height: 24px;
}

.oauth-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(255, 77, 239, 0.3);
}

.switch-text {
    font-size: 0.85rem;
    text-align: center;
    color: #fff;
    margin-top: auto;
    padding-top: 10px;
}

.switch-text a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
}

.hidden {
    display: none;
}

.guest-box {
    border-left: 1px solid #555;
    padding-left: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.guest-box h2 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 10px;
}

.guest-box p {
    color: #ddd;
    margin-bottom: 20px;
}

.guest-btn {
    padding: 12px 20px;
    border-radius: 25px;
    background: var(--gradient-primary);
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.bottom-links {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 100%;
    text-align: center;
    padding: 0 10px;
    /* évite débordement sur petits écrans */
    box-sizing: border-box;
}

.popup-error {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 77, 77, 0.95);
    color: white;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.4);
    z-index: 9999;
    animation: fadeInDown 0.5s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate(-50%, -20px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}


/* Glue “mot de passe oublié ?” link to the password input */
.auth-container .forgot-link {
    width: 100%;
    align-items: flex-end;
    text-align: right;
    margin-top: -0.5rem;       /* pull upward toward the field */
    margin-bottom: 0.75rem;    /* preserve global rhythm below */
    font-size: 0.85rem;
    color: var(--secondary-color);
}

.auth-container .forgot-link a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
    width: 100%;
}

.auth-container .forgot-link a:hover {
    color: var(--primary-color);
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.terms {
    font-size: 0.85rem;
    color: #aaa;
    margin-bottom: 10px;
    width: 100%;
    text-align: center;
}

.terms-link {
    color: white;
    font-weight: 600;
}

.btn-retour-landing{
    position: absolute; 
    top: 20px; 
    left: 30px; 
    z-index: 10; 
    text-decoration: none; 
    background: #7b61ff; 
    color: #fff; 
    padding: 8px 18px; 
    border-radius: 25px; 
    background: var(--gradient-primary);
    color: white;
    font-weight: bold;
    font-size: 0.8rem;
}