/* Interface de recrutement — V1
   Les couleurs de la marque se changent ici (variables ci-dessous). */
:root {
  --brand: #124c7c;       /* bleu marine du logo ETMC */
  --brand-2: #0e75c2;     /* bleu vif du logo (« TECH ») */
  --accent: #7cc0f2;
  --bg: #f4f6f9;
  --surface: #ffffff;
  --text: #1a2230;
  --muted: #5d6878;
  --line: #e1e6ed;
  --ok: #1f8a52;
  --ok-bg: #e5f5ec;
  --warn: #a86a00;
  --warn-bg: #fff4dc;
  --err: #c0362c;
  --err-bg: #fdeceb;
  --info-bg: #e8f0fa;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 30, 54, .06), 0 4px 16px rgba(16, 30, 54, .06);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); line-height: 1.5; font-size: 16px; min-height: 100vh; }
a { color: var(--brand-2); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.hidden { display: none !important; }

/* ---------- En-tête */
.topbar { background: #fff; color: var(--brand); border-bottom: 1px solid var(--line); box-shadow: 0 1px 3px rgba(16,30,54,.05); }
.topbar-in { max-width: 1100px; margin: 0 auto; padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.logo { width: 36px; height: 36px; border-radius: 9px; background: var(--accent); color: var(--brand); display: grid; place-items: center; font-weight: 800; flex: none; }
.brand-name { font-weight: 700; }
.brand-sub { font-size: .8rem; opacity: .8; }
.topbar .spacer { flex: 1; }
.topbar .who { font-size: .9rem; opacity: .9; text-align: right; }
.btn-ghost-light { background: transparent; color: var(--brand); border: 1px solid #c5d2e2; }
.btn-ghost-light:hover { background: var(--info-bg); }

.wrap { max-width: 1100px; margin: 0 auto; padding: 24px 16px 64px; }

/* ---------- Cartes & formulaires */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.card + .card { margin-top: 16px; }
.panel.card { margin-top: 0; }
label { display: block; font-weight: 600; font-size: .9rem; margin: 0 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], input[type=time], input[type=number], select, textarea {
  width: 100%; padding: 11px 12px; font: inherit; border: 1px solid #cdd5df; border-radius: 8px; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 3px solid rgba(29, 79, 134, .25); border-color: var(--brand-2); }
.field { margin-bottom: 16px; }
.row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; padding: 10px 18px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background .15s; }
.btn-primary { background: var(--brand-2); color: #fff; }
.btn-primary:hover { background: var(--brand); }
.btn-primary:disabled { background: #9aabc0; cursor: not-allowed; }
.btn-secondary { background: #fff; color: var(--brand-2); border-color: #c5d2e2; }
.btn-secondary:hover { background: var(--info-bg); }
.btn-danger { background: #fff; color: var(--err); border-color: #efc2be; }
.btn-danger:hover { background: var(--err-bg); }
.btn-ok { background: var(--ok); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: .85rem; }
.btn-block { width: 100%; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

.alert { padding: 12px 14px; border-radius: 8px; margin-bottom: 16px; font-size: .95rem; }
.alert-err { background: var(--err-bg); color: var(--err); }
.alert-ok { background: var(--ok-bg); color: var(--ok); }
.alert-info { background: var(--info-bg); color: var(--brand); }
.alert-warn { background: var(--warn-bg); color: var(--warn); }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.b-en_cours, .b-en_attente { background: #edf0f4; color: var(--muted); }
.b-complet { background: var(--info-bg); color: var(--brand-2); }
.b-a_corriger { background: var(--warn-bg); color: var(--warn); }
.b-valide { background: var(--ok-bg); color: var(--ok); }
.b-refuse { background: var(--err-bg); color: var(--err); }

/* ---------- Pages d'authentification */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: linear-gradient(160deg, var(--brand) 0%, var(--brand-2) 100%); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side h1 { font-size: 2rem; margin-top: 48px; }
.auth-side ul { padding-left: 1.1em; opacity: .92; }
.auth-side li { margin-bottom: 6px; }
.auth-main { display: grid; place-items: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 400px; }
@media (max-width: 820px) {
  .auth { grid-template-columns: 1fr; }
  .auth-side { padding: 24px 16px; }
  .auth-side h1 { font-size: 1.4rem; margin-top: 16px; }
  .auth-side .hide-m { display: none; }
}

/* ---------- Espace candidat */
.status { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; margin-bottom: 20px; }
.progress { height: 8px; background: #e3e8ef; border-radius: 99px; overflow: hidden; margin: 12px 0 0; }
.progress > span { display: block; height: 100%; background: var(--ok); transition: width .3s; }

.layout { display: grid; grid-template-columns: 260px 1fr; gap: 20px; align-items: start; }
.steps { list-style: none; margin: 0; padding: 8px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); position: sticky; top: 16px; }
.steps button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px; border: 0; background: none; border-radius: 8px; font: inherit; text-align: left; cursor: pointer; color: var(--text); }
.steps button:hover { background: var(--bg); }
.steps button[aria-current="step"] { background: var(--info-bg); font-weight: 600; }
.step-num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; background: #e3e8ef; color: var(--muted); font-size: .85rem; font-weight: 700; }
.done .step-num { background: var(--ok); color: #fff; }
@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  .steps { display: grid; grid-template-columns: repeat(4, 1fr); position: static; padding: 6px; }
  .steps button { flex-direction: column; gap: 4px; padding: 8px 4px; font-size: .72rem; text-align: center; }
}

.timeline { list-style: none; padding: 0; margin: 0 0 20px; counter-reset: t; }
.timeline li { position: relative; padding: 0 0 18px 44px; counter-increment: t; }
.timeline li::before { content: counter(t); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--brand-2); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 14px; top: 32px; bottom: 2px; width: 2px; background: var(--line); }
.timeline strong { display: block; }

.docs { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.doc { border: 2px dashed #c9d3df; border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: #fbfcfd; }
.doc.has { border-style: solid; border-color: var(--line); background: #fff; }
.doc.refuse { border-color: #efc2be; background: var(--err-bg); }
.doc-head { display: flex; justify-content: space-between; gap: 8px; align-items: start; }
.doc-title { font-weight: 600; }
.doc-thumb { height: 120px; border-radius: 6px; background: #eef1f5 center/contain no-repeat; display: grid; place-items: center; color: var(--muted); font-size: .85rem; overflow: hidden; }
.doc-thumb img { max-width: 100%; max-height: 100%; }
.doc input[type=file] { display: none; }
.doc .pick { cursor: pointer; }

.cgu-box { max-height: 360px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; background: #fbfcfd; }
.cgu-box h3 { margin-top: 1em; }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; margin-top: 16px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.check.disabled { opacity: .5; cursor: not-allowed; }

.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 16px; }
.day { flex: none; min-width: 84px; padding: 10px 8px; border: 1px solid var(--line); background: #fff; border-radius: 10px; text-align: center; cursor: pointer; font: inherit; }
.day b { display: block; font-size: 1.2rem; }
.day small { color: var(--muted); display: block; text-transform: capitalize; }
.day[aria-pressed="true"] { border-color: var(--brand-2); background: var(--info-bg); }
.hours { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; }
.hour { padding: 10px; border: 1px solid #c5d2e2; border-radius: 8px; background: #fff; font: inherit; font-weight: 600; cursor: pointer; color: var(--brand-2); }
.hour:hover { background: var(--info-bg); }
.rdv-ok { display: flex; gap: 16px; align-items: center; padding: 16px; border-radius: 10px; background: var(--ok-bg); margin-bottom: 16px; }
.rdv-ok .cal { width: 64px; flex: none; text-align: center; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); }
.rdv-ok .cal span { display: block; background: var(--ok); color: #fff; font-size: .75rem; padding: 2px; text-transform: uppercase; }
.rdv-ok .cal b { display: block; font-size: 1.5rem; padding: 4px 0; }

/* ---------- Administration */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs button { padding: 12px 16px; border: 0; background: none; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--brand-2); border-bottom-color: var(--brand-2); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.kpi b { display: block; font-size: 1.7rem; font-variant-numeric: tabular-nums; }
.kpi span { color: var(--muted); font-size: .85rem; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar input, .toolbar select { width: auto; flex: 1 1 180px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: #f8fafc; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: #d6dde6; display: inline-block; }
.dots i.on { background: var(--ok); }
.empty { text-align: center; padding: 32px; color: var(--muted); }

.slot-day { margin-bottom: 18px; }
.slot-day h3 { font-size: .95rem; color: var(--muted); }
.slot-day h3::first-letter { text-transform: uppercase; }
.slot-list { display: flex; flex-wrap: wrap; gap: 8px; }
.slot { display: inline-flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-size: .9rem; }
.slot.booked { background: var(--info-bg); border-color: #c5d2e2; }
.slot button { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 1rem; padding: 2px 6px; border-radius: 4px; }
.slot button:hover { background: var(--err-bg); color: var(--err); }

/* Panneau latéral (fiche candidat) */
.drawer-bg { position: fixed; inset: 0; background: rgba(15, 25, 40, .45); z-index: 50; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 100%); background: var(--bg); z-index: 51; overflow-y: auto; box-shadow: -8px 0 24px rgba(0,0,0,.15); }
.drawer-head { position: sticky; top: 0; background: var(--surface); padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; z-index: 1; }
.drawer-body { padding: 20px; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: .92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.adm-doc { display: grid; grid-template-columns: 110px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.adm-doc .doc-thumb { height: 80px; }
.link-box { display: flex; gap: 8px; }
.link-box input { font-size: .85rem; }
.journal { font-size: .85rem; color: var(--muted); list-style: none; padding: 0; margin: 0; }
.journal li { padding: 4px 0; border-bottom: 1px dashed var(--line); }

/* Fenêtre modale & notifications */
dialog { border: 0; border-radius: var(--radius); padding: 0; width: min(520px, calc(100% - 32px)); box-shadow: 0 20px 50px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(15, 25, 40, .45); }
dialog form, dialog .dlg { padding: 24px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: #fff; padding: 12px 18px; border-radius: 8px; z-index: 100; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
.toast.err { background: var(--err); }
.footer { text-align: center; font-size: .8rem; color: var(--muted); padding: 24px 16px; }

@media (max-width: 600px) { .topbar .who, .brand-sub { display: none; } .brand-name { font-size: .95rem; } }

/* ---------- Agenda (vue jour) */
.ag-bar { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.ag-nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ag-nav input { width: auto; padding: 6px 10px; }
.ag-title { text-align: right; }
.ag-title h2 { margin: 0; }
.ag-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 14px; }
.ag-day { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 4px; font: inherit; cursor: pointer; text-align: center; }
.ag-day small { display: block; color: var(--muted); text-transform: capitalize; font-size: .75rem; }
.ag-day b { display: block; font-size: 1.15rem; }
.ag-day.today b { color: var(--brand-2); }
.ag-day.on { border-color: var(--brand-2); background: var(--info-bg); }
.ag-count { display: inline-block; font-size: .72rem; color: var(--muted); }
.ag-count.has { color: #fff; background: var(--brand-2); border-radius: 99px; padding: 0 7px; font-weight: 600; }
.ag-legend { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.ag-legend .lg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 4px; }
.lg-rdv { background: var(--brand-2); }
.lg-libre { border: 1px dashed #9fb2c8; background: #f6f8fb; }
.ag-toggle { display: inline-flex; gap: 6px; align-items: center; font-weight: 400; margin: 0 0 0 auto; cursor: pointer; }
.ag-grid { display: grid; grid-template-columns: 56px 1fr; border-top: 1px solid var(--line); }
.ag-hours .ag-hour { position: relative; }
.ag-hours .ag-hour span { position: absolute; top: -9px; right: 8px; font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; background: var(--surface); }
.ag-hours .ag-hour:first-child span { top: 2px; }
.ag-col { position: relative; border-left: 1px solid var(--line); }
.ag-col .ag-hour { border-bottom: 1px solid var(--line); background-image: linear-gradient(to bottom, transparent calc(50% - 1px), #f0f2f5 calc(50% - 1px), #f0f2f5 50%, transparent 50%); }
.ag-layer { position: absolute; inset: 0; }
.ag-evt { position: absolute; border-radius: 6px; padding: 3px 8px; font: inherit; font-size: .82rem; text-align: left; overflow: hidden; line-height: 1.3; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 0 8px; }
.ag-evt.rdv { background: var(--brand-2); color: #fff; border: 0; border-left: 4px solid var(--accent); cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.ag-evt.rdv:hover { background: var(--brand); }
.ag-evt.libre { background: #f6f8fb; border: 1px dashed #9fb2c8; color: var(--muted); }
.ag-time { font-variant-numeric: tabular-nums; opacity: .85; }
.ag-meta { width: 100%; font-size: .78rem; opacity: .95; }
.ag-meta .badge { font-size: .68rem; padding: 1px 7px; }
.ag-now { position: absolute; left: -6px; right: 0; height: 2px; background: var(--err); z-index: 2; }
.ag-now::before { content: ""; position: absolute; left: 0; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--err); }
.ag-empty { position: absolute; top: 40px; left: 0; right: 0; text-align: center; color: var(--muted); pointer-events: none; }
@media (max-width: 600px) {
  .ag-title { text-align: left; }
  .ag-week { gap: 3px; }
  .ag-day { padding: 6px 2px; }
  .ag-count.has { padding: 0 4px; font-size: .65rem; white-space: nowrap; }
  .ag-grid { grid-template-columns: 44px 1fr; }
}

/* ---------- E-mails & SMS */
.subtabs { display: inline-flex; gap: 4px; background: #e6ebf1; padding: 4px; border-radius: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.subtabs button { border: 0; background: none; padding: 8px 14px; border-radius: 7px; font: inherit; font-weight: 600; font-size: .9rem; color: var(--muted); cursor: pointer; }
.subtabs button[aria-selected="true"] { background: #fff; color: var(--brand-2); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.tpl-layout { display: grid; grid-template-columns: 250px 1fr; gap: 16px; align-items: start; }
.tpl-list { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 16px; }
.tpl-list button { text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.tpl-list button[aria-current="true"] { border-color: var(--brand-2); background: var(--info-bg); }
.tpl-chips { display: flex; gap: 4px; }
.chip { font-size: .7rem; padding: 1px 8px; border-radius: 99px; background: #e9edf2; color: #8994a3; text-decoration: line-through; }
.chip.on { background: var(--ok-bg); color: var(--ok); text-decoration: none; font-weight: 600; }
.tpl-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 14px; }
.vars { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px 12px; background: #f6f8fb; border-radius: 8px; margin-bottom: 16px; }
.var { border: 1px dashed #9fb2c8; background: #fff; color: var(--brand-2); border-radius: 6px; padding: 3px 9px; font: inherit; font-size: .8rem; cursor: pointer; }
.var:hover { background: var(--info-bg); border-style: solid; }
.tpl-cols { display: grid; grid-template-columns: 3fr 2fr; gap: 20px; }
.tpl-canal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.tpl-canal-head h3 { margin: 0; }
.tpl-canal textarea { font-family: inherit; line-height: 1.45; resize: vertical; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .85rem; margin: 0; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch span { width: 38px; height: 22px; background: #cdd5df; border-radius: 99px; position: relative; transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { left: 19px; }
.switch input:focus-visible + span { outline: 3px solid rgba(29, 79, 134, .25); }
.compteur { font-size: .82rem; padding: 8px 10px; border-radius: 8px; background: #f1f4f8; }
.compteur.ok { background: var(--ok-bg); color: var(--ok); }
.compteur.warn { background: var(--warn-bg); color: var(--warn); }
.compteur.ko { background: var(--err-bg); color: var(--err); }
.compteur div { margin-top: 4px; }
.phone { background: #eef1f5; border-radius: 16px; padding: 12px; max-width: 320px; }
.phone-top { text-align: center; font-size: .75rem; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.bulle { background: #fff; border-radius: 14px 14px 14px 4px; padding: 10px 12px; font-size: .88rem; white-space: pre-wrap; word-break: break-word; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.mail-apercu { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; max-height: 520px; overflow-y: auto; }
.mail-sujet { padding: 10px 14px; background: #f6f8fb; border-bottom: 1px solid var(--line); font-weight: 600; font-size: .92rem; }
.tpl-actions { position: sticky; bottom: 0; background: var(--surface); padding: 12px 0 0; align-items: center; }
.cfg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-bottom: 16px; }
.cfg-grid .card + .card { margin-top: 0; }
.cfg-grid td { padding: 6px 8px; }
code { background: #eef1f5; padding: 1px 5px; border-radius: 4px; font-size: .85em; }
.b-msg-envoye { background: var(--ok-bg); color: var(--ok); }
.b-msg-simule { background: var(--warn-bg); color: var(--warn); }
.b-msg-echec { background: var(--err-bg); color: var(--err); }
#dlg-msg { width: min(640px, calc(100% - 32px)); }
.msg-contenu { margin-top: 14px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.msg-contenu pre { margin: 0; padding: 14px; white-space: pre-wrap; font-family: inherit; font-size: .9rem; max-height: 360px; overflow: auto; }
@media (max-width: 900px) {
  .tpl-layout, .tpl-cols { grid-template-columns: 1fr; }
  .tpl-list { position: static; flex-direction: row; overflow-x: auto; }
  .tpl-list button { min-width: 180px; }
}

/* ---------- Page « smartphone uniquement » */
.mobile-only { text-align: center; }
.qr-box { display: inline-block; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); margin: 8px 0 16px; }
.qr-box img { display: block; width: 220px; height: 220px; }
.phone-ico { width: 44px; height: 72px; border: 3px solid var(--brand-2); border-radius: 10px; margin: 0 auto 16px; position: relative; }
.phone-ico span { position: absolute; bottom: 5px; left: 50%; width: 10px; height: 3px; border-radius: 2px; background: var(--brand-2); transform: translateX(-50%); }

/* ---------- Rôles */
.slot-rec { font-size: .75rem; background: #eef1f5; color: var(--muted); border-radius: 4px; padding: 1px 6px; }
.ag-rec-nom { font-size: .72rem; background: rgba(255,255,255,.2); border-radius: 4px; padding: 0 6px; }
.ag-evt.libre .ag-rec-nom { background: #e6ebf1; }
.ag-rec { width: auto; min-width: 200px; padding: 6px 10px; }
.reaffect { display: flex; gap: 6px; }
.reaffect select { padding: 5px 8px; font-size: .9rem; }
.role-sel { width: auto; padding: 5px 8px; font-size: .88rem; }

/* ---------- Pages de connexion sur smartphone : apparence application */
@media (max-width: 820px) {
  .auth { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }
  .auth-side { border-radius: 0 0 28px 28px; padding: calc(20px + env(safe-area-inset-top, 0px)) 20px 28px; gap: 8px; }
  .auth-side h1 { font-size: 1.45rem; margin-top: 18px; }
  .auth-main { flex: 1; align-items: start; padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px)); }
  .auth-card h2 { font-size: 1.35rem; }
  .auth-card input[type=email], .auth-card input[type=password], .auth-card input[type=text] { min-height: 52px; border-radius: 14px; font-size: 16px; background: #fff; }
  .auth-card .btn { min-height: 52px; border-radius: 16px; font-size: 1.02rem; }
  .auth-card label { font-size: .88rem; }
}

/* ---------- Vérification des documents (équipe) */
.vdocs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.vdoc { border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 6px; background: #fff; }
.vdoc.st-valide { border-color: #bfe3cf; background: #f7fcf9; }
.vdoc.st-refuse { border-color: #f0c4bf; background: #fffafa; }
.vdoc.choix-valide { border-color: var(--ok); box-shadow: 0 0 0 2px rgba(31,138,82,.15); }
.vdoc.choix-refuse { border-color: var(--err); box-shadow: 0 0 0 2px rgba(192,54,44,.12); }
.vdoc-thumb { aspect-ratio: 1.58; border: 0; padding: 0; border-radius: 8px; background: #eef1f5; overflow: hidden; display: grid; place-items: center; cursor: zoom-in; color: var(--muted); font-size: .85rem; }
.vdoc-thumb.vide { cursor: default; border: 2px dashed #d3dae3; }
.vdoc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.vdoc-thumb .pdf { font-weight: 800; color: var(--brand-2); }
.vdoc-head { display: flex; justify-content: space-between; gap: 6px; align-items: center; font-size: .9rem; }
.vdoc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.vdoc-lock { font-size: .8rem; color: var(--ok); line-height: 1.4; }
.vdoc-rej { font-size: .82rem; color: var(--err); line-height: 1.4; }
.btn-rej-on { background: var(--err); color: #fff; }
.lien { border: 0; background: none; color: var(--brand-2); text-decoration: underline; cursor: pointer; font: inherit; padding: 0; margin-left: 4px; }
.motifs { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.motif { border: 1px solid #efc2be; background: #fff; color: var(--err); border-radius: 999px; padding: 4px 10px; font: inherit; font-size: .78rem; cursor: pointer; }
.motif.on { background: var(--err); color: #fff; border-color: var(--err); }
.motif-prec { font-size: .82rem !important; padding: 7px 9px !important; margin-top: 2px; }
.verif-bar { position: sticky; bottom: 0; margin: 14px -24px -24px; padding: 14px 24px; background: var(--info-bg); border-top: 1px solid #c5d2e2; border-radius: 0 0 var(--radius) var(--radius);
  display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.check-inline { display: inline-flex; gap: 4px; align-items: center; font-weight: 400; margin: 0 0 0 8px; font-size: .85rem; }
.dlg-doc { width: min(1000px, calc(100% - 24px)); max-height: calc(100vh - 24px); padding: 0; display: none; flex-direction: column; }
.dlg-doc[open] { display: flex; }
.vz-head, .vz-foot { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.vz-foot { border-bottom: 0; border-top: 1px solid var(--line); }
.vz-corps { flex: 1; min-height: 0; background: #1d2430; display: grid; place-items: center; overflow: auto; height: 70vh; }
.vz-corps img { max-width: 100%; max-height: 70vh; transition: transform .2s; cursor: zoom-in; }
.vz-corps.zoom { place-items: start; }
.vz-corps.zoom img { max-width: none; max-height: none; cursor: zoom-out; }
.vz-corps iframe { width: 100%; height: 100%; border: 0; background: #fff; }
@media (max-width: 700px) { .vdocs { grid-template-columns: 1fr; } }

/* ---------- Identité ETMC */
.brand-logo { height: 46px; width: auto; display: block; }
.brand-sep { width: 1px; height: 32px; background: var(--line); }
.topbar .brand-name { color: var(--brand); }
.topbar .brand-sub { color: var(--muted); opacity: 1; }
.topbar .who { color: var(--text); }
.auth-logo img { width: 200px; height: auto; display: block; }
@media (max-width: 820px) { .auth-logo img { width: 150px; } }
@media (max-width: 600px) { .brand-logo { height: 36px; } .brand-sep { display: none; } .topbar .brand-name { display: none; } }
