/* ============================================================
   VMS — LOGIN PAGE  v6
   MTC Healthcare
   ============================================================ */

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

html, body {
    height: 100%;
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    background: #eef1f6;
    -webkit-font-smoothing: antialiased;
}

/* ============================================================
   WRAPPER — SPLIT LAYOUT
   ============================================================ */
.login-wrapper {
    display: -webkit-flex;
    display: flex;
    min-height: 100vh;
    -webkit-align-items: stretch;
    align-items: stretch;
}

/* ============================================================
   PANNEAU GAUCHE
   ============================================================ */
.login-left {
    -webkit-flex: 1 1 45%;
    flex: 1 1 45%;
    background: linear-gradient(145deg, #0d3b8e 0%, #1565c0 45%, #1e88e5 100%);
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    padding: 50px 55px 35px;
    position: relative;
    overflow: hidden;
}

/* Blobs décoratifs */
.left-blobs { position: absolute; inset: 0; pointer-events: none; }
.blob {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
}
.blob-1 {
    width: 420px; height: 420px;
    top: -130px; right: -130px;
}
.blob-2 {
    width: 300px; height: 300px;
    bottom: -90px; left: -80px;
}

.left-inner {
    -webkit-flex: 1;
    flex: 1;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-justify-content: center;
    justify-content: center;
    -webkit-align-items: flex-start;
    align-items: flex-start;
    position: relative;
    z-index: 1;
}

.left-logo-link {
    display: inline-block;
    margin-bottom: 55px;
    -webkit-transition: opacity 0.2s;
    transition: opacity 0.2s;
}
.left-logo-link:hover { opacity: 0.85; }

.left-logo {
    max-width: 280px;
    height: auto;
    /* Logo coloré rendu blanc pour le fond bleu */
    filter: brightness(0) invert(1);
    -webkit-filter: brightness(0) invert(1);
}

.left-text h2 {
    color: #ffffff;
    font-size: 2.3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
}
.left-text p {
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.05rem;
    line-height: 1.7;
}
.left-text strong {
    color: #ffffff;
    font-weight: 600;
}

.left-footer {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.78rem;
    position: relative;
    z-index: 1;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.12);
}

/* ============================================================
   PANNEAU DROIT
   ============================================================ */
.login-right {
    -webkit-flex: 0 0 55%;
    flex: 0 0 55%;
    background: #ffffff;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    padding: 60px 50px;
}

.right-inner {
    width: 100%;
    max-width: 420px;
}

/* Logo VMS */
.right-logo-wrap {
    text-align: center;
    margin-bottom: 32px;
}
.right-logo {
    height: 83px;
    width: auto;
}

/* Titre & sous-titre */
.right-title {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a237e;
    margin-bottom: 8px;
}
.right-subtitle {
    text-align: center;
    color: #9e9e9e;
    font-size: 0.88rem;
    margin-bottom: 38px;
    letter-spacing: 0.2px;
}

/* ============================================================
   FORMULAIRE
   ============================================================ */
.login-form { width: 100%; }

.field-wrap {
    position: relative;
    margin-bottom: 22px;
}

.field-icon {
    position: absolute;
    left: 17px;
    top: 50%;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    color: #bdbdbd;
    font-size: 15px;
    z-index: 2;
    pointer-events: none;
}

.field-input {
    width: 100%;
    height: 54px;
    padding: 0 18px 0 48px;
    border: 1.5px solid #e8eaf0;
    border-radius: 12px;
    font-size: 0.93rem;
    color: #333;
    background: #f8f9fc;
    outline: none;
    -webkit-transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
    letter-spacing: 0.3px;
}
.field-input::placeholder {
    color: #c0c4d0;
    letter-spacing: 0.8px;
    font-size: 0.85rem;
}
.field-input:focus {
    border-color: #1565c0;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(21, 101, 192, 0.10);
}

/* ============================================================
   BOUTON CONNEXION
   ============================================================ */
.login-btn {
    width: 100%;
    height: 54px;
    margin-top: 12px;
    background: linear-gradient(135deg, #1565c0 0%, #1e88e5 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 5px 18px rgba(21, 101, 192, 0.38);
    -webkit-transition: -webkit-transform 0.15s, box-shadow 0.15s;
    transition: transform 0.15s, box-shadow 0.15s;
}
.login-btn:hover {
    -webkit-transform: translateY(-2px);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(21, 101, 192, 0.45);
}
.login-btn:active {
    -webkit-transform: translateY(0);
    transform: translateY(0);
}
.login-btn .fa {
    font-size: 14px;
    opacity: 0.85;
}

/* ============================================================
   ALERTES SESSION
   ============================================================ */
.login-alert {
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.87rem;
    margin-bottom: 24px;
    text-align: center;
    line-height: 1.5;
}
.alert-ok {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}
.alert-err {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* ============================================================
   BADGE MTC (coin inférieur droit)
   ============================================================ */
.made-with-mk {
    width: 50px;
    height: 50px;
    display: block;
    position: fixed;
    z-index: 555;
    bottom: 28px;
    right: 28px;
    border-radius: 30px;
    background-color: rgba(13, 59, 142, 0.80);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    cursor: pointer;
    padding: 10px 12px;
    white-space: nowrap;
    overflow: hidden;
    text-decoration: none;
    -webkit-transition: 0.45s cubic-bezier(0.6, 0, 0.4, 1);
    transition: 0.45s cubic-bezier(0.6, 0, 0.4, 1);
}
.made-with-mk:hover,
.made-with-mk:focus {
    width: 218px;
    color: #ffffff;
    padding: 10px 19px;
}
.made-with-mk:hover .made-with { opacity: 1; }
.made-with-mk:hover .brand { left: -6px; }

.made-with-mk .brand,
.made-with-mk .made-with { float: left; }

.made-with-mk .brand {
    position: relative;
    top: 4px;
    left: -6px;
    letter-spacing: 1px;
    vertical-align: middle;
    font-size: 16px;
    font-weight: 600;
}
.made-with-mk .made-with {
    color: rgba(255, 255, 255, 0.65);
    position: absolute;
    left: 58px;
    top: 14px;
    opacity: 0;
    margin: 0;
    -webkit-transition: 0.45s cubic-bezier(0.6, 0, 0.4, 1);
    transition: 0.45s cubic-bezier(0.6, 0, 0.4, 1);
}
.made-with-mk .made-with strong {
    font-weight: 400;
    color: #ffffff;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablette / petit écran */
@media (max-width: 900px) {
    .login-left { padding: 45px 40px 30px; }
    .login-left { -webkit-flex: 1 1 40%; flex: 1 1 40%; }
    .login-right { -webkit-flex: 0 0 60%; flex: 0 0 60%; padding: 50px 35px; }
}

/* Mobile — empilé vertical */
@media (max-width: 768px) {
    .login-wrapper { -webkit-flex-direction: column; flex-direction: column; }

    .login-left {
        -webkit-flex: none; flex: none;
        padding: 40px 30px 36px;
        text-align: center;
    }
    .left-inner {
        -webkit-align-items: center; align-items: center;
    }
    .left-logo-link { margin-bottom: 30px; }
    .left-logo { max-width: 200px; }
    .left-text h2 { font-size: 1.8rem; }

    .login-right {
        -webkit-flex: none; flex: none;
        padding: 45px 24px 70px;
    }
    .right-inner { max-width: 100%; }
}

@media (max-width: 420px) {
    .left-logo { max-width: 160px; }
    .right-logo { height: 55px; }
    .right-title { font-size: 1.45rem; }
    .field-input, .login-btn { height: 50px; }
}
