/* ============================================================
   RESET
============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100vw;
    height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    overflow: hidden; /* Garantit zéro barre de défilement */
}

body {
    background: #ffffff;
    color: #17365d;
}

/* ============================================================
   PAGE PRINCIPALE (Plein écran)
============================================================ */

.login-page {
    width: 100vw;
    height: 100vh;
    display: flex;
    overflow: hidden;
}

/* ============================================================
   PARTIE GAUCHE
============================================================ */

.left-section {
    position: relative;
    width: 50%;
    height: 100vh;
    background-image: url("../../../webroot/img/backgrounds/1302.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center; /* Centré verticalement */
    justify-content: center;
    padding: 2vw;
}

.left-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.28);
    z-index: 1;
}

/* ============================================================
   BLOC INSTITUTION
============================================================ */

.institution {
    position: relative;
    z-index: 2;
    width: 85%;
    max-width: 520px;
    padding: 30px 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 12px;
    backdrop-filter: blur(4px);
}

.emblem-container {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.ivory-emblem {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.ivory-emblem i {
    font-size: 50px;
    color: #009b4d;
}

.republic {
    color: #18395f;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 12px;
}

.flag-line {
    display: flex;
    width: 220px;
    height: 5px;
    margin: 0 auto 20px auto;
    border-radius: 10px;
    overflow: hidden;
}

.flag-orange { width: 33.33%; background: #f58220; }
.flag-white  { width: 33.33%; background: #ffffff; }
.flag-green  { width: 33.33%; background: #009b4d; }

.institution-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #25496e;
    font-size: 15px;
    line-height: 1.35;
}

.institution-text strong {
    font-size: 16px;
}

/* ============================================================
   PARTIE DROITE
============================================================ */

.right-section {
    width: 50%;
    height: 100vh;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3vh 4vw;
}

.login-card {
    width: 100%;
    max-width: 500px;
}

/* ============================================================
   LOGO SIGRE & BIENVENUE
============================================================ */

.sigre-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

.sigre-logo i {
    font-size: 48px;
    color: #009b4d;
}

.welcome {
    text-align: center;
    margin-bottom: 25px; /* Réduit pour éviter de dépasser en hauteur */
}

.welcome h2 {
    color: #f15a32;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 6px;
}

.welcome p {
    color: #607a9a;
    font-size: 16px;
    line-height: 1.3;
}

/* ============================================================
   MESSAGE ERREUR
============================================================ */

.alert-message {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size: 13px;
}

.alert-message.error {
    color: #a12828;
    background: #fff0f0;
    border: 1px solid #ffd0d0;
}

/* ============================================================
   FORMULAIRE ET INPUTS
============================================================ */

.form-group {
    margin-bottom: 18px; /* Ajusté de 28px à 18px */
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    color: #173b67;
    font-size: 14px;
    font-weight: 700;
}

.form-group label i {
    font-size: 18px;
}

.input-container {
    position: relative;
    width: 100%;
}

.input-container input {
    width: 100%;
    height: 52px; /* Réduit de 68px à 52px */
    padding: 0 50px 0 55px;
    border: none;
    outline: none;
    border-radius: 26px;
    background: #eaf1fc;
    color: #173b67;
    font-size: 15px;
    transition: all 0.25s ease;
}

.input-container input::placeholder {
    color: #7890ad;
}

.input-container input:focus {
    background: #e2ecfa;
    box-shadow: 0 0 0 3px rgba(0, 155, 77, 0.12);
}

.input-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #6d83a1;
    font-size: 18px;
    z-index: 2;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #173b67;
    font-size: 17px;
}

.password-toggle:hover {
    color: #009b4d;
}

/* ============================================================
   MOT DE PASSE OUBLIÉ & BOUTON
============================================================ */

.forgot-password {
    margin-top: -6px;
    margin-bottom: 22px;
}

.forgot-password a {
    color: #009b4d;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.forgot-password a:hover {
    color: #f58220;
    text-decoration: underline;
}

.login-button {
    width: 100%;
    height: 54px; /* Réduit de 70px à 54px */
    border: none;
    border-radius: 27px;
    background: linear-gradient(90deg, #ff7200 0%, #ff9d00 100%);
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 6px 18px rgba(255, 125, 0, 0.20);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(255, 125, 0, 0.30);
}

.login-button:active {
    transform: translateY(0);
}

/* ============================================================
   FOOTER & SECURE
============================================================ */

.secure-login {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    color: #8a9bb1;
    font-size: 13px;
}

.secure-login i {
    color: #009b4d;
    font-size: 15px;
}

.login-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eeeeee;
    color: #9aa8b9;
    font-size: 11px;
}

.login-footer .separator {
    color: #f58220;
}