/* =====================================================================
   EBIKE & CO — Portail atelier · style.css
   ===================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Archivo+Black&display=swap');

:root {
    --bg:          #0b1310;
    --surface:     #121f1a;
    --surface-2:   #18291f;
    --border:      #25392e;
    --border-soft: #1d2e25;

    --accent:      #10b981;
    --accent-2:    #34d399;
    --accent-dim:  rgba(16, 185, 129, .12);
    --accent-ring: rgba(16, 185, 129, .35);

    --text:        #e7efea;
    --text-muted:  #93a89c;
    --text-faint:  #6b8073;

    --danger:      #ef4444;
    --danger-dim:  rgba(239, 68, 68, .12);

    --radius:      12px;
    --radius-sm:   8px;
    --shadow:      0 10px 30px rgba(0, 0, 0, .35);
    --font:        'Manrope', system-ui, sans-serif;
    --display:     'Archivo Black', var(--font);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* ---------- Marque ---------- */
.brand-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 11px; flex: none;
    background: linear-gradient(135deg, var(--accent), #0f9d6f);
    color: #04130d; font-family: var(--display); font-size: 13px; letter-spacing: -.02em;
    box-shadow: 0 4px 14px var(--accent-dim);
}

/* =====================================================================
   AUTH
   ===================================================================== */
.auth-body {
    min-height: 100vh; display: grid; place-items: center; padding: 24px;
    background:
        radial-gradient(900px 500px at 50% -10%, rgba(16,185,129,.10), transparent 60%),
        var(--bg);
}
.auth-card {
    width: 100%; max-width: 380px; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 28px; box-shadow: var(--shadow);
}
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 22px; }
.auth-brand strong { display: block; font-size: 17px; }
.auth-brand span { font-size: 12px; color: var(--text-muted); }
.auth-logo { height: 56px; width: auto; display: block; }
.auth-sub { font-size: 11px; color: var(--text-muted); letter-spacing: .14em; text-transform: uppercase; }
.auth-hint { color: var(--text-muted); font-size: 14px; margin: 0 0 16px; }
.auth-link { display: block; text-align: center; margin-top: 16px; color: var(--accent-2);
             font-size: 14px; }
.auth-card form label { display: block; margin-bottom: 14px; font-size: 13px; color: var(--text-muted); }
.auth-card form label small { color: var(--text-faint); }

/* =====================================================================
   FORM ELEMENTS
   ===================================================================== */
input[type=text], input[type=tel], input[type=email], input[type=password],
input[type=date], input[type=search], textarea, select {
    width: 100%; margin-top: 5px; padding: 10px 12px;
    background: var(--bg); color: var(--text);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-family: var(--font); font-size: 14.5px;
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-ring);
}
label { font-size: 13px; color: var(--text-muted); }
label small { color: var(--text-faint); font-weight: 400; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-2 > label { display: block; }
.checks { display: flex; flex-wrap: wrap; gap: 16px; margin: 10px 0; }
.chk { display: inline-flex; align-items: center; gap: 7px; color: var(--text); font-size: 14px; }
.chk input { width: auto; margin: 0; }

/* =====================================================================
   BUTTONS
   ===================================================================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 10px 16px; border: 1px solid transparent; border-radius: var(--radius-sm);
    font-family: var(--font); font-weight: 600; font-size: 14px; cursor: pointer;
    transition: transform .04s ease, background .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #04130d; }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--danger-dim); color: #fca5a5; border-color: rgba(239,68,68,.3); }
.btn-danger:hover { background: rgba(239,68,68,.2); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* =====================================================================
   ALERTS
   ===================================================================== */
.alert { padding: 11px 14px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 16px; }
.alert-error { background: var(--danger-dim); color: #fca5a5; border: 1px solid rgba(239,68,68,.3); }
.alert-ok { background: var(--accent-dim); color: var(--accent-2); border: 1px solid var(--accent-ring); }

/* =====================================================================
   LAYOUT
   ===================================================================== */
.layout { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar {
    background: var(--surface); border-right: 1px solid var(--border);
    display: flex; flex-direction: column; padding: 20px 16px;
    position: sticky; top: 0; height: 100vh;
}
.sidebar-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 26px; padding: 0 4px; }
.sidebar-brand strong { display: block; font-size: 15px; }
.sidebar-brand span { font-size: 11px; color: var(--text-muted); }
.brand-logo { height: 40px; width: auto; display: block; }
.brand-sub { font-size: 10.5px; color: var(--text-muted); letter-spacing: .12em; text-transform: uppercase; }
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar-nav a {
    display: flex; align-items: center; gap: 11px; padding: 10px 12px;
    border-radius: var(--radius-sm); color: var(--text-muted); font-weight: 600; font-size: 14.5px;
}
.sidebar-nav a:hover { background: var(--surface-2); color: var(--text); }
.sidebar-nav a.active { background: var(--accent-dim); color: var(--accent-2); }
.nav-ico { font-size: 16px; }
.sidebar-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border); }
.who { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.who-avatar {
    width: 34px; height: 34px; border-radius: 50%; flex: none;
    display: grid; place-items: center; background: var(--surface-2);
    color: var(--accent-2); font-weight: 700;
}
.who strong { display: block; font-size: 13.5px; }
.who span { font-size: 11.5px; color: var(--text-faint); }

.content { padding: 26px 30px 60px; max-width: 1120px; }

/* =====================================================================
   PAGE HEAD / TABS
   ===================================================================== */
.page-head { display: flex; align-items: center; justify-content: space-between;
             gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-h1 { font-family: var(--display); font-size: 22px; margin: 0; }
.page-sub { color: var(--text-muted); font-size: 14px; margin: 2px 0 0; }

.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab {
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px;
    border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--text-muted);
    border: 1px solid transparent;
}
.tab:hover { background: var(--surface-2); color: var(--text); }
.tab.active { background: var(--accent-dim); color: var(--accent-2); border-color: var(--accent-ring); }
.tab .badge {
    background: var(--surface-2); color: var(--text-muted); border-radius: 999px;
    padding: 1px 8px; font-size: 12px; font-weight: 700;
}
.tab.active .badge { background: var(--accent); color: #04130d; }

/* =====================================================================
   SEARCH
   ===================================================================== */
.searchbar { margin-bottom: 16px; }
.searchbar input { max-width: 460px; }

/* =====================================================================
   TICKET LIST
   ===================================================================== */
.ticket-list { display: flex; flex-direction: column;
    border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.ticket-row {
    display: grid; grid-template-columns: 34px 96px 1fr 168px 110px 88px;
    align-items: center; gap: 12px; padding: 13px 16px;
    border-bottom: 1px solid var(--border-soft); background: var(--surface);
    transition: background .12s ease;
}
.ticket-row:last-child { border-bottom: 0; }
.ticket-row:hover { background: var(--surface-2); }
.t-icon { font-size: 18px; text-align: center; }
.t-icon.big { font-size: 26px; }
.t-ref { font-weight: 700; font-size: 13px; color: var(--accent-2); letter-spacing: .01em; }
.t-client strong { display: block; font-size: 14.5px; }
.t-client small { color: var(--text-faint); font-size: 12.5px; }
.t-status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-muted); }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.t-amount { font-weight: 700; font-size: 13.5px; color: #facc15; text-align: right; }
.t-date { font-size: 12.5px; color: var(--text-faint); text-align: right; }

.empty, .no-result {
    text-align: center; color: var(--text-muted); padding: 48px 20px;
    border: 1px dashed var(--border); border-radius: var(--radius); background: var(--surface);
}
.no-result { padding: 28px; margin-top: 12px; }

/* =====================================================================
   MODAL
   ===================================================================== */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(4, 9, 7, .66);
    backdrop-filter: blur(3px); display: grid; place-items: start center;
    padding: 32px 16px; z-index: 50; overflow-y: auto;
}
.modal-overlay[hidden] { display: none; }
.modal {
    width: 100%; max-width: 620px; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.modal-head { display: flex; align-items: center; justify-content: space-between;
              padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: 18px; }
.modal-close { background: none; border: 0; color: var(--text-muted); font-size: 26px;
               line-height: 1; cursor: pointer; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 13px; }
.modal-body > label { display: block; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

/* ---------- Type picker ---------- */
.type-picker { border: 0; padding: 0; margin: 0; }
.type-picker legend { font-size: 13px; color: var(--text-muted); padding: 0; margin-bottom: 7px; }
.type-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.type-picker.compact .type-options { grid-template-columns: repeat(4, 1fr); }
.type-opt { position: relative; }
.type-opt input { position: absolute; opacity: 0; }
.type-opt span {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 13.5px; font-weight: 600; color: var(--text-muted); cursor: pointer; text-align: center;
}
.type-opt input:checked + span {
    border-color: var(--accent); background: var(--accent-dim); color: var(--accent-2);
}

.electric-only { transition: opacity .15s ease; }
.electric-only.hidden { display: none; }

/* =====================================================================
   TICKET DETAIL
   ===================================================================== */
.ticket-head .th-left { display: flex; align-items: center; gap: 14px; }
.ticket-head h1 { font-family: var(--display); font-size: 19px; margin: 0; }
.ticket-head p { margin: 2px 0 0; color: var(--text-muted); font-size: 14px; }
.back { font-size: 22px; color: var(--text-muted); padding: 4px 8px; border-radius: 8px; }
.back:hover { background: var(--surface-2); color: var(--text); }

.status-bar { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 20px; }
.status-pill-form { margin: 0; }
.status-pill {
    padding: 7px 13px; border-radius: 999px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text-muted); font-weight: 600; font-size: 13px;
    cursor: pointer; font-family: var(--font);
}
.status-pill:hover { border-color: var(--c); color: var(--text); }
.status-pill.active { background: var(--c); border-color: var(--c); color: #06120c; }

.ticket-grid { display: grid; grid-template-columns: 1fr 320px; gap: 18px; align-items: start; }
.side-col { display: flex; flex-direction: column; gap: 18px; }

.card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px;
}
.card-title { font-size: 13px; text-transform: uppercase; letter-spacing: .1em;
              color: var(--accent-2); margin: 0 0 14px; font-weight: 700; }
.edit-form { display: flex; flex-direction: column; gap: 13px; }
.edit-form > label { display: block; }
.form-actions { display: flex; justify-content: flex-end; }

.invoice-form { display: flex; flex-direction: column; gap: 12px; }
.invoice-form label { display: block; }
.billed-ok { color: var(--accent-2); font-weight: 700; margin: 0 0 6px; }
.muted { color: var(--text-muted); font-size: 13.5px; }

.info-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 16px; }
.info-list dt { color: var(--text-faint); font-size: 13px; }
.info-list dd { margin: 0; font-size: 13.5px; text-align: right; }

/* ---------- Journal / timeline ---------- */
.note-form { display: flex; gap: 10px; margin-bottom: 18px; }
.note-form input { flex: 1; margin: 0; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.timeline li {
    display: grid; grid-template-columns: 140px 1fr auto; gap: 12px; align-items: baseline;
    padding: 9px 0; border-bottom: 1px solid var(--border-soft); font-size: 13.5px;
}
.timeline li:last-child { border-bottom: 0; }
.tl-time { color: var(--text-faint); font-size: 12.5px; }
.tl-msg { color: var(--text); }
.tl-author { color: var(--accent-2); font-size: 12px; font-weight: 600; }

/* ---------- Photos ---------- */
.photo-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px; margin-bottom: 16px;
}
.photo-item { position: relative; margin: 0; }
.photo-link {
    display: block; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden;
    border: 1px solid var(--border); background: var(--bg);
}
.photo-link img { width: 100%; height: 100%; object-fit: cover; display: block;
                  transition: transform .2s ease; }
.photo-link:hover img { transform: scale(1.05); }
.photo-del { position: absolute; top: 5px; right: 5px; margin: 0; }
.photo-del button {
    width: 24px; height: 24px; border-radius: 50%; border: 0; cursor: pointer;
    background: rgba(8, 14, 11, .72); color: #fff; font-size: 16px; line-height: 1;
    display: grid; place-items: center;
}
.photo-del button:hover { background: var(--danger); }
.photo-empty { padding: 8px 0 16px; }

.photo-upload { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
.file-drop {
    flex: 1; min-width: 220px; display: flex; align-items: center; gap: 10px;
    padding: 11px 14px; border: 1px dashed var(--border); border-radius: var(--radius-sm);
    color: var(--text-muted); cursor: pointer; background: var(--bg); font-size: 14px;
}
.file-drop:hover { border-color: var(--accent); color: var(--text); }
.file-drop input[type=file] { display: none; }

/* ---------- Lightbox ---------- */
.lightbox {
    position: fixed; inset: 0; background: rgba(4, 9, 7, .9); z-index: 80;
    display: grid; place-items: center; padding: 24px; cursor: zoom-out;
}
.lightbox img { max-width: 94vw; max-height: 90vh; border-radius: 8px;
                box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.lightbox .lb-close {
    position: absolute; top: 18px; right: 22px; background: none; border: 0;
    color: #fff; font-size: 34px; cursor: pointer; line-height: 1;
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 940px) {
    .layout { grid-template-columns: 1fr; }
    .sidebar { position: static; height: auto; flex-direction: row; align-items: center;
               flex-wrap: wrap; gap: 12px; }
    .sidebar-brand { margin-bottom: 0; }
    .sidebar-nav { flex-direction: row; }
    .sidebar-foot { margin: 0 0 0 auto; padding: 0; border: 0; display: flex; align-items: center; gap: 12px; }
    .ticket-grid { grid-template-columns: 1fr; }
    .ticket-row { grid-template-columns: 28px 1fr auto; row-gap: 4px; }
    .t-ref { grid-column: 2; }
    .t-status, .t-amount, .t-date { grid-column: 2; text-align: left; }
}
@media (max-width: 560px) {
    .content { padding: 18px 16px 50px; }
    .grid-2, .type-options, .type-picker.compact .type-options { grid-template-columns: 1fr; }
    .timeline li { grid-template-columns: 1fr; gap: 2px; }
    .tl-author { justify-self: start; }
}

/* =====================================================================
   Fiche de réception (checklist « état visuel »)
   ===================================================================== */
.fiche {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    margin: 4px 0 2px;
}
.fiche > summary {
    cursor: pointer;
    padding: 11px 14px;
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
    list-style: none;
    user-select: none;
}
.fiche > summary::-webkit-details-marker { display: none; }
.fiche > summary::before {
    content: '▸';
    color: var(--accent);
    font-size: 12px;
    transition: transform .15s ease;
}
.fiche[open] > summary::before { transform: rotate(90deg); }
.fiche > summary:hover { background: var(--accent-dim); border-radius: var(--radius-sm); }
.fiche > summary .badge {
    margin-left: auto;
    background: var(--border);
    color: var(--text-muted);
    border-radius: 999px;
    padding: 2px 9px;
    font-size: 12px;
    font-weight: 600;
}
.fiche-body {
    padding: 4px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-top: 1px solid var(--border-soft);
}

/* --- Grille des points de contrôle --- */
.checklist { display: flex; flex-direction: column; }
.checklist-head,
.checklist-row {
    display: grid;
    grid-template-columns: minmax(120px, 1.6fr) repeat(3, 42px) minmax(90px, 2fr);
    align-items: center;
    gap: 6px;
}
.checklist-head {
    padding: 8px 0 6px;
    border-bottom: 1px solid var(--border);
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-faint);
    font-weight: 700;
}
.checklist-head .cl-state { text-align: center; }
.checklist-row {
    padding: 4px 0;
    border-bottom: 1px solid var(--border-soft);
}
.checklist-row:last-child { border-bottom: 0; }
.checklist-row.hidden { display: none; }
.checklist-row .cl-item { font-size: 13.5px; color: var(--text); }

/* Les 3 pastilles OK / SO / Obs */
.checklist-row .cl-state {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.checklist-row .cl-state input { position: absolute; opacity: 0; pointer-events: none; }
.checklist-row .cl-state-lbl {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 4px 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-faint);
    font-size: 11.5px;
    font-weight: 700;
    transition: background .12s, color .12s, border-color .12s;
}
.checklist-row .cl-state:hover .cl-state-lbl { border-color: var(--accent-ring); color: var(--text-muted); }
.checklist-row .cl-state input:checked + .cl-state-lbl {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent-2);
}
.checklist-row .cl-state input:focus-visible + .cl-state-lbl { box-shadow: 0 0 0 2px var(--accent-ring); }
.checklist-row .cl-detail input {
    padding: 5px 8px;
    font-size: 13px;
    margin: 0;
}

/* =====================================================================
   Acompte (obligatoire)
   ===================================================================== */
.deposit-block {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    padding: 10px 14px 12px;
    margin: 2px 0;
}
.deposit-block > legend {
    padding: 0 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--accent-2);
}
.deposit-row {
    display: flex;
    align-items: flex-end;
    gap: 18px;
    flex-wrap: wrap;
}
.deposit-row .deposit-amount { flex: 1 1 160px; margin: 0; }
.deposit-row .deposit-amount input { margin-bottom: 0; }
.deposit-row .chk { padding-bottom: 9px; white-space: nowrap; }
.deposit-block.is-none .deposit-amount { opacity: .45; }
.deposit-block.is-none .deposit-amount input { cursor: not-allowed; }
.deposit-hint { margin: 8px 0 0; font-size: 12.5px; }
.deposit-block.is-none .deposit-hint { visibility: hidden; }

