/* ── Espace recrue « En Integration » (#/integration) — neumorphique mobile ── */
body.integration-body { background: #e0e5ec; }

.intg {
    --i-bg: #e0e5ec;
    --i-text: #2d3436;
    --i-text2: #636e72;
    --i-text3: #99a3a8;
    --i-accent: #f59e0b;
    --i-ok: #0f7b6c;
    --i-bad: #eb5757;
    --i-sd: #b8bec6;
    --i-sl: #ffffff;
    --i-neu: 6px 6px 14px var(--i-sd), -6px -6px 14px var(--i-sl);
    --i-neu-sm: 4px 4px 9px var(--i-sd), -4px -4px 9px var(--i-sl);
    --i-in: inset 3px 3px 6px var(--i-sd), inset -3px -3px 6px var(--i-sl);
    position: fixed;
    inset: 0;
    background: var(--i-bg);
    color: var(--i-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1;
}

[data-theme="dark"] .intg {
    --i-bg: #23272e; --i-text: #e9edf2; --i-text2: #a4adb8; --i-text3: #7b8593;
    --i-sd: #1a1d22; --i-sl: #2c313a;
}

/* Barre du haut */
.intg-top {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 18px calc(14px); padding-top: calc(14px + env(safe-area-inset-top));
    background: var(--i-bg); box-shadow: var(--i-neu-sm); z-index: 3;
}
.intg-top__brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.intg-top__brand img { height: 26px; }
.intg-top__title { font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.intg-top__sub { font-size: 12px; color: var(--i-text2); }
.intg-icon-btn {
    width: 38px; height: 38px; flex-shrink: 0; border: none; border-radius: 12px;
    background: var(--i-bg); box-shadow: var(--i-neu-sm); color: var(--i-text2);
    display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 20px;
}
.intg-icon-btn:active { box-shadow: var(--i-in); }

/* Contenu scrollable */
.intg-page { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 16px 16px 24px; }
.intg-loading, .intg-empty { text-align: center; color: var(--i-text3); font-size: 13px; padding: 22px 0; }

.intg-card { background: var(--i-bg); box-shadow: var(--i-neu); border-radius: 18px; padding: 18px 16px; margin-bottom: 14px; }
.intg-card--muted { box-shadow: var(--i-neu-sm); }
.intg-card__title { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--i-text2); margin-bottom: 10px; }
.intg-card__title--row { display: flex; align-items: center; justify-content: space-between; }
.intg-count { font-size: 11px; font-weight: 600; color: var(--i-text3); text-transform: none; letter-spacing: 0; }
.intg-count.on { color: var(--i-accent); }
.intg-muted { font-size: 13px; color: var(--i-text2); line-height: 1.6; }
.intg-muted a { color: var(--i-accent); font-weight: 600; }

/* Jauge d'avancement */
.intg-hero { text-align: center; padding: 10px 6px 22px; }
.intg-gauge {
    width: 132px; height: 132px; margin: 0 auto 16px; border-radius: 50%;
    background: conic-gradient(var(--i-accent) calc(var(--p) * 1%), rgba(0,0,0,.06) 0);
    box-shadow: var(--i-neu); display: flex; align-items: center; justify-content: center;
}
.intg-gauge__inner {
    width: 100px; height: 100px; border-radius: 50%; background: var(--i-bg); box-shadow: var(--i-in);
    display: flex; align-items: center; justify-content: center;
}
.intg-gauge__inner span { font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.intg-gauge__inner i { font-size: 14px; font-style: normal; color: var(--i-text2); margin-left: 1px; }
.intg-hero h2 { font-size: 20px; font-weight: 800; margin-bottom: 6px; letter-spacing: -.02em; }
.intg-hero p { font-size: 13.5px; color: var(--i-text2); line-height: 1.6; max-width: 380px; margin: 0 auto; }

/* Etapes du parcours */
.intg-steps { list-style: none; display: flex; gap: 4px; }
.intg-steps li { flex: 1; text-align: center; }
.intg-steps .dot {
    display: flex; align-items: center; justify-content: center; width: 32px; height: 32px;
    margin: 0 auto 7px; border-radius: 50%; background: var(--i-bg); box-shadow: var(--i-in);
    font-size: 13px; font-weight: 800; color: var(--i-text3);
}
.intg-steps li.done .dot { background: var(--i-ok); color: #fff; box-shadow: none; }
.intg-steps li.current .dot { background: var(--i-accent); color: #fff; box-shadow: 0 0 0 4px rgba(245,158,11,.22); }
.intg-steps .lb { font-size: 10.5px; font-weight: 600; color: var(--i-text3); line-height: 1.3; display: block; }
.intg-steps li.current .lb { color: var(--i-text); }

/* Checklist */
.intg-check { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid rgba(0,0,0,.05); cursor: pointer; }
.intg-check:last-child { border-bottom: none; }
.intg-check .bx {
    width: 22px; height: 22px; flex-shrink: 0; border-radius: 7px; box-shadow: var(--i-in);
    display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: transparent;
}
.intg-check.ok .bx { background: var(--i-ok); color: #fff; box-shadow: none; }
.intg-check .lb { flex: 1; font-size: 14px; font-weight: 600; }
.intg-check .st { font-size: 11px; font-weight: 700; color: var(--i-ok); }
.intg-check .st.todo { color: var(--i-accent); }

/* Formulaires */
.intg-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.intg-form--sheet { grid-template-columns: 1fr; }
@media (max-width: 520px) { .intg-form { grid-template-columns: 1fr; } }
.intg-field label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--i-text2); margin-bottom: 6px; }
.intg-field input, .intg-field select {
    width: 100%; padding: 12px 14px; border: none; border-radius: 12px; background: var(--i-bg);
    box-shadow: var(--i-in); font-family: inherit; font-size: 14.5px; color: var(--i-text); outline: none; -webkit-appearance: none;
}
.intg-field input:focus, .intg-field select:focus { box-shadow: var(--i-in), 0 0 0 2px rgba(245,158,11,.35); }

.intg-btn {
    width: 100%; padding: 14px; border: none; border-radius: 14px; background: var(--i-bg); box-shadow: var(--i-neu-sm);
    font-family: inherit; font-size: 14.5px; font-weight: 800; color: var(--i-text); cursor: pointer;
}
.intg-btn:active { box-shadow: var(--i-in); }
.intg-btn--primary { background: var(--i-accent); color: #fff; box-shadow: 4px 4px 10px rgba(245,158,11,.32); }
.intg-btn:disabled { opacity: .55; cursor: not-allowed; }
.intg-err { font-size: 12.5px; font-weight: 600; color: var(--i-bad); margin-top: 10px; text-align: center; }

.intg-file { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; box-shadow: var(--i-neu-sm); cursor: pointer; }
.intg-file input[type=file] { display: none; }
.intg-file .ic { width: 38px; height: 38px; flex-shrink: 0; border-radius: 12px; box-shadow: var(--i-in); display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--i-text2); }
.intg-file .tx { flex: 1; min-width: 0; }
.intg-file .tx b { display: block; font-size: 13.5px; font-weight: 700; }
.intg-file .tx span { display: block; font-size: 11.5px; color: var(--i-text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.intg-file.has .ic { background: var(--i-accent); color: #fff; box-shadow: none; }
.intg-file.has .tx span { color: var(--i-ok); font-weight: 600; }

/* Lignes de liste */
.intg-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid rgba(0,0,0,.05); }
.intg-row:last-child { border-bottom: none; }
.intg-row__main { flex: 1; min-width: 0; }
.intg-row__main b { display: block; font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.intg-row__main span { display: block; font-size: 11.5px; color: var(--i-text3); }
.intg-badge { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 4px 9px; border-radius: 99px; white-space: nowrap; }
.intg-badge.ok { background: rgba(15,123,108,.14); color: var(--i-ok); }
.intg-badge.warn { background: rgba(245,158,11,.16); color: #b45309; }
.intg-badge.bad { background: rgba(235,87,87,.14); color: var(--i-bad); }

/* Onglets bas */
.intg-tabs {
    display: flex; gap: 6px; padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
    background: var(--i-bg); box-shadow: 0 -6px 18px rgba(184,190,198,.5); z-index: 3;
}
.intg-tabs button {
    flex: 1; padding: 11px 4px; border: none; border-radius: 13px; background: var(--i-bg);
    font-family: inherit; font-size: 11.5px; font-weight: 700; color: var(--i-text3); cursor: pointer;
}
.intg-tabs button.is-active { color: var(--i-accent); box-shadow: var(--i-in); }

/* Panneau coulissant */
.intg-sheet-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); opacity: 0; pointer-events: none; transition: opacity .22s; z-index: 8; }
.intg-sheet-overlay.is-open { opacity: 1; pointer-events: auto; }
.intg-sheet {
    position: fixed; left: 0; right: 0; bottom: 0; max-height: 88dvh; z-index: 9;
    background: var(--i-bg); border-radius: 22px 22px 0 0; box-shadow: 0 -10px 30px rgba(0,0,0,.18);
    transform: translateY(102%); transition: transform .28s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column;
}
.intg-sheet.is-open { transform: translateY(0); }
.intg-sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 10px; }
.intg-sheet__head h3 { font-size: 16px; font-weight: 800; }
.intg-sheet__body { padding: 4px 18px calc(24px + env(safe-area-inset-bottom)); overflow-y: auto; }

.intg-toast {
    position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 20px); z-index: 12;
    background: #2d3436; color: #fff; font-size: 13px; font-weight: 700; padding: 11px 20px; border-radius: 99px;
    opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.intg-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
