@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

html, body {
    height: 100%;
    overflow: hidden;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 20px;
}

.logo-container {
    text-align: center;
    margin-bottom: 18px;
}

.medicare-logo {
    height: 115px;
    width: auto;
    object-fit: contain;
}

/* CONTAINER PRINCIPAL */
.auth-wrapper {
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
    position: relative;
    overflow: hidden;
    width: 1100px;
    max-width: 100%;
    min-height: 620px;
}

/* FORMULAIRES */
.form-container {
    position: absolute;
    top: 0;
    height: 100%;
    width: 50%;
    transition: all 0.6s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-container form {
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 35px;
    height: 100%;
    text-align: center;
    width: 100%;
    max-width: 460px;
    overflow: hidden;
}

.login-container {
    left: 0;
    z-index: 2;
}

/* TITRES & TEXTES */
h1 {
    font-weight: 700;
    font-size: 32px;
    color: #1e293b;
    margin-bottom: 12px;
}

span {
    font-size: 15px;
    color: #64748b;
    display: block;
    margin-bottom: 18px;
    line-height: 1.5;
}

/* FORM GROUPS */
.form-group {
    margin-bottom: 14px;
    width: 100%;
}

/* INPUTS */
input {
    background-color: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px 20px;
    width: 100%;
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    color: #1e293b;
}

input:focus {
    outline: none;
    border-color: #38bdf8;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.15);
}

input::placeholder {
    color: #94a3b8;
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="password"] {
    padding-left: 50px;
    background-repeat: no-repeat;
    background-position: 18px center;
    background-size: 18px;
}

.password-wrapper input {
    padding-right: 56px;
}

input[type="text"] {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="%2394a3b8" viewBox="0 0 16 16"><path d="M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"/></svg>');
}

input[type="tel"] {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="%2394a3b8" viewBox="0 0 16 16"><path d="M3.654 1.328a.678.678 0 0 0-1.015-.063L1.605 2.3c-.483.484-.661 1.169-.45 1.77a17.568 17.568 0 0 0 4.168 6.608 17.569 17.569 0 0 0 6.608 4.168c.601.211 1.286.033 1.77-.45l1.034-1.034a.678.678 0 0 0-.063-1.015l-2.307-1.794a.678.678 0 0 0-.58-.094l-2.19.547a1.745 1.745 0 0 1-1.657-.459L5.482 8.062a1.745 1.745 0 0 1-.46-1.657l.548-2.19a.678.678 0 0 0-.094-.58L3.654 1.328z"/></svg>');
}

input[type="email"] {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="%2394a3b8" viewBox="0 0 16 16"><path d="M0 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V4zm2-1a1 1 0 0 0-1 1v.217l7 4.2 7-4.2V4a1 1 0 0 0-1-1H2zm13 2.383l-4.758 2.855L15 13.157V6.383z"/></svg>');
}

input[type="password"] {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="%2394a3b8" viewBox="0 0 16 16"><path d="M8 1a2 2 0 0 1 2 2v4H6V3a2 2 0 0 1 2-2zm3 6V3a3 3 0 0 0-6 0v4a2 2 0 0 0-2 2v5a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2z"/></svg>');
}

/* Bouton œil */
.password-wrapper {
    position: relative;
    width: 100%;
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 6px;
    border-radius: 8px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.toggle-password:hover {
    background: rgba(56, 189, 248, 0.12);
    transform: translateY(-50%) scale(1.05);
}

/* OPTIONS DU FORMULAIRE */
.form-options {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 18px;
    width: 100%;
}

.forgot-password {
    color: #38bdf8;
    font-size: 14px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.forgot-password:hover {
    color: #0ea5e9;
    text-decoration: underline;
}

/* BOUTON PRINCIPAL */
.submit-btn {
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    padding: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.3);
    width: 100%;
    margin-bottom: 16px;
    font-family: 'Poppins', sans-serif;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(56, 189, 248, 0.4);
    background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%);
}

/* ERROR MSG */
.error-msg {
    display: block;
    color: #ef4444;
    font-size: 0.78rem;
    font-weight: 600;
    margin-top: 4px;
    text-align: left;
}

/* OVERLAY (PANEL DROIT) */
.overlay-container {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: transform 0.6s ease-in-out;
    z-index: 100;
}

.overlay {
    background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
    color: #FFFFFF;
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.overlay-panel {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 50px;
    text-align: center;
    top: 0;
    height: 100%;
    width: 50%;
}

.overlay-right {
    right: 0;
}

.overlay-panel h1 {
    color: white;
    font-size: 36px;
    margin-bottom: 20px;
    font-weight: 700;
}

.overlay-panel p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 35px;
    font-weight: 400;
}

/* BOUTON GHOST */
.ghost {
    background-color: transparent;
    border: 2px solid #FFFFFF;
    color: #FFFFFF;
    padding: 14px 45px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.ghost:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* EFFET COULIS/DRIP */
.drip-effect {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    transform: translateX(-50%);
    z-index: 101;
    pointer-events: none;
}

.drip {
    position: absolute;
    left: 0;
    width: 100%;
    background: linear-gradient(to bottom, #38bdf8, #0ea5e9);
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

.drip-1 { height: 25%; top: -5%; animation: drip-flow 2.5s ease-in-out infinite alternate; }
.drip-2 { height: 20%; top: 15%; animation: drip-flow 2.8s ease-in-out infinite alternate-reverse; animation-delay: 0.3s; }
.drip-3 { height: 18%; top: 40%; animation: drip-flow 3.1s ease-in-out infinite alternate; animation-delay: 0.6s; }
.drip-4 { height: 22%; top: 60%; animation: drip-flow 2.7s ease-in-out infinite alternate-reverse; animation-delay: 0.2s; }
.drip-5 { height: 15%; top: 85%; animation: drip-flow 3.3s ease-in-out infinite alternate; animation-delay: 0.8s; }
.drip-6 { height: 12%; top: 75%; animation: drip-flow 2.9s ease-in-out infinite alternate-reverse; animation-delay: 0.5s; }

@keyframes drip-flow {
    0%   { transform: translateY(0) scaleY(1); opacity: 0.9; }
    100% { transform: translateY(-8px) scaleY(1.1); opacity: 1; }
}

/* PARTICULES */
.overlay .medical-particles {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none; z-index: 1; overflow: hidden;
}

.overlay .particle {
    position: absolute; font-size: 2.2rem;
    color: rgba(255, 255, 255, 0.45);
    animation: float 20s infinite;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4));
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0; }
    10%       { opacity: 0.7; }
    90%       { opacity: 0.7; }
    100%      { transform: translateY(-100vh) rotate(360deg); opacity: 0; }
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .auth-wrapper { width: 100%; max-width: 520px; min-height: auto; }
    .overlay-container { display: none; }
    .drip-effect { display: none; }
    .form-container {
        position: relative; width: 100%; height: auto;
        left: 0; opacity: 1; transform: none; padding: 40px 30px;
    }
    .form-container form {
        height: auto; overflow: visible; max-width: 100%; padding: 0 20px;
    }
    .medicare-logo { height: 95px; }
    h1 { font-size: 28px; }
}

@media (max-width: 576px) {
    .form-container { padding: 30px 20px; }
    .medicare-logo { height: 85px; }
    h1 { font-size: 26px; }
    span { font-size: 14px; }
    input { padding: 14px 18px; }
    input[type="text"],
    input[type="tel"],
    input[type="email"],
    input[type="password"] { padding-left: 45px; }
    .password-wrapper input { padding-right: 54px; }
    .submit-btn { padding: 16px; }
}