/* Badge « facturé » dans les archives */
.billed-tag {
    margin-left: 6px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--accent-2);
    background: var(--accent-dim);
    border-radius: 999px;
    padding: 1px 8px;
    white-space: nowrap;
}

@media (max-width: 720px) {
    .checklist-head { display: none; }
    .checklist-row {
        grid-template-columns: repeat(3, 1fr);
        grid-template-areas:
            'item item item'
            's1   s2   s3'
            'det  det  det';
        gap: 5px;
        padding: 10px 0;
    }
    .checklist-row .cl-item { grid-area: item; font-weight: 600; }
    .checklist-row .cl-state:nth-of-type(1) { grid-area: s1; }
    .checklist-row .cl-state:nth-of-type(2) { grid-area: s2; }
    .checklist-row .cl-state:nth-of-type(3) { grid-area: s3; }
    .checklist-row .cl-detail { grid-area: det; }
}

/* =====================================================================
   PARAMÈTRES — gestion des utilisateurs (admin uniquement)
   ===================================================================== */
.settings-grid { display: grid; grid-template-columns: 1fr 340px; gap: 14px; align-items: start; }

.user-list { display: flex; flex-direction: column; }
.user-row {
    display: grid;
    grid-template-columns: 34px 1fr auto auto;
    align-items: center;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--border-soft);
}
.user-row:last-child { border-bottom: 0; }
.user-id strong { display: block; font-size: 14px; }
.user-id span { font-size: 12.5px; color: var(--text-faint); }

