/* =========================================================
   RESET
   ========================================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    background: #f5f5f5;
    font-family: Arial, Helvetica, sans-serif;
    color: #000;
}


/* =========================================================
   PAGE
   ========================================================= */

.page {
    min-height: 100vh;

    display: flex;
    justify-content: center;
    align-items: center;
}


/* =========================================================
   CARTE PRINCIPALE — PC
   POINT 3 : largeur 520px → 580px, hauteur 517px → 580px
   ========================================================= */

.login-card {
    width: 580px;
    height: 580px;

    background: #ffffff;

    border: 1px solid #cfcfcf;

    position: relative;
}


/* =========================================================
   BARRE ORANGE — PC
   ========================================================= */

.orange-bar {
    position: absolute;

    top: -1px;
    left: -1px;
    right: -1px;

    height: 13px;

    background: #ff7900;
}


/* =========================================================
   CONTENU
   ========================================================= */

.content {
    width: 100%;
    height: 100%;

    padding-top: 57px;

    display: flex;
    flex-direction: column;
    align-items: center;
}


/* =========================================================
   LOGO
   POINT 1 : marge entre logo et titre
   ========================================================= */

/* APRÈS */
.logo-container {
    width: 40px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 34px; /* ← 2 lignes de plus */
}

.logo {
    display: block;

    max-width: 62px;
    max-height: 55px;

    object-fit: contain;
}


/* =========================================================
   TITRES
   POINT 2 : h1 + h2 sur une seule ligne en desktop
   ========================================================= */

h1,
h2 {
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 700;
    text-align: center;
}

/* APRÈS — PC : deux lignes par défaut */
.title-block {
    display: flex;
    flex-direction: column; /* ← colonne sur PC */
    align-items: center;
    justify-content: center;
    gap: 0;
}

h1 {
    font-size: 32px;
    line-height: 37px;
    white-space: nowrap;
}

h2 {
    font-size: 31px;
    line-height: 36px;
    white-space: nowrap;
}


/* =========================================================
   FORMULAIRE
   ========================================================= */

.form-area {
    width: 450px;

    margin-top: 35px;
}

.form-area label {
    display: block;

    font-size: 20px;
    line-height: 24px;

    font-weight: 700;

    margin-bottom: 15px;
}


/* =========================================================
   CHAMP
   ========================================================= */

.input-container {
    width: 100%;
    height: 48px;

    background: #f4f4f4;

    border-bottom: 1px solid #c7c7c7;
}

.input-container input {
    width: 100%;
    height: 100%;

    border: none;
    outline: none;

    background: transparent;

    padding: 0 13px;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;

    color: #222;
}

.input-container input::placeholder {
    color: #5b6670;
    opacity: 1;
}


/* =========================================================
   BOUTON
   ========================================================= */

button {
    display: block;

    width: 113px;
    height: 39px;

    margin: 32px auto 0;

    border: none;

    background: #000000;
    color: #ffffff;

    font-family: Arial, Helvetica, sans-serif;

    font-size: 13px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background-color 0.15s ease,
        transform 0.1s ease;
}

button:hover {
    background: #222222;
}

button:active {
    transform: translateY(1px);
}


/* =========================================================
   TABLETTE
   601px → 900px
   ========================================================= */

@media (min-width: 601px) and (max-width: 900px) {

    html,
    body {
        background: #ffffff;
    }

    .page {
        min-height: 100vh;

        background: #ffffff;

        display: flex;
        justify-content: center;
        align-items: flex-start;
    }

    .login-card {
        width: 100%;
        max-width: 420px;

        height: 555px;

        margin: 0 auto;

        background: #ffffff;

        border: none;
    }

    .orange-bar {
        display: none;
    }

    .content {
        padding-top: 40px;
    }

    .logo-container {
        width: 60px;
        height: 55px;
        margin-bottom: 14px;
    }

    .logo {
        max-width: 52px;
        max-height: 48px;
    }

    /* Tablette : titres sur deux lignes */
    /* APRÈS — mobile : une seule ligne */
.title-block {
    flex-direction: row;      /* ← ligne unique en mobile */
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    flex-wrap: nowrap;
}

    h1 {
        font-size: 26px;
        line-height: 31px;
    }

    h2 {
        font-size: 26px;
        line-height: 31px;
    }

    .form-area {
        width: calc(100% - 50px);

        margin-top: 36px;
    }

    .form-area label {
        font-size: 18px;
        line-height: 22px;

        margin-bottom: 14px;
    }

    .input-container {
        height: 49px;
    }

    .input-container input {
        font-size: 14px;

        padding: 0 13px;
    }

    button {
        width: 117px;
        height: 40px;

        margin-top: 34px;

        font-size: 13px;
    }
}


/* =========================================================
   MOBILE
   341px → 600px
   POINT 4 : plein écran avec légère marge
   ========================================================= */

@media (max-width: 600px) {

    html,
    body {
        width: 100%;
        min-height: 100%;

        background: #ffffff;
    }

    .page {
        width: 100%;
        min-height: 100vh;

        background: #ffffff;

        display: flex;
        justify-content: flex-start;
        align-items: stretch; /* ← plein écran vertical */
    }

    .login-card {
        width: 100%;
        max-width: 100%;        /* ← plein écran horizontal */

        height: auto;
        min-height: 100vh;

        margin: 0;
        padding: 0 16px;        /* ← légère marge gauche/droite */

        background: #ffffff;

        border: none;
    }

    .orange-bar {
        display: none;
    }

    .content {
        width: 100%;
        height: 100%;

        padding-top: 37px;

        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* Mobile : logo */
    .logo-container {
        width: 58px;
        height: 50px;

        display: flex;
        align-items: center;
        justify-content: center;

        margin-bottom: 14px;
    }

    .logo {
        max-width: 48px;
        max-height: 45px;
    }

    /* Mobile : titres sur deux lignes */
    .title-block {
    flex-direction: row;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    flex-wrap: nowrap;
}

.title-block h1,
.title-block h2 {
    white-space: nowrap;
    font-size: 24px;
    line-height: 22px;
}

    h1 {
        font-size: 23px;
        line-height: 27px;

        margin-top: 0;
    }

    h2 {
        font-size: 23px;
        line-height: 27px;
    }

    /* Formulaire mobile */
    .form-area {
        width: 100%;

        margin-top: 36px;
    }

    .form-area label {
        font-size: 16px;
        line-height: 20px;

        margin-bottom: 14px;
    }

    /* Champ mobile */
    .input-container {
        width: 100%;
        height: 49px;

        background: #f4f4f4;

        border-bottom: 1px solid #c7c7c7;
    }

    .input-container input {
        width: 100%;
        height: 100%;

        padding: 0 13px;

        font-size: 13px;

        border: none;
        outline: none;

        background: transparent;
    }

    .input-container input::placeholder {
        color: #5b6670;

        opacity: 1;
    }

    /* Bouton mobile */
    button {
        width: 117px;
        height: 40px;

        margin-top: 34px;

        font-size: 13px;
    }
}


/* =========================================================
   PETITS TÉLÉPHONES
   340px ET MOINS
   ========================================================= */

@media (max-width: 340px) {

    html,
    body {
        width: 100%;
        min-height: 100%;

        background: #ffffff;
    }

    .page {
        width: 100%;
        min-height: 100vh;

        background: #ffffff;

        display: flex;
        justify-content: flex-start;
        align-items: stretch;
    }

    .login-card {
        width: 100%;
        max-width: 100%;

        height: auto;
        min-height: 100vh;

        margin: 0;
        padding: 0 12px;

        background: #ffffff;

        border: none;
    }

    .orange-bar {
        display: none;
    }

    .content {
        padding-top: 32px;
    }

    .logo-container {
        width: 52px;
        height: 47px;
        margin-bottom: 12px;
    }

    .logo {
        max-width: 44px;
        max-height: 41px;
    }

    .title-block {
        flex-direction: column;
        gap: 0;
    }

    h1 {
        font-size: 21px;
        line-height: 25px;
    }

    h2 {
        font-size: 21px;
        line-height: 25px;
    }

    .form-area {
        width: 100%;

        margin-top: 34px;
    }

    .form-area label {
        font-size: 15px;
        line-height: 19px;

        margin-bottom: 13px;
    }

    .input-container {
        height: 48px;
    }

    .input-container input {
        font-size: 13px;

        padding: 0 12px;
    }

    button {
        width: 115px;
        height: 39px;

        margin-top: 33px;

        font-size: 13px;
    }
}


/* =========================================================
   TRÈS PETIT ÉCRAN — 300px ET MOINS
   ========================================================= */

@media (max-width: 300px) {

    .content {
        padding-top: 28px;
    }

    h1,
    h2 {
        font-size: 20px;
        line-height: 24px;
    }

    .form-area {
        width: 100%;
    }

    .form-area label {
        font-size: 14px;
        line-height: 18px;
    }

    .input-container {
        height: 46px;
    }

    .input-container input {
        font-size: 12px;
    }

    button {
        width: 110px;
        height: 38px;
    }
}


/* =========================================================
   TRANSITION ENTRE LES ÉTAPES
   ========================================================= */

.hidden {
    display: none !important;
}


/* =========================================================
   CHAMP MOT DE PASSE
   ========================================================= */

.password-container {
    position: relative;

    display: flex;
    align-items: center;
}

.password-container input {
    padding-right: 75px;
}

.show-password {
    position: absolute;

    right: 10px;
    top: 50%;

    transform: translateY(-50%);

    width: auto;
    height: auto;

    margin: 0;
    padding: 4px;

    background: transparent;

    color: #000;

    border: none;

    font-size: 11px;
    font-weight: 700;

    cursor: pointer;
}

.show-password:hover {
    background: transparent;
}

.show-password:active {
    transform: translateY(-50%);
}


/* =========================================================
   ANIMATION
   ========================================================= */

.form-area {
    animation: formAppear 0.2s ease;
}

@keyframes formAppear {

    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}


/* =========================================================
   MOT DE PASSE — MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .password-container input {
        padding-right: 65px;
    }

    .show-password {
        right: 8px;
        font-size: 10px;
    }

}

@media (max-width: 340px) {

    .password-container input {
        padding-right: 60px;
    }

    .show-password {
        right: 7px;
        font-size: 9px;
    }

}
