/* style.css */

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

body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #111, #222);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* --- Card --- */
.card {
    background: #1b1b1b;
    padding: 40px;
    border-radius: 12px;
    width: 350px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
}

h2 {
    text-align: center;
    font-weight: 600;
    margin-bottom: 20px;
}

/* --- Form --- */
label {
    font-size: 14px;
    font-weight: 500;
}

input {
    width: 100%;
    height: 40px;
    padding: 0 10px;
    margin-top: 6px;
    margin-bottom: 18px;
    border-radius: 6px;
    border: none;
    background: #2c2c2c;
    color: white;
    font-size: 16px;
}

/* --- Bouton principal --- */
button {
    width: 100%;
    padding: 12px;
    background: #ffba08;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    transition: 0.3s;
}

button:hover {
    background: #ff9900;
}

/* --- Messages --- */
.error {
    color: #ff5050;
    text-align: center;
    margin-bottom: 10px;
}

.success {
    color: #4caf50;
    text-align: center;
    margin-bottom: 10px;
}

/* --- Links --- */
.register-link,
.login-link,
.forgot-link {
    display: block;
    margin-top: 15px;
    text-align: center;
    color: #ffba08;
    text-decoration: none;
}

.register-link:hover,
.login-link:hover,
.forgot-link:hover {
    text-decoration: underline;
}

/* --- Password wrapper --- */
.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper input {
    width: 100%;
    height: 40px;            /* même hauteur que les autres inputs */
    padding: 0 42px 0 10px;  /* padding droit pour bouton */
    border-radius: 6px;
    border: none;
    background: #2c2c2c;
    color: white;
    font-size: 16px;
    box-sizing: border-box;
}

.password-wrapper .toggle-password {
    position: absolute;
    right: 5px;
    top: 0;
    bottom: 0;
    height: 30px;             /* carré */
    width: 30px;
    border: none;
    background: #3f3f3f;
    padding: 0;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ffba08;
    border-radius: 6px;
}

.password-wrapper .toggle-password svg {
    width: 15px;
    height: 15px;
}

/* --- Responsive mobile --- */
@media (max-width: 768px) {
    body {
        padding: 20px;
    }

    .card {
        width: 100%;
        padding: 20px;
        box-shadow: none;
    }

    input {
        height: 50px;
        font-size: 18px;
    }

    button {
        height: 50px;
        font-size: 18px;
    }

    .password-wrapper .toggle-password {
        width: 36px;
        height: 36px;
    }

    h2 {
        font-size: 24px;
    }
}