.role-tag {
    font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 2px 9px;
    background: var(--surface-2); color: var(--text-muted); white-space: nowrap;
}
.role-tag.is-admin { background: var(--accent-dim); color: var(--accent-2); }

.user-actions { display: flex; align-items: center; gap: 6px; }
.user-actions form { margin: 0; }
.small { font-size: 12.5px; }

/* Mini-formulaire de réinitialisation, replié */
details.mini { position: relative; }
details.mini > summary { list-style: none; cursor: pointer; }
details.mini > summary::-webkit-details-marker { display: none; }
.mini-form {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 20;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 10px; box-shadow: var(--shadow);
    display: flex; gap: 6px; width: 260px;
}
.mini-form input { margin: 0; }

/* Choix du rôle à la création */
.role-pick { margin-bottom: 12px; }
.role-pick > legend {
    font-size: 12px; font-weight: 800; text-transform: uppercase;
    letter-spacing: .05em; color: var(--text-faint); padding: 0 0 6px;
}
.role-opt { display: block; margin-bottom: 7px; cursor: pointer; }
.role-opt input { position: absolute; opacity: 0; }
.role-opt > span {
    display: block; padding: 9px 11px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); background: var(--surface-2);
}
.role-opt > span strong { display: block; font-size: 13.5px; color: var(--text-muted); }
.role-opt > span small { font-size: 12px; color: var(--text-faint); line-height: 1.35; display: block; margin-top: 2px; }
.role-opt input:checked + span { border-color: var(--accent); background: var(--accent-dim); }
.role-opt input:checked + span strong { color: var(--accent-2); }
.role-opt input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-ring); }

@media (max-width: 860px) {
    .settings-grid { grid-template-columns: 1fr; }
    .user-row { grid-template-columns: 34px 1fr; row-gap: 8px; }
    .user-row .role-tag { grid-column: 2; justify-self: start; }
    .user-actions { grid-column: 1 / -1; }
    .mini-form { right: auto; left: 0; }
}
