/* === FORMS === */
.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
    color: #333;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    pointer-events: none;
}

input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
    outline: none;
    background: #f9f9f9;
    color: #333;
}

input::placeholder {
    color: #bbb;
}

input:focus {
    border-color: #0f3460;
    box-shadow: 0 0 0 3px rgba(15, 52, 96, 0.12);
    background: #fff;
}

input.valid {
    border-color: #28a745;
    background-color: #f0fff4;
}

input.invalid {
    border-color: #dc3545;
    background-color: #fff5f5;
}

/* Icône de statut (✔ / ✘) à droite */
.status-icon {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    display: none;
}

/* Toggle password */
.toggle-password {
    position: absolute;
    right: 36px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 17px;
    color: #aaa;
    transition: color 0.2s;
    user-select: none;
}

.toggle-password:hover {
    color: #0f3460;
}

.error-msg {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    padding-left: 2px;
    display: none;
    animation: fadeIn 0.2s ease;
}

.success-msg {
    color: #28a745;
    font-size: 12px;
    margin-top: 5px;
    padding-left: 2px;
    display: none;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Barre de force du mot de passe */
.strength-wrapper {
    margin-top: 8px;
    display: none;
}

.strength-bar {
    display: flex;
    gap: 5px;
    margin-bottom: 5px;
}

.strength-segment {
    flex: 1;
    height: 5px;
    border-radius: 3px;
    background: #e0e0e0;
    transition: background 0.4s;
}

.strength-label {
    font-size: 12px;
    font-weight: 600;
}

/* Critères du mot de passe */
.criteria-list {
    list-style: none;
    margin-top: 10px;
    display: none;
}

.criteria-list li {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 4px;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.criteria-list li.met {
    color: #28a745;
}

.criteria-list li::before {
    content: "✘";
    font-weight: bold;
    color: #dc3545;
}

.criteria-list li.met::before {
    content: "✔";
    color: #28a745;
}

/* Confirmation password */
#confirmPassword {
    padding-right: 42px;
}

/* Séparateur */
.divider {
    height: 1px;
    background: #eee;
    margin: 10px 0 22px;
}

/* Checkbox CGU */
.cgu-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 22px;
}

.cgu-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    padding: 0;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #0f3460;
}

.cgu-group label {
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0;
    color: #555;
    cursor: pointer;
    font-weight: 400;
}

.cgu-group label a {
    color: #0f3460;
    font-weight: 600;
    text-decoration: none;
}

.cgu-group label a:hover {
    text-decoration: underline;
}

#cguError {
    color: #dc3545;
    font-size: 12px;
    margin-top: -14px;
    margin-bottom: 14px;
    display: none;
}

/* Bouton */
button[type="submit"] {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #0f3460, #16213e);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: transform 0.2s, box-shadow 0.2s;
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(15, 52, 96, 0.4);
}

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

/* Alerte globale de succès */
.alert-success {
    display: none;
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border: 1px solid #b1dfbb;
    padding: 14px 18px;
    border-radius: 10px;
    text-align: center;
    margin-top: 16px;
    font-weight: 600;
    font-size: 15px;
    animation: fadeIn 0.4s ease;
}

/* Lien connexion */
.login-link {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: #888;
}

.login-link a {
    color: #0f3460;
    font-weight: 700;
    text-decoration: none;
}

.login-link a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 480px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-container {
        padding: 30px 22px;
    }
}