/* =========================================
   DRAKULA CARS - CONNEXION / INSCRIPTION
========================================= */

.auth-page {
    height: 100vh;
    min-height: 600px;
    margin: 0;
    overflow: hidden;
    background: #ffffff;
    color: #172b4d;
    font-family: 'Manrope', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.auth-page *,
.auth-page *::before,
.auth-page *::after {
    box-sizing: border-box;
}

/* STRUCTURE PRINCIPALE */

.auth-unified-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    height: 100vh;
    min-height: 600px;
}

/* =========================================
   PANNEAU GAUCHE : CONNEXION
========================================= */

.auth-login-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    min-height: 0;
    padding: 20px clamp(30px, 5vw, 75px);
    overflow: hidden;
    background: linear-gradient(
        145deg,
        #101f36 0%,
        #172b4d 75%,
        #203b62 100%
    );
    color: #ffffff;
}

.auth-login-panel::before,
.auth-login-panel::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(213, 164, 59, 0.15);
    border-radius: 50%;
    pointer-events: none;
}

.auth-login-panel::before {
    width: 600px;
    height: 600px;
    right: -320px;
    bottom: -280px;
}

.auth-login-panel::after {
    width: 430px;
    height: 430px;
    right: -225px;
    bottom: -195px;
}

/* LOGO */

.auth-logo {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 340px;
    height: 190px;
    min-height: 190px;
    max-width: 100%;
    margin: 0 auto 20px;
    padding: 10px;
    text-decoration: none;
}

.auth-logo-image {
    display: block;
    width: 100%;
    max-width: 320px;
    max-height: 180px;
    height: auto;
    object-fit: contain;
}

/* CONTENU CONNEXION */

.auth-login-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
}

.auth-heading {
    margin-bottom: 22px;
}

.auth-label {
    display: block;
    margin-bottom: 9px;
    color: #d5a43b;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
}

.auth-heading h1 {
    margin: 0 0 10px;
    color: #ffffff;
    font-size: 32px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -1px;
}

.auth-heading p {
    margin: 0;
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    line-height: 1.65;
}

/* =========================================
   PANNEAU DROIT : INSCRIPTION
========================================= */

.auth-register-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    padding: 18px clamp(28px, 4.5vw, 68px) 12px;
    overflow: hidden;
    background: #ffffff;
    color: #172b4d;
}

.auth-back {
    display: inline-block;
    align-self: flex-end;
    margin-bottom: 14px;
    color: #788397;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-back:hover {
    color: #b58a2e;
}

.auth-register-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
}

/* BIENVENUE */

.auth-welcome-header {
    margin-bottom: 17px;
    padding-bottom: 0;
    border-bottom: none;
}

.auth-welcome-header .auth-label {
    display: none;
}

.auth-welcome-header h2 {
    margin: 0 0 8px;
    color: #172b4d;
    font-size: 32px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -1px;
}

.auth-welcome-header p {
    max-width: 500px;
    margin: 0;
    color: #778196;
    font-size: 13px;
    line-height: 1.55;
}

/* TITRE INSCRIPTION */

.auth-register-heading {
    margin-bottom: 15px;
}

.auth-register-heading h2 {
    margin: 0 0 5px;
    color: #172b4d;
    font-size: 32px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -1px;
}

.auth-register-heading p {
    margin: 0;
    color: #778196;
    font-size: 12px;
    line-height: 1.5;
}

/* =========================================
   FORMULAIRES ET CHAMPS
========================================= */

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.auth-register-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.auth-field label {
    color: #263956;
    font-size: 11px;
    font-weight: 700;
}

