/* auth.css — Page de connexion (split-screen) */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

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

body {
    margin: 0;
    font-family: "Manrope", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    color: #0F172A;
}

.app {
    min-height: 100vh;
}

.alert {
    background: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    margin-bottom: 8px;
}

.form {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

input, select, textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
}


/* ══════════════════════════════════════════
   DESKTOP — Split-screen layout
   ══════════════════════════════════════════ */

.login-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: row;
}

/* ── Côté gauche : Hero / Branding ── */
.login-hero {
    flex: 1;
    min-height: 100vh;
    background: linear-gradient(160deg, #0B1120 0%, #152238 40%, #1E3A5F 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 48px 40px;
}

/* Blobs animés */
.login-bg-decor {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    top: -180px;
    right: -150px;
    pointer-events: none;
    animation: floatBlob1 20s ease-in-out infinite;
}
.login-bg-decor-2 {
    position: absolute;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 149, 237, 0.1) 0%, transparent 70%);
    bottom: -100px;
    left: -150px;
    pointer-events: none;
    animation: floatBlob2 25s ease-in-out infinite;
}
.login-bg-decor-3 {
    position: absolute;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(147, 197, 253, 0.12) 0%, transparent 70%);
    top: 60%;
    left: 55%;
    pointer-events: none;
    animation: floatBlob3 18s ease-in-out infinite;
}

@keyframes floatBlob1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-30px, 20px) scale(1.05); }
}
@keyframes floatBlob2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -25px) scale(1.08); }
}
@keyframes floatBlob3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-15px, -20px) scale(0.95); }
}

/* Contenu hero */
.login-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: heroFadeIn 0.7s ease-out;
}
@keyframes heroFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-hero-logo {
    width: 80px;
    height: 80px;
    border-radius: 22px;
    background: #FFFFFF;
    padding: 8px;
    object-fit: contain;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    margin-bottom: 24px;
}
.login-hero-title {
    font-size: 32px;
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}
.login-hero-tagline {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    margin-bottom: 0;
}



/* ── Côté droit : Formulaire ── */
.login-form-side {
    flex: 1;
    min-height: 100vh;
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    position: relative;
}

/* Le branding mobile est masqué sur desktop */
.login-mobile-brand {
    display: none;
}

.login-form-container {
    width: 100%;
    max-width: 420px;
    animation: formFadeIn 0.6s ease-out 0.15s both;
}
@keyframes formFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── En-tête du formulaire ── */
.login-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 32px;
    gap: 12px;
}
.login-welcome {
    font-size: 12px;
    font-weight: 700;
    color: #3B82F6;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}
.login-title {
    font-size: 26px;
    font-weight: 700;
    color: #0F172A;
    line-height: 1.3;
}
.login-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #EEF2FF, #DBEAFE);
    color: #1E40AF;
    font-size: 11px;
    font-weight: 600;
    padding: 7px 12px;
    border-radius: 999px;
    white-space: nowrap;
    border: 1px solid rgba(59, 130, 246, 0.1);
}

/* ── Champs de formulaire ── */
.login-form {
    gap: 20px !important;
    margin-top: 0 !important;
}
.login-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.login-field label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    padding-left: 2px;
}
.login-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.login-input-icon {
    position: absolute;
    left: 16px;
    color: #94A3B8;
    pointer-events: none;
    flex-shrink: 0;
}
.login-input-wrap input {
    padding-left: 46px !important;
    height: 52px;
    border: 1.5px solid #E2E8F0;
    border-radius: 14px;
    font-size: 15px;
    background: #F8FAFC;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.login-input-wrap input:focus {
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: #FFFFFF;
    outline: none;
}
.login-input-wrap input::placeholder {
    color: #A0AEC0;
    font-size: 14px;
}

/* ── Bouton ── */
.login-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 52px;
    padding: 0 24px;
    background: linear-gradient(135deg, #1E3A5F 0%, #2563EB 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 14px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.25);
    letter-spacing: 0.2px;
    margin-top: 8px;
}
.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.35);
}
.login-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}
.login-btn svg {
    transition: transform 0.2s;
}
.login-btn:hover svg {
    transform: translateX(3px);
}

/* ── Séparateur + notes ── */
.login-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #E2E8F0, transparent);
    margin: 24px 0 16px;
}
.login-footnote {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    color: #94A3B8;
    text-align: center;
}
.login-footnote svg {
    flex-shrink: 0;
    opacity: 0.5;
}

/* ── Footer (desktop = dans le form-side) ── */
.login-footer {
    position: absolute;
    bottom: 28px;
    font-size: 12px;
    color: #CBD5E1;
    text-align: center;
    letter-spacing: 0.2px;
}


/* ══════════════════════════════════════════
   MOBILE — Style iOS natif, épuré
   ══════════════════════════════════════════ */

@media (max-width: 768px) {
    .login-shell {
        flex-direction: column;
    }

    /* Masquer le hero complet */
    .login-hero {
        display: none;
    }

    /* Form prend tout l'écran */
    .login-form-side {
        min-height: 100vh;
        padding: 0 24px;
        padding-top: env(safe-area-inset-top, 0px);
        justify-content: flex-start;
    }

    /* Afficher le branding mobile */
    .login-mobile-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        padding-top: 56px;
        padding-bottom: 36px;
        text-align: center;
    }
    .login-logo {
        width: 64px;
        height: 64px;
        border-radius: 18px;
        background: #FFFFFF;
        padding: 6px;
        object-fit: contain;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
        border: 1px solid #F1F5F9;
    }
    .login-brand-title {
        font-size: 20px;
        font-weight: 800;
        color: #0F172A;
    }
    .login-brand-sub {
        font-size: 13px;
        color: #94A3B8;
        font-weight: 500;
    }

    /* Formulaire pleine largeur */
    .login-form-container {
        max-width: 100%;
    }
    .login-card-head {
        margin-bottom: 24px;
        flex-direction: column;
        align-items: flex-start;
    }
    .login-welcome {
        font-size: 12px;
        color: #3B82F6;
    }
    .login-title {
        font-size: 24px;
    }

    /* Masquer le badge */
    .login-badge {
        display: none;
    }

    /* Inputs iOS */
    .login-field label {
        font-size: 13px;
        color: #64748B;
        font-weight: 500;
        padding-left: 4px;
    }
    .login-input-wrap input {
        background: #F1F5F9;
        border: none;
        border-radius: 12px;
        height: 52px;
        font-size: 17px;
        padding-left: 44px !important;
        transition: background 0.2s;
    }
    .login-input-wrap input:focus {
        background: #E8EDF4;
        border: none;
        box-shadow: none;
        outline: none;
    }
    .login-input-wrap input::placeholder {
        color: #94A3B8;
    }
    .login-input-icon {
        color: #64748B;
    }

    /* Bouton iOS */
    .login-btn {
        height: 54px;
        border-radius: 14px;
        font-size: 17px;
        font-weight: 700;
        background: #2563EB;
        box-shadow: none;
        margin-top: 8px;
    }
    .login-btn:hover {
        transform: none;
        box-shadow: none;
    }
    .login-btn:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
    .login-btn svg {
        display: none;
    }

    /* Divider + footnote */
    .login-divider {
        background: #F1F5F9;
        margin: 24px 0 16px;
    }
    .login-footnote {
        font-size: 13px;
        color: #94A3B8;
    }

    /* Footer sticky bottom */
    .login-footer {
        position: static;
        color: #CBD5E1;
        margin-top: auto;
        padding: 24px 0;
        padding-bottom: max(24px, env(safe-area-inset-bottom, 24px));
    }
}
