/* ===============================================================
   AFRIKTECK Konta — Pages d'authentification immersives
   Signature graphique alignée sur AFRIKTECK Suite 360 :
   fond dégradé + blobs animés, carte glass, champs à icônes,
   applications, pied de page. Namespace .kt-* (aucun conflit).
   =============================================================== */

.auth-body {
    margin: 0;
    font-family: var(--font-sans, "Inter", system-ui, sans-serif);
    background: #f8fafc;
    color: #0f172a;
    -webkit-font-smoothing: antialiased;
}

.kt-auth-page {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow: hidden;
    padding: 24px 16px;
    background:
        radial-gradient(ellipse 60% 50% at 0% 0%, #e2e8f0 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 100% 100%, #e2e8f0 0%, transparent 60%),
        #f8fafc;
}

.kt-auth-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.kt-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.18;
    animation: ktFloat 24s ease-in-out infinite;
}
.kt-blob.b1 { width: 520px; height: 520px; top: -170px; left: -130px; background: #86efac; }
.kt-blob.b2 { width: 600px; height: 600px; bottom: -190px; right: -150px; background: #4ade80; animation-delay: -7s; }
.kt-blob.b3 { width: 350px; height: 350px; top: 42%; left: 56%; background: #bbf7d0; opacity: 0.14; animation-delay: -14s; }
@keyframes ktFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(28px, -22px) scale(1.06); }
    66% { transform: translate(-22px, 18px) scale(0.96); }
}

.kt-auth-wrap {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: min(460px, 94vw);
    animation: ktFadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes ktFadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---- brand row ---- */
.kt-auth-brand { display: flex; align-items: center; gap: 12px; padding: 4px 6px; }
.kt-auth-logo {
    width: 40px; height: 40px; flex: none;
    border-radius: 12px; display: grid; place-items: center;
    background: linear-gradient(135deg, #107c41, #0f766e);
    color: #fff;
    font-size: 18px; font-weight: 800; letter-spacing: -0.02em;
    box-shadow: 0 4px 12px rgba(16, 124, 65, 0.22);
}
.kt-auth-brand-name { font-size: 18px; font-weight: 800; letter-spacing: -0.015em; color: #0f172a; line-height: 1.1; }
.kt-auth-brand-sub { font-size: 10.5px; font-weight: 600; color: #64748b; letter-spacing: 0.08em; text-transform: uppercase; margin-top: 3px; }
.kt-auth-spacer { flex: 1; }
.kt-auth-badge {
    font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
    color: #0f766e; background: rgba(15, 118, 110, 0.10);
    padding: 5px 10px; border-radius: 999px;
}

/* ---- card ---- */
.kt-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 24px 56px rgba(15, 23, 42, 0.14), 0 8px 16px rgba(15, 23, 42, 0.06);
    padding: 32px 32px 28px;
}
.kt-title { font-size: 22px; font-weight: 800; letter-spacing: -0.015em; color: #0f172a; margin: 0 0 4px; }
.kt-subtitle { font-size: 13px; color: #64748b; margin: 0 0 22px; line-height: 1.65; }

.kt-err {
    display: none; color: #991b1b; font-size: 12.5px; font-weight: 600;
    background: #fef2f2; border: 1px solid #fef2f2; border-radius: 8px;
    padding: 10px 12px; margin-bottom: 14px;
}
.kt-err.show { display: block; }

/* ---- fields ---- */
.kt-field { margin-bottom: 14px; }
.kt-label { display: block; font-size: 12px; font-weight: 600; color: #475569; margin-bottom: 6px; }
.kt-input-group { position: relative; display: flex; align-items: center; }
.kt-input-icon {
    position: absolute; left: 12px; display: flex; color: #94a3b8; pointer-events: none;
}
.kt-input {
    width: 100%; box-sizing: border-box;
    font-family: inherit; font-size: 13.5px; color: #0f172a;
    padding: 11px 14px 11px 38px;
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.kt-input::placeholder { color: #94a3b8; }
.kt-input:focus {
    outline: none; background: #fff; border-color: #107c41;
    box-shadow: 0 0 0 3px rgba(16, 124, 65, 0.18);
}
.kt-input.has-toggle { padding-right: 42px; }
.kt-toggle {
    position: absolute; right: 8px; width: 30px; height: 30px;
    display: grid; place-items: center; border: 0; background: transparent;
    cursor: pointer; color: #64748b; border-radius: 8px;
}
.kt-toggle:hover { background: #f1f5f9; color: #0f172a; }
.kt-hint { font-size: 11px; color: #64748b; margin-top: 6px; }
.kt-hint code { font-family: var(--font-mono, monospace); background: #f1f5f9; padding: 1px 5px; border-radius: 5px; }

/* ---- button ---- */
.kt-btn {
    width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: inherit; font-size: 14px; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, #16a34a, #107c41);
    border: 0; border-radius: 10px; padding: 12px 16px; margin-top: 4px;
    cursor: pointer; box-shadow: 0 4px 12px rgba(16, 124, 65, 0.28);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.kt-btn:hover { filter: brightness(1.05); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(16, 124, 65, 0.32); }
.kt-btn:active { transform: none; }

/* ---- divider ---- */
.kt-divider {
    display: flex; align-items: center; gap: 10px;
    margin: 22px 0 16px; color: #94a3b8;
    font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.kt-divider::before, .kt-divider::after { content: ""; flex: 1; height: 1px; background: #e2e8f0; }

/* ---- apps row ---- */
.kt-apps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 18px; }
.kt-app {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 10px 4px; border-radius: 10px; background: #f8fafc; border: 1px solid #e2e8f0;
    transition: all .15s ease;
}
.kt-app:hover { border-color: #cbd5e1; transform: translateY(-1px); }
.kt-app__ico {
    width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center;
    font-weight: 800; font-size: 14px; color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.kt-app__ico--fact  { background: linear-gradient(135deg, #0f766e, #107c41); }
.kt-app__ico--devis { background: linear-gradient(135deg, #185abd, #2b7a78); }
.kt-app__ico--cli   { background: linear-gradient(135deg, #c43e1c, #d24726); }
.kt-app__ico--compta{ background: linear-gradient(135deg, #608b27, #7aa63d); }
.kt-app__ico--stock { background: linear-gradient(135deg, #6d28d9, #a78bfa); }
.kt-app__name { font-size: 10.5px; font-weight: 600; color: #475569; letter-spacing: -0.01em; text-align: center; }

/* ---- features (inscription) ---- */
.kt-feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.kt-feature { display: flex; align-items: center; gap: 10px; padding: 12px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; }
.kt-feature__icon { width: 30px; height: 30px; flex: none; border-radius: 8px; display: grid; place-items: center; background: #0f172a; color: #fff; }
.kt-feature__title { font-size: 12.5px; font-weight: 700; color: #0f172a; line-height: 1.2; }
.kt-feature__desc { font-size: 10.5px; color: #64748b; margin-top: 2px; }

/* ---- switch (login <-> inscription) ---- */
.kt-switch {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 11px 12px; margin-top: 14px;
    font-size: 12.5px; font-weight: 600; color: #475569; text-decoration: none;
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px;
    transition: all .15s ease;
}
.kt-switch:hover { background: #fff; color: #0f172a; border-color: #cbd5e1; text-decoration: none; }
.kt-switch a { color: #0f766e; font-weight: 700; text-decoration: none; }
.kt-switch a:hover { text-decoration: underline; }

/* ---- footer ---- */
.kt-auth-footer { text-align: center; font-size: 11px; color: #94a3b8; letter-spacing: 0.02em; }

/* ---- responsive ---- */
@media (max-width: 520px) {
    .kt-card { padding: 24px 20px 22px; border-radius: 16px; }
    .kt-apps { grid-template-columns: repeat(5, 1fr); gap: 6px; }
    .kt-app__name { font-size: 9px; }
    .kt-feature-row { grid-template-columns: 1fr; }
}