.auth-field input {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 41px;
    padding: 0 12px;
    border: 1px solid #dce1e8;
    border-radius: 5px;
    outline: none;
    background: #ffffff;
    color: #172b4d;
    font-family: inherit;
    font-size: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-field input::placeholder {
    color: #aab1bd;
}

.auth-field input:focus {
    border-color: #d5a43b;
    box-shadow: 0 0 0 3px rgba(213, 164, 59, 0.13);
}

/* CHAMPS DU PANNEAU BLEU */

.auth-login-panel .auth-field label {
    color: #ffffff;
}

.auth-login-panel .auth-field input {
    background: #ffffff;
    color: #172b4d;
}

/* =========================================
   AFFICHER / MASQUER LE MOT DE PASSE
========================================= */

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
}

.password-input-wrapper input {
    width: 100%;
    min-width: 0;
    padding-right: 45px !important;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 9px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 5px;
    transform: translateY(-50%);
    border: none;
    border-radius: 4px;
    outline: none;
    background: transparent;
    color: #788397;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.password-toggle:hover {
    background: rgba(213, 164, 59, 0.10);
    color: #b58a2e;
}

.password-toggle:focus-visible {
    outline: 2px solid #d5a43b;
    outline-offset: 2px;
}

.password-toggle svg {
    display: block;
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.password-toggle .eye-closed {
    display: none;
}

.password-toggle[aria-pressed="true"] .eye-open {
    display: none;
}

.password-toggle[aria-pressed="true"] .eye-closed {
    display: block;
}

/* =========================================
   BOUTONS
========================================= */

.auth-submit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 48px;
    min-height: 48px;
    margin-top: 5px;
    padding: 0 18px;
    border: 1px solid #d5a43b;
    border-radius: 5px;
    background: #d5a43b;
    color: #101f36;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.auth-submit:hover {
    background: #e5bd65;
    transform: translateY(-2px);
}

.auth-submit span:last-child {
    color: #172b4d;
    font-size: 21px;
}

.auth-register-form .auth-register-submit {
    grid-column: 1 / -1;
}

.auth-register-submit {
    height: 48px;
    min-height: 48px;
    margin-top: 3px;
}

/* =========================================
   ERREURS
========================================= */

.auth-error {
    width: 100%;
    margin: 0 auto 12px;
    padding: 10px 13px;
    border: 1px solid #edcaca;
    border-radius: 6px;
    background: #fff2f2;
    color: #a52d2d;
    font-size: 12px;
    line-height: 1.5;
}

/* =========================================
   LIENS ET PIED DE PANNEAU
========================================= */

.auth-form-footer {
    margin-top: 24px;
    padding-top: 17px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    text-align: center;
}

.auth-form-footer p {
    margin: 0 0 6px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 11px;
}

.auth-form-footer a {
    color: #e5bd65;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.auth-form-footer a:hover {
    text-decoration: underline;
}

.auth-panel-footer {
    position: relative;
    z-index: 1;
    width: 100%;
    margin-top: auto;
    padding-top: 12px;
    font-size: 9px;
    letter-spacing: 1.5px;
    text-align: center;
}

.auth-panel-footer-dark {
    color: rgba(255, 255, 255, 0.5);
}

.auth-panel-footer-light {
    color: #9aa3b2;
}

/* =========================================
   CENTRAGE VERTICAL DES DEUX PANNEAUX
========================================= */

@media (min-width: 761px) {

    .auth-unified-container {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        height: 100vh;
        min-height: 600px;
    }

    /* PANNEAU BLEU */

    .auth-login-panel {
        display: grid;
        grid-template-rows: 1fr auto auto 1fr;
        align-items: center;
        height: 100vh;
        min-height: 600px;
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .auth-login-panel .auth-logo {
        grid-row: 2;
        width: 340px;
        height: 190px;
        min-height: 190px;
        max-width: 100%;
        margin: 0 auto 20px;
    }

    .auth-login-panel .auth-login-content {
        grid-row: 3;
        width: 100%;
        max-width: 440px;
        margin: 0 auto;
    }

    .auth-login-panel .auth-panel-footer {
        display: none;
    }

    /* PANNEAU BLANC */

    .auth-register-panel {
        display: grid;
        grid-template-rows: 1fr auto 1fr auto;
        align-items: center;
        height: 100vh;
        min-height: 600px;
    }

    .auth-register-panel .auth-back {
        position: absolute;
        top: 18px;
        right: clamp(28px, 4.5vw, 68px);
        margin: 0;
    }

    .auth-register-panel .auth-register-content {
        grid-row: 2;
        width: 100%;
        max-width: 540px;
        margin: 0 auto;
    }

    .auth-register-panel .auth-panel-footer {
        grid-row: 4;
        margin-top: 0;
        padding-top: 15px;
    }

    /* BOUTONS IDENTIQUES */

    .auth-login-panel .auth-submit,
    .auth-register-panel .auth-submit {
        height: 48px;
        min-height: 48px;
        margin-top: 8px;
    }
}

/* =========================================
   ÉCRANS MOINS HAUTS
========================================= */

@media (min-width: 761px) and (max-height: 760px) {

    .auth-login-panel .auth-logo {
        width: 220px;
        height: 105px;
        min-height: 105px;
        margin-bottom: 15px;
    }

    .auth-login-panel .auth-logo-image {
        max-width: 215px;
        max-height: 105px;
    }

    .auth-login-panel {
        padding-top: 12px;
    }

    .auth-heading {
        margin-bottom: 16px;
    }

    .auth-register-panel {
        padding-top: 12px;
    }

    .auth-welcome-header {
        margin-bottom: 12px;
    }

    .auth-welcome-header h2,
    .auth-register-heading h2 {
        font-size: 28px;
    }

    .auth-register-heading {
        margin-bottom: 10px;
    }

    .auth-register-form {
        gap: 7px 12px;
    }

    .auth-field input {
        min-height: 37px;
    }

    .auth-login-panel .auth-submit,
    .auth-register-panel .auth-submit {
        height: 48px;
        min-height: 48px;
    }
}

/* =========================================
   TABLETTES ET MOBILES
========================================= */

@media (max-width: 760px) {

    .auth-page {
        height: auto;
        min-height: 100vh;
        overflow: auto;
    }

    .auth-unified-container {
        display: flex;
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .auth-login-panel {
        order: 1;
        display: flex;
        height: auto;
        min-height: auto;
        padding: 30px 28px 25px;
    }

    .auth-register-panel {
        order: 2;
        display: flex;
        height: auto;
        min-height: auto;
        padding: 25px 28px 20px;
        overflow: visible;
    }

    .auth-login-panel .auth-panel-footer {
        display: none;
    }

    .auth-logo {
        width: 230px;
        height: 120px;
        min-height: 120px;
        margin: 0 auto 25px;
    }

    .auth-logo-image {
        max-width: 220px;
        max-height: 115px;
    }

    .auth-login-content,
    .auth-register-content {
        width: 100%;
        max-width: 560px;
        margin: 0 auto;
    }

    .auth-register-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .auth-panel-footer {
        margin-top: 30px;
    }

    .auth-welcome-header {
        margin-bottom: 20px;
    }

    .auth-register-panel .auth-back {
        position: static;
        align-self: flex-end;
        margin-bottom: 14px;
    }
}

/* =========================================
   PETITS MOBILES
========================================= */

@media (max-width: 480px) {

    .auth-login-panel {
        padding: 25px 21px 22px;
    }

    .auth-register-panel {
        padding: 22px 21px 20px;
    }

    .auth-logo {
        width: 200px;
        height: 105px;
        min-height: 105px;
        margin-bottom: 22px;
    }

    .auth-heading h1,
    .auth-register-heading h2,
    .auth-welcome-header h2 {
        font-size: 27px;
    }

    .auth-register-form {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .auth-field input {
        min-height: 45px;
        font-size: 12px;
    }

    .auth-login-form {
        gap: 14px;
    }

    .auth-login-panel .auth-submit,
    .auth-register-panel .auth-submit {
        height: 48px;
        min-height: 48px;
    }
}
