/* ============================================================
   RÉINITIALISATION PASSWORD - DESIGN SÉCURISÉ
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;600;700&display=swap');

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: linear-gradient(135deg, #f0f7f0 0%, #e1f0e1 100%);
    display: flex;
    flex-direction: column;
}

/* --- HEADER --- */
header {
    background: #fff;
    padding: 10px 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

header p {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 0;
}

header #logo img {
    height: 45px;
    width: auto;
    transition: transform 0.3s;
}

header .register {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- CONTENEUR DE RÉINITIALISATION --- */
.reset-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    /* Ajout du fond */
    background: linear-gradient(rgba(0,0,0,0.1), rgba(0,0,0,0.1)), 
                url('/assets/img/login_fond_ecran.png') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    /* Sécurité pour couvrir tout l'écran */
    width: 100%;
    box-sizing: border-box;
}

fieldset {
    width: 100%;
    max-width: 450px;
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
    border: none;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

fieldset legend {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--secondary-color);
    margin-bottom: 15px;
    text-align: center;
    width: 100%;
    letter-spacing: -0.5px;
}

fieldset p {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 30px;
    line-height: 1.5;
}

/* --- FORMULAIRE --- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px;
    background: var(--main-bg);
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    background: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-glow);
    outline: none;
}

/* Erreurs et Success */
.erreur, .invalid-feedback, .error {
    background: #fff5f5;
    color: #e53e3e;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 10px;
    border-left: 4px solid #e53e3e;
}

.success {
    background: #f0fff4;
    color: #2f855a;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 10px;
    border-left: 4px solid #38a169;
}

/* --- BOUTONS --- */
.btn-submit {
    background: var(--primary-color);
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 8px 20px var(--primary-glow);
    border: none;
    cursor: pointer;
    width: 100%;
    margin-top: 20px;
    transition: 0.3s;
}

.btn-submit:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-back {
    display: inline-block;
    padding: 10px 20px;
	background: #ffffff;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.3s;
    border-radius: 10px;
}

.btn-back:hover {
    background: rgba(0,0,0,0.05);
    color: var(--text-main);
}

.inscription, .already-have-code {
    margin-top: 25px;
    text-align: center;
}

.already-have-code a {
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
}

/* --- FOOTER --- */
footer {
    padding: 30px;
    text-align: center;
    background: #fff;
    border-top: 1px solid #eee;
    color: var(--text-muted);
    font-size: 0.85rem;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

/* --- TOASTS --- */
.toast {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 30px;
    border-radius: 15px;
    color: #fff;
    font-weight: 700;
    z-index: 2000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: slideDown 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes slideDown {
    from { transform: translate(-50%, -50px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

.toast-error { background: #e53e3e; }
.toast-success { background: #38a169; }

/* --- RESPONSIVE --- */
@media (max-width: 600px) {
    fieldset {
        padding: 30px 20px;
        border-radius: 20px;
    }
    
    fieldset legend { font-size: 1.4rem; }
    
    header #logo img { height: 35px; }
}