/* pms-styling.css - PMS form styles (Stabilo/Esquisse theme) */

/* PAGE BACKGROUND (Grid subtil) */
body {
    background-color: #fcfcfc;
    /* Fond très légèrement cassé */
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    /* Plus grands carreaux */
    background-position: center top;
}

/* CONTAINER PRINCIPAL CENTRÉ */
#pms_register-form,
#pms_login-form,
#pms_recover-password-form,
.pms-account-subscription-details {
    max-width: 500px;
    margin: 40px auto;
    padding: 40px;
    background: #ffffff;
    border: 3px solid #000000;
    border-radius: 2px 2px 255px 5px / 255px 5px 2px 2px;
    /* Effet papier main */
    box-shadow: 10px 10px 0 rgba(0, 0, 0, 1);
    font-family: 'Inter', system-ui, sans-serif;
}

/* TITRES DE CHAMPS (LABELS) */
.pms-form-fields-wrapper label {
    display: block;
    margin-bottom: 8px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.9rem;
    color: #111827;
    letter-spacing: 0.5px;
}

/* CHAMPS DE SAISIE AVEC EFFET STABILO */
.pms-form-fields-wrapper input[type="text"],
.pms-form-fields-wrapper input[type="email"],
.pms-form-fields-wrapper input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #000000;
    border-radius: 8px;
    font-size: 1rem;
    line-height: 1.5;
    color: #000;
    background-color: #f9fafb;
    transition: all 0.2s ease;
    box-sizing: border-box;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

/* Effet Stabilo au Focus/Remplissage */
.pms-form-fields-wrapper input:focus,
.pms-form-fields-wrapper input:not(:placeholder-shown) {
    outline: none;
    background-color: #fff !important;
    box-shadow: 4px 4px 0 #000;
    transform: translate(-2px, -2px);
    font-weight: 700;
}

/* Remplacer l'effet sur Input par effet sur Label */
li.pms-field label {
    width: fit-content;
    /* Important pour que le stabilo s'arrête au texte */
    transition: all 0.2s;
    padding: 0 4px;
    /* Un peu d'espace pour le stabilo */
    margin-left: -4px;
}

