/**
 * Styles pour les formulaires de connexion et d'inscription
 * Design moderne et épuré - 2025
 */

/* ======================
   Variables & Reset
   ====================== */
:root {
    --auth-primary: #FF3200;
    --auth-primary-hover: #e62d00;
    --auth-dark: #1a1a1a;
    --auth-gray: #6b7280;
    --auth-light-gray: #f3f4f6;
    --auth-border: #e5e7eb;
    --auth-success: #10b981;
    --auth-error: #ef4444;
    --auth-radius: 12px;
    --auth-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --auth-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* ======================
   Layout Principal
   ====================== */
.login-form,
.register-form {
    max-width: 89%;
    margin: 0 auto;
    padding: 0;
}

.page-customer-account button.btn.btn-primary.form-control-submit.float-xs-right {
    width: 100%;
}

#content-wrapper.col-xs-12 {
    max-width: 100%;
    margin: 0 auto;
}

.page-content.card {
    background: #fff;
    border-radius: var(--auth-radius);
    box-shadow: var(--auth-shadow-lg);
    border: 1px solid var(--auth-border);
    padding: 48px 40px;
}

@media (max-width: 768px) {
    .page-content.card {
        padding: 24px 16px;
        border-radius: 16px;
        box-shadow: var(--auth-shadow);
    }
}

/* ======================
   Header
   ====================== */
.page-header {
    text-align: center;
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--auth-dark);
    margin: 0;
    letter-spacing: -0.5px;
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 22px;
        margin-bottom: 24px;
    }
}

/* ======================
   Messages Introduction
   ====================== */
.register-form>p {
    text-align: center;
    color: var(--auth-gray);
    font-size: 15px;
    margin-bottom: 32px;
}

.register-form>p a {
    color: var(--auth-primary);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.register-form>p a:hover {
    color: var(--auth-primary-hover);
}

/* ======================
   Form Groups
   ====================== */
.form-group.row {
    margin-bottom: -3px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.form-group.row label.form-control-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--auth-dark);
    margin-bottom: 8px;
    width: 100%;
    text-align: left;
}

.form-group.row label.form-control-label.required::after {
    content: " *";
    color: var(--auth-error);
}

.form-group.row .js-input-column {
    width: 98%;
    margin: 0;
}

.form-group.row .form-control-comment {
    display: none;
}

@media (max-width: 768px) {
    .form-group.row {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 16px;
    }

    .form-group.row label.form-control-label {
        font-size: 16px;
        margin-bottom: 4px;
    }

    .form-group.row .js-input-column {
        width: 100%;
    }
}

/* ======================
   Inputs
   ====================== */
.form-control {
    width: 90%;
    padding: 12px 16px;
    font-size: 15px;
    color: var(--auth-dark);
    background: #fff;
    border: 2px solid var(--auth-border);
    border-radius: 0px;
    transition: all 0.2s ease;
    font-family: "TT Fors Trial Variable", sans-serif;
}

.form-control:focus {
    outline: none;
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(255, 50, 0, 0.1);
}

.form-control::placeholder {
    color: #9ca3af;
}

@media (max-width: 768px) {
    .form-control {
        width: 100%;
        padding: 14px;
        font-size: 16px;
        border-radius: var(--auth-radius);
    }
}

/* Input group pour le mot de passe */
.input-group.js-parent-focus {
    position: relative;
    display: flex;
}

.input-group.js-parent-focus .form-control {
    border-radius: 8px 0 0 8px;
    border-right: none;
}

.input-group-btn {
    display: flex;
}

.input-group-btn .btn {
    padding: 12px 16px;
    background: var(--auth-light-gray);
    border: 2px solid var(--auth-border);
    border-left: none;
    border-radius: 0 8px 8px 0;
    color: var(--auth-gray);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.input-group-btn .btn:hover {
    background: #e5e7eb;
    color: var(--auth-dark);
}

@media (max-width: 768px) {
    .input-group.js-parent-focus .form-control {
        border-radius: var(--auth-radius) 0 0 var(--auth-radius);
    }

    .input-group-btn .btn {
        border-radius: 0 var(--auth-radius) var(--auth-radius) 0;
    }
}

/* ======================
   Radio Buttons (Genre)
   ====================== */
.radio-inline {
    display: inline-flex;
    align-items: center;
    margin-right: 24px;
    cursor: pointer;
    user-select: none;
}

.custom-radio {
    position: relative;
    display: inline-flex;
    align-items: center;
}




.custom-radio input[type="radio"]:checked~span:last-child {
    border-color: var(--auth-primary);
    background: var(--auth-primary);
}

.custom-radio input[type="radio"]:checked~span:last-child::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
}

.radio-inline:hover .custom-radio span:last-child {
    border-color: var(--auth-primary);
}

/* ======================
   Checkboxes
   ====================== */

/* Masquer le label vide pour les form-group contenant des checkboxes */
.form-group.row:has(.custom-checkbox) label.form-control-label {
    display: none;
}

.custom-checkbox {
    display: block;
    margin: 0;
}

.custom-checkbox label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    color: var(--auth-gray);
    line-height: 1.5;
    margin-top: 18px;
}

