/* --- Structure générale --- */

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    background: url('background.png') no-repeat center center fixed;
    background-size: cover;
    overflow-x: hidden; /* Ajout pour éviter scroll horizontal */
}

@font-face {
    font-family: 'Oswald ExtraLight';
    src: url('fonts/Oswald-ExtraLight.ttf') format('truetype');
    font-weight: 200;
    font-style: normal;
}
@font-face {
    font-family: 'Montserrat Light';
    src: url('fonts/Montserrat-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

body, input, button, select, textarea, p, h1, h2, h3, h4, h5, h6, label {
    font-family: 'Montserrat Light', Arial, sans-serif;
}


/* Conteneur général */
.login-container {
    position: absolute;
    left: 0;
    top: 0;
    width: 420px;
    height: 100vh;
    background: rgba(255,255,255,0.9);
    padding: 30px;
    box-sizing: border-box;
    box-shadow: 4px 0 12px rgba(0,0,0,0);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    border-radius: 0px 0px 0px 0px;
}


/* Logo */
.login-header-row {
    text-align: left;
    margin-bottom: 20px;
}

.login-logo {
    text-align: center;
    margin-bottom: 20px;
}

.login-logo img {
    display: inline-block;
    max-width: 150px;
    height: auto;
    margin-bottom: 0px;
}

/* Textes */
.welcome-title {
    font-size: 28px;
    text-align: center;
    color: #003366;
    margin-bottom: 5px;
    position: relative;
    display: inline-block;
    padding-bottom: 5px;
    font-family: 'Oswald ExtraLight';
}

.welcome-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 3px;
    background-color: orange;
    border-radius: 2px;
}

h2 {
    margin-top: 5px;
    margin-bottom: 5px;
}

.sub-message {
    font-size: 14px;
    margin-bottom: 15px;
}

/* Formulaire */
.login-container input {
    width: 100%;
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.login-container button {
    width: 100%;
    padding: 12px;
    background: #F7A600;
    border: none;
    color: white;
    border-radius: 4px;
    font-size: 15px;
    cursor: pointer;
    font-family: 'Montserrat Light', sans-serif;
    letter-spacing: 1px;
}

.login-container button:hover {
    background: #d88f00;
}

.required-note {
    font-size: 12px;
    color: #c70000;
    margin-top: 0px;
    margin-bottom: 10px;
}

.required-note2 {
    font-size: 10px;
    color: #c70000;
    margin-top: 0px;
    margin-bottom: 10px;
}

/* Login Links 2 */
.login-links2 {
    font-size: 12px;
    color: #666666;
    margin-top: -10px;
}

.login-links2 a {
    color: #0073e6;
    text-decoration: none;
}

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

/* Liens */
.login-links {
    font-size: 14px;
    text-align: left;
    margin-top: auto;
    margin-bottom: 50px;
}

.login-links a {
    color: #0066cc;
    text-decoration: none;
}

/* Sélecteur de langue */
.lang-switcher.center {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}

.lang-switcher img {
    width: 26px;
    height: 18px;
    border-radius: 3px;
    opacity: 0.7;
    cursor: pointer;
}

.lang-switcher .active img,
.lang-switcher img:hover {
    opacity: 1;
}

/* ---- MODAL ---- */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 40px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
}

.modal-content {
    background: #fff;
    margin: auto;
    padding: 20px 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 1200px;
    position: relative;
    animation: fadeIn 0.3s;
    font-size: 15px;
}

.close {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 28px;
    cursor: pointer;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 20px;
}

.modal-logo {
    width: 120px;
}

.modal-title .bold {
    font-size: 28px;
    font-weight: bold;
}

.modal-title .divider {
    display: inline-block;
    width: 3px;
    height: 28px;
    background: orange;
    margin: 0 10px;
}

.separator {
    margin-top: 15px;
    height: 1px;
    background: #ccc;
    border: none;
}

.section-title .main-title {
    font-size: 20px;
    font-weight: bold;
}

.section-title .subtitle {
    font-size: 14px;
    margin-top: -5px;
    color: #555;
}

.modal-body {
    display: flex;
    margin-top: 5px;
}

.modal-body2 {
    margin-top: 5px;
}

.steps {
    width: 75%;
    padding-right: 20px;
}

.step {
    display: flex;
    margin-bottom: 10px;
}

.step-number {
    min-width: 30px;
    min-height: 30px;
    background: orange;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    margin-right: 15px;
}

.final-link {
    color: blue;
    font-weight: bold;
}

.support {
    width: 25%;
    border-left: 1px solid #ccc;
    padding-left: 30px;
}

.support-header {
    background: #333;
    color: white;
    padding: 8px 0;
    text-align: center;
    font-weight: bold;
}

.support-table {
    width: 100%;
    border-collapse: collapse;
}

.support-table th {
    background: #eee;
    padding: 6px;
}

.support-table td {
    padding: 5px;
    border-bottom: 1px solid #ddd;
}

.red-separator {
    height: 2px;
    background: orange;
    border: none;
}

/* Champ username */
.input-with-icon.user-icon {
    width: 100%;
    padding: 12px 12px 12px 12px;
    background-color: #47A3CD;
    border: 2px solid #fff;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 15px;
    color: white;
    box-sizing: border-box;
    background-image: url("pix/user.png");
    background-repeat: no-repeat;
    background-size: 24px 24px;
    background-position: right 12px left;
}

/* Champ password */
.input-with-icon.password-icon {
    width: 100%;
    padding: 12px 12px 12px 12px;
    background-color: #47A3CD;
    border: 2px solid #fff;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 15px;
    color: white;
    box-sizing: border-box;
    background-image: url("pix/lock.png");
    background-repeat: no-repeat;
    background-size: 24px 25px;
    background-position: right 12px left;
}

.input-with-icon::placeholder {
    color: white;
    opacity: 2;
}

.login-container form {
    position: relative;
}

.user-icon {
    background-image: url("pix/user.png");
    background-repeat: no-repeat;
    background-size: 20px;
    background-position: right 12px center;
}

.password-icon {
    background-image: url("pix/lock.png");
    background-repeat: no-repeat;
    background-size: 20px;
    background-position: right 12px center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.login-error {
    background: rgba(255, 0, 0, 0.12);
    border: 1px solid #d9534f;
    color: #b30000;
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-size: 15px;
    font-family: 'Montserrat', sans-serif;
}


/* --------------------------------------------------------
   RESPONSIVE MOBILE PORTRAIT
-------------------------------------------------------- */
@media (max-width: 480px) {

    .login-container {
        width: 100%;
        max-width: 100%;
        padding: 20px;
        box-shadow: none;
        background: rgba(255,255,255,0.95);
        height: auto;
    }

    .login-logo img {
        max-width: 120px;
    }

    .welcome-title {
        font-size: 22px;
    }

    .sub-message {
        font-size: 12px;
    }

    input, button {
        font-size: 14px;
        padding: 10px;
    }

    .login-links {
        margin-bottom: 20px;
        font-size: 13px;
    }

    .lang-switcher img {
        width: 22px;
        height: 16px;
    }

    .modal-content {
        width: 92%;
        padding: 15px;
    }

    .modal-body {
        flex-direction: column;
    }

    .steps {
        width: 100%;
        padding-right: 0;
    }

    .support {
        width: 100%;
        border-left: none;
        border-top: 1px solid #ccc;
        padding-left: 0;
        padding-top: 15px;
        margin-top: 15px;
    }

    .step-number {
        min-width: 26px;
        min-height: 26px;
        font-size: 14px;
    }
}


/* --------------------------------------------------------
   RESPONSIVE MOBILE LANDSCAPE (fix scroll horizontal)
-------------------------------------------------------- */
@media (max-width: 900px) and (orientation: landscape) {

    .login-container {
        width: 100%;
        max-width: 100%;
        height: auto;       /* IMPORTANT */
        min-height: auto;
        padding: 15px 20px;
        overflow-y: auto;
        overflow-x: hidden;
        position: relative;
    }

    .login-logo img {
        max-width: 100px;
    }

    .welcome-title {
        font-size: 20px;
    }

    .sub-message {
        font-size: 12px;
    }

    input, button {
        padding: 10px;
        font-size: 14px;
    }
}