/* Identifiant -> Jaune */
li.pms-user-login-field:hover label,
li.pms-user-login-field:focus-within label {
    background-image: linear-gradient(120deg, #fde047 0%, #fde047 100%);
    background-repeat: no-repeat;
    background-size: 100% 40%;
    background-position: 0 85%;
}

/* Prénom -> Vert */
li.pms-first-name-field:hover label,
li.pms-first-name-field:focus-within label {
    background-image: linear-gradient(120deg, #86efac 0%, #86efac 100%);
    background-repeat: no-repeat;
    background-size: 100% 40%;
    background-position: 0 85%;
}

/* Nom -> Violet */
li.pms-last-name-field:hover label,
li.pms-last-name-field:focus-within label {
    background-image: linear-gradient(120deg, #d8b4fe 0%, #d8b4fe 100%);
    background-repeat: no-repeat;
    background-size: 100% 40%;
    background-position: 0 85%;
}

/* Email -> Bleu */
li.pms-user-email-field:hover label,
li.pms-user-email-field:focus-within label {
    background-image: linear-gradient(120deg, #60a5fa 0%, #60a5fa 100%);
    background-repeat: no-repeat;
    background-size: 100% 40%;
    background-position: 0 85%;
}

/* Password -> Orange */
li.pms-pass1-field:hover label,
li.pms-pass1-field:focus-within label,
li.pms-pass2-field:hover label,
li.pms-pass2-field:focus-within label {
    background-image: linear-gradient(120deg, #fb923c 0%, #fb923c 100%);
    background-repeat: no-repeat;
    background-size: 100% 40%;
    background-position: 0 85%;
}

/* BOUTONS (SUBMIT) */
#pms_register-form input[type="submit"],
#pms_login-form input[type="submit"],
#pms_recover-password-form input[type="submit"] {
    display: block;
    width: 100%;
    padding: 16px 24px;
    background-color: #fde047;
    /* Jaune Stabilo */
    color: #000000;
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    border: 3px solid #000000;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
    box-shadow: 5px 5px 0 #000;
}

#pms_register-form input[type="submit"]:hover,
#pms_login-form input[type="submit"]:hover,
#pms_recover-password-form input[type="submit"]:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #000;
    background-color: #facc15;
}

/* LISTE DES CHAMPS (RESET UL/LI) */
ul.pms-form-fields-wrapper {
    list-style: none;
    padding: 0;
    margin: 0;
}

ul.pms-form-fields-wrapper li {
    margin-bottom: 0;
    /* Géré par input margin */
}

/* PLANS D'ABONNEMENT (RADIO BUTTONS) */
.pms-subscription-plan {
    margin-bottom: 15px;
    padding: 15px;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.pms-subscription-plan:hover {
    border-color: #000;
    background: #fffbeb;
}

.pms-subscription-plan input[type="radio"] {
    margin-right: 10px;
    transform: scale(1.2);
    accent-color: #fde047;
}

.pms-subscription-plan-price {
    margin-left: auto;
    font-weight: bold;
    font-size: 1.1em;
}

/* MESSAGES D'ERREUR/SUCCÈS */
.pms_error,
.pms_success {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 2px solid #000;
    font-weight: 600;
}

.pms_error {
    background-color: #fee2e2;
    color: #991b1b;
}

.pms_success {
    background-color: #dcfce7;
    color: #166534;
}

/* LIENS (Se connecter / S'inscrire) */
.pms-login-link,
.pms-register-link {
    display: block;
    text-align: center;
    margin-top: 20px;
    font-size: 0.95rem;
    color: #4b5563;
}

.pms-login-link a,
.pms-register-link a {
    color: #000;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-decoration-color: #fde047;
}

/* SOCIAL LOGIN (Nextend) */
div.nsl-container .nsl-button {
    border: 2px solid #000 !important;
    border-radius: 8px !important;
    box-shadow: 4px 4px 0 #000 !important;
    transition: all 0.2s !important;
    font-weight: 700 !important;
}

div.nsl-container .nsl-button:hover {
    transform: translate(2px, 2px) !important;
    box-shadow: 2px 2px 0 #000 !important;
}

/* REASSURANCE TEXT UNDER FORMS */
.pms-form-fields-wrapper+p {
    font-size: 0.85rem;
    color: #6b7280;
    text-align: center;
    margin-top: 15px;
}

/* PASSWORD CRITERIA LIST (MQA) */
.mqa-password-criteria {
    background: #fdfdfd;
    border: 2px dashed #e5e7eb;
    border-radius: 8px;
    padding: 10px 15px;
    margin-top: 5px;
    margin-bottom: 20px;
    font-size: 0.85rem;
}

.mqa-criteria-title {
    margin: 0 0 8px 0;
    font-weight: 700;
    color: #374151;
    font-size: 0.75rem;
    /* Smaller font size requested */
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mqa-password-criteria ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mqa-criterion {
    position: relative;
    padding-left: 20px;
    margin-bottom: 2px;
    color: #9ca3af;
    /* Default gray */
    transition: color 0.3s;
}

.mqa-criterion::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #9ca3af;
}

/* Valid State */
.mqa-criterion.mqa-valid {
    color: #16a34a;
    /* Green */
    font-weight: 600;
}

.mqa-criterion.mqa-valid::before {
    content: '✓';
    color: #16a34a;
}

/* Invalid State (optional red, keep gray for neutral start) */
.mqa-criterion.mqa-invalid {
    /* color: #dc2626; */
}

/* FIX CHECKOUT MOBILE SPACING issues */
@media (max-width: 768px) {

    /* Reduce spacing between checkboxes in the acceptance container */
    .pms-accept-field ul.pms-form-fields-wrapper li,
    .pms-field.pms-checkbox-field {
        margin-bottom: 10px !important;
    }

    /* Target the specific container for terms if it has a red border/alert style */
    .pms_error,
    .pms-field-error {
        /* General error box adjustments if needed */
    }
}