.custom-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.custom-checkbox label>span:first-child {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 2px solid var(--auth-border);
    border-radius: 4px;
    margin-right: 12px;
    margin-top: 2px;
    position: relative;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-checkbox input[type="checkbox"]:checked~span:first-child {
    background: var(--auth-primary);
    border-color: var(--auth-primary);
}

.custom-checkbox .material-icons.checkbox-checked {
    display: none;
    color: #fff;
    font-size: 16px;
}

.custom-checkbox input[type="checkbox"]:checked~span:first-child .material-icons.checkbox-checked {
    display: block;
}

.custom-checkbox label:hover>span:first-child {
    border-color: var(--auth-primary);
}

.custom-checkbox label em {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #9ca3af;
    font-style: normal;
}

/* Ajouter l'astérisque pour les checkboxes obligatoires */
.form-group.row:has(.custom-checkbox input[required]) .custom-checkbox label>span:last-child::after {
    content: " *";
    color: var(--auth-error);
    font-weight: 700;
    margin-left: 19px;
    /* margin-top: 13px; */
}

/* ======================
   Form Controls Comments
   ====================== */
.form-control-comment {
    font-size: 12px;
    color: var(--auth-gray);
    margin-top: 6px;
    display: block;
}

/* ======================
   Password Strength
   ====================== */
.field-password-policy {
    position: relative;
}

.password-strength-feedback {
    margin-top: 12px;
    padding: 12px;
    background: var(--auth-light-gray);
    border-radius: 8px;
}

.password-strength-feedback .progress {
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    overflow: hidden;
}

.password-strength-feedback .progress-bar {
    height: 100%;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.password-strength-text {
    font-size: 13px;
    font-weight: 600;
    margin-top: 8px;
    margin-bottom: 8px;
}

.password-requirements p {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--auth-gray);
    margin: 6px 0;
}

.password-requirements .material-icons {
    font-size: 16px;
    color: #9ca3af;
}

.password-requirements p.valid .material-icons {
    color: var(--auth-success);
}

/* ======================
   Buttons
   ====================== */
.page-customer-account.btn-primary button[type="submit"] {
    width: 100%;
    padding: 14px 24px;
    background: var(--auth-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: "TT Fors Trial Variable", sans-serif;
    box-shadow: 0 4px 12px rgba(255, 50, 0, 0.2);
    justify-content: center;
}

.page-customer-account .btn-primary:hover button[type="submit"]:hover {
    background: var(--auth-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 50, 0, 0.3);
}

.page-customer-account .btn-primary:active button[type="submit"]:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .page-customer-account.btn-primary button[type="submit"] {
        padding: 16px;
        font-size: 18px;
        border-radius: var(--auth-radius);
    }
}

/* Center the login button and adjust its width */
@media (max-width: 768px) {
    .form-footer button[type="submit"] {
        display: block;
        margin: 0 auto;
        width: 100%;
        max-width: 300px;
    }
}

/* ======================
   Footer Links
   ====================== */
.forgot-password {
    text-align: right;
    margin-top: 12px;
    margin-bottom: 24px;
}

.forgot-password a {
    color: var(--auth-primary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

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

@media (max-width: 768px) {
    .forgot-password {
        text-align: center;
        margin-top: 16px;
    }

    .forgot-password a {
        font-size: 15px;
    }
}

/* ======================
   No Account Section
   ====================== */
.form-footer {
    margin-top: 32px;
}

hr {
    margin: 32px 0;
    border: none;
    border-top: 1px solid var(--auth-border);
}

.no-account {
    text-align: center;
    margin-top: 24px;
}

.no-account a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    color: var(--auth-primary);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid var(--auth-primary);
    border-radius: 8px;
    transition: all 0.2s;
}

.no-account a:hover {
    background: var(--auth-primary);
    color: #fff;
}

@media (max-width: 768px) {
    .no-account a {
        padding: 14px 20px;
        font-size: 16px;
        border-radius: var(--auth-radius);
        margin-bottom: 3%;
    }
}

/* ======================
   Breadcrumb
   ====================== */


.breadcrumb li {
    display: flex;
    align-items: center;
    font-size: 14px;
}

.breadcrumb li::after {
    content: '/';
    margin: 0 8px;
    color: var(--auth-gray);
}

.breadcrumb li:last-child::after {
    display: none;
}

.breadcrumb a {
    color: var(--auth-gray);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--auth-primary);
}

.breadcrumb li:last-child span {
    color: var(--auth-primary);
    font-weight: 600;
}

@media (max-width: 768px) {
    .breadcrumb ol {
        flex-direction: column;
        align-items: center;
    }

    .breadcrumb li {
        margin-bottom: 8px;
    }
}

/* ======================
   Responsive
   ====================== */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 24px;
    }


    .page-authentication #content,
    .page-registration #content {
        padding: 0rem;
        background: #fff;
        max-width: 100%;
        margin: 0 auto;
    }


    .custom-checkbox label {
        display: flex;
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
        align-content: center;
        justify-content: flex-start;
    }

    .radio-inline {
        margin-right: 16px;
        margin-bottom: 12px;
    }

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

    /* Adjust form width and alignment */
    .login-form,
    .register-form {
        max-width: 100%;
        padding: 16px;
    }

    /* ======================
       Animations
       ====================== */
    @keyframes slideIn {
        from {
            opacity: 0;
            transform: translateY(10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .page-content.card {
        animation: slideIn 0.4s ease;
    }
}

/* ======================
   Focus States
   ====================== */
.form-control:focus,
.custom-radio input:focus~span:last-child,
.custom-checkbox input:focus~span:first-child {
    outline: none;
}

.custom-radio input:focus~span:last-child {
    box-shadow: 0 0 0 3px rgba(255, 50, 0, 0.1);
}

.custom-checkbox input:focus~span:first-child {
    box-shadow: 0 0 0 3px rgba(255, 50, 0, 0.1);
}