:root {
    --unimes-orange: #E87722;
    --unimes-orange-dark: #d06a1a;
    --unimes-bg: #f5f4f0;
}

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

body {
    font-family: system-ui, -apple-system, sans-serif;
    background: var(--unimes-bg);
    color: #1a1a1a;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background: var(--unimes-orange);
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left { display: flex; align-items: center; gap: 14px; }

.header-icon {
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 20px;
}

.header h1 { font-size: 18px; font-weight: 600; color: #fff; margin: 0; }
.header p  { font-size: 12px; color: rgba(255,255,255,0.85); margin: 0; }

.user-badge {
    background: rgba(255,255,255,0.2);
    border-radius: 8px;
    padding: 6px 14px;
    display: flex; align-items: center; gap: 8px;
    color: #fff; font-size: 13px; font-weight: 500;
}

main { flex: 1; padding: 2rem 1.5rem; display: flex; flex-direction: column; gap: 1rem; max-width: 860px; margin: 0 auto; width: 100%; }

.card {
    background: #fff;
    border-radius: 12px;
    border: 0.5px solid rgba(0,0,0,0.1);
    overflow: hidden;
}

.card-header {
    padding: 1rem 1.25rem;
    display: flex; align-items: center; gap: 10px;
    border-bottom: 0.5px solid rgba(0,0,0,0.08);
}

.card-header i { font-size: 18px; color: var(--unimes-orange); }
.card-header h2 { font-size: 15px; font-weight: 600; color: #1a1a1a; }

.card-body { padding: 1.5rem 1.25rem; }

.notice {
    font-size: 13px; color: #555;
    background: #fafafa;
    border-left: 3px solid var(--unimes-orange);
    border-radius: 0 8px 8px 0;
    padding: 10px 14px;
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; color: #555; font-weight: 500; }
.field input[type="text"],
.field input[type="email"],
.field input[type="password"] {
    height: 38px;
    border-radius: 8px;
    border: 0.5px solid rgba(0,0,0,0.2);
    background: #fafafa;
    padding: 0 12px;
    font-size: 14px;
    color: #1a1a1a;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus {
    border-color: var(--unimes-orange);
    box-shadow: 0 0 0 3px rgba(232,119,34,0.15);
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }

.rules-title { font-size: 13px; font-weight: 600; color: #1a1a1a; margin-bottom: 10px; }
.rule { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #666; margin-bottom: 6px; }
.rule i { font-size: 14px; color: #aaa; }
.rule.valid i { color: #3B6D11; }

.btn {
    height: 40px;
    background: var(--unimes-orange);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px; font-weight: 500;
    padding: 0 20px;
    cursor: pointer;
    display: inline-flex; align-items: center; gap: 8px;
    transition: background 0.15s;
}
.btn:hover { background: var(--unimes-orange-dark); }
.btn-full { width: 100%; justify-content: center; }

.mfa-row { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.mfa-desc { font-size: 13px; color: #555; line-height: 1.6; }

.toggle {
    flex-shrink: 0;
    width: 44px; height: 24px;
    background: #ddd;
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
}
.toggle.active { background: var(--unimes-orange); }
.toggle-knob {
    width: 18px; height: 18px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 3px; left: 3px;
    transition: transform 0.2s;
}
.toggle.active .toggle-knob { transform: translateX(20px); }

footer {
    background: #fff;
    border-top: 0.5px solid rgba(0,0,0,0.08);
    padding: 1rem;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    font-size: 12px; color: #999;
    text-transform: uppercase; letter-spacing: 0.5px;
}
footer i { color: var(--unimes-orange); }

/* ========== RESPONSIVE MOBILE ========== */
@media (max-width: 600px) {

    /* Header */
    .header {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .header h1 { font-size: 15px; }
    .header p  { font-size: 11px; }

    /* User badge + bouton déconnexion */
    .header > div {
        width: 100%;
        flex-wrap: wrap;
    }

    .user-badge {
        font-size: 12px;
        padding: 5px 10px;
    }

    /* Main */
    main {
        padding: 1rem;
    }

    /* Grid 2 colonnes → 1 colonne sur mobile */
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* MFA row */
    .mfa-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    /* Bouton pleine largeur sur mobile */
    .btn {
        width: 100%;
        justify-content: center;
    }
}