/* Interface de recrutement — V1
   Les couleurs de la marque se changent ici (variables ci-dessous). */
:root {
  --brand: #124c7c;       /* bleu foncé BLFR (provisoire : à caler sur blfr-tech.com) */
  --brand-2: #0e75c2;     /* bleu vif BLFR (provisoire) */
  --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=datetime-local], 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); }
.b-refus_cgu { background: #3b1d1a; color: #fff; }

/* ---------- 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; }
/* Barre d'onglets + menu « Réglages » (engrenage) : le menu est hors de la zone défilante pour ne pas être coupé */
.barre-onglets { display: flex; align-items: stretch; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.barre-onglets .tabs { border-bottom: 0; margin-bottom: 0; min-width: 0; }
.menu-reglages { position: relative; flex: none; display: flex; }
.menu-reglages.hidden { display: none; }
.btn-engrenage { display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px; border: 0; background: none; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; border-radius: 8px 8px 0 0; }
.btn-engrenage:hover, .btn-engrenage[aria-expanded="true"] { color: var(--brand-2); background: var(--info-bg); }
.btn-engrenage.actif { color: var(--brand-2); border-bottom-color: var(--brand-2); }
.btn-engrenage svg:first-child { transition: transform .3s; }
.btn-engrenage[aria-expanded="true"] svg:first-child { transform: rotate(60deg); }
.engrenage-lib:empty { display: none; }
.menu-deroulant { position: absolute; top: calc(100% + 4px); left: 0; z-index: 60; min-width: 270px; background: var(--surface); border-radius: 12px; box-shadow: 0 12px 32px rgba(15,25,40,.18); border: 1px solid var(--line); padding: 6px; }
.menu-deroulant.hidden { display: none; }
.menu-deroulant [role=menuitem] { display: flex; align-items: center; width: 100%; text-align: left; padding: 10px 12px; border: 0; background: none; font: inherit; font-weight: 600; color: var(--text, #1f2430); border-radius: 8px; cursor: pointer; }
.menu-deroulant [role=menuitem]:hover, .menu-deroulant [role=menuitem]:focus-visible { background: var(--info-bg); outline: none; }
.menu-deroulant [role=menuitem][aria-current="page"] { color: var(--brand-2); background: var(--info-bg); }
.menu-deroulant [role=menuitem][aria-current="page"]::after { content: "✓"; margin-left: auto; padding-left: 12px; }
@media (max-width: 760px) { .menu-deroulant { left: auto; right: 0; } .engrenage-lib { display: none; } }
.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(5, 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é BLFR */
.brand-logo { height: 40px; 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: 220px; height: auto; display: block; }
@media (max-width: 820px) { .auth-logo img { width: 170px; } }
@media (max-width: 600px) { .brand-logo { height: 32px; } .brand-sep { display: none; } .topbar .brand-name { display: none; } }

/* ---------- Mots de passe et suppression de comptes */
.mdp-box { display: flex; gap: 6px; align-items: stretch; }
.mdp-box input { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.btn-icone { background: none; border: 1px solid transparent; border-radius: 8px; padding: 6px; color: var(--muted); cursor: pointer; line-height: 0; }
.btn-icone:hover, .btn-icone:focus-visible { color: #b42318; border-color: #f3c7c3; background: #fef3f2; }
.team-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
#dlg-suppr ul { margin: 8px 0 0; padding-left: 18px; }
#dlg-suppr p { margin: 8px 0 0; }

/* ---------- Œil des champs mot de passe */
.champ-oeil { position: relative; }
.champ-oeil input { padding-right: 46px; }
.btn-oeil { position: absolute; top: 0; right: 0; height: 100%; width: 44px; display: grid; place-items: center;
  background: none; border: 0; border-radius: 0 8px 8px 0; color: var(--muted); cursor: pointer; }
.btn-oeil:hover { color: var(--brand); }
.btn-oeil:focus-visible { outline: 3px solid rgba(29, 79, 134, .25); outline-offset: -3px; color: var(--brand); }
input::-ms-reveal, input::-ms-clear { display: none; }   /* Edge : évite un deuxième œil */

/* ---------- Onglet « Pages candidat » */
.ptabs { display: inline-flex; gap: 4px; background: #e6ebf1; padding: 4px; border-radius: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.ptabs button { border: 0; background: none; padding: 8px 14px; border-radius: 7px; font: inherit; font-weight: 600; font-size: .9rem; color: var(--muted); cursor: pointer; }
.ptabs button[aria-selected="true"] { background: #fff; color: var(--brand-2); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.pages-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.pages-layout.sans-apercu { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 1000px) { .pages-layout { grid-template-columns: minmax(0, 1fr); } .pages-apercu { order: -1; } }
.pg-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.pg-liste { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pg-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #fafbfd; }
.pg-item-tete { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.pg-item-tete input { flex: 1; min-width: 0; font-weight: 600; }
.pg-num { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-2); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.pg-item-actions { display: flex; gap: 4px; flex: none; }
.btn-icone-n { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; font: inherit; font-weight: 700; color: var(--muted); }
.btn-icone-n:hover:not(:disabled) { color: var(--brand-2); border-color: var(--brand-2); }
.btn-icone-n.danger:hover:not(:disabled) { color: #b42318; border-color: #f3c7c3; background: #fef3f2; }
.btn-icone-n:disabled { opacity: .35; cursor: default; }
.pg-actions { position: sticky; bottom: 0; z-index: 2; background: var(--surface); padding: 12px 0; margin: 16px 0 -12px; border-top: 1px solid var(--line); box-shadow: 0 -8px 16px -12px rgba(15,25,40,.25); }
.pages-apercu { position: sticky; top: 16px; }
.tel-apercu { border: 10px solid #1d2633; border-radius: 34px; background: #1d2633; box-shadow: var(--shadow); }
.tel-ecran { background: #f2f4f8; border-radius: 24px; height: 600px; overflow-y: auto; padding: 18px 16px; font-size: .86rem; line-height: 1.45; color: #16202e; }
.ap-titre { font-size: 1.25rem; font-weight: 800; margin-bottom: 6px; line-height: 1.2; }
.ap-lead { color: #667085; margin: 0 0 14px; }
.ap-timeline { list-style: none; counter-reset: e; margin: 0; padding: 0; }
.ap-timeline li { counter-increment: e; position: relative; padding: 0 0 14px 38px; }
.ap-timeline li::before { content: counter(e); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--brand-2); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .8rem; }
.ap-timeline li strong { display: block; }
.ap-timeline li span { color: #667085; }
.ap-encadre { background: #fff; border-radius: 14px; padding: 12px 14px; margin-top: 8px; }
.ap-encadre ul { margin: 6px 0 0; padding-left: 18px; }
.ap-cgu { background: #fff; border-radius: 14px; padding: 12px 14px; }
.ap-cgu h4 { margin: 10px 0 4px; font-size: .9rem; }
.ap-cgu h4:first-child { margin-top: 0; }
.ap-cgu p { margin: 0; color: #344054; }
.ap-case { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; font-size: .82rem; }
.ap-box { flex: none; width: 20px; height: 20px; border: 2px solid #c3cad5; border-radius: 6px; background: #fff; }
dialog.dlg-large { width: min(760px, calc(100% - 32px)); }
.version-texte { max-height: 60vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; font-size: .92rem; line-height: 1.5; }
.version-texte h4 { margin: 12px 0 4px; }
.version-texte p { margin: 0 0 6px; }
.kv-large { grid-template-columns: minmax(160px, 45%) 1fr; }

/* ---------- Pages candidat : parcours, questionnaires, textes */
.pg-item.inactif { opacity: .6; background: #f1f3f6; }
.pg-item.inactif .pg-num { background: #98a2b3; }
.pg-item-pied { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-top: 8px; }
.pg-item-pied select { width: auto; padding: 6px 10px; font-size: .88rem; }
.switch-mini { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; font-weight: 600; cursor: pointer; }
.switch-mini input { width: 18px; height: 18px; accent-color: var(--brand-2); }
.pg-item-pied .btn { margin-left: auto; }
.pg-ajouts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pg-options { margin-top: 10px; padding-left: 8px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.pg-option { display: flex; gap: 8px; align-items: center; width: 100%; }
.pg-option input { flex: 1; min-width: 0; padding: 8px 10px; }
.pg-rond { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid #c3cad5; background: #fff; display: inline-block; }
.ap-section { font-size: .7rem; font-weight: 700; letter-spacing: .06em; color: #667085; margin: 14px 0 8px; }
.ap-carte { display: flex; gap: 10px; align-items: center; background: #fff; border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; opacity: .7; }
.ap-carte.courante { opacity: 1; outline: 2px solid var(--brand-2); }
.ap-carte strong { display: block; }
.ap-carte span { color: #667085; font-size: .8rem; }
.ap-num { flex: none; width: 32px; height: 32px; border-radius: 10px; background: #eef1f5; color: #667085 !important; display: grid; place-items: center; font-weight: 700; }
.ap-carte.courante .ap-num { background: var(--brand-2); color: #fff !important; }
.ap-question { margin-bottom: 14px; }
.ap-aide { color: #667085; font-size: .78rem; margin: 2px 0 6px; }
.ap-choix { display: flex; gap: 8px; align-items: center; background: #fff; border: 1px solid #e4e8ee; border-radius: 12px; padding: 9px 10px; margin-top: 6px; }
.ap-champ { height: 38px; background: #fff; border: 1px solid #e4e8ee; border-radius: 12px; margin-top: 6px; }
.ap-bouton { margin-top: 14px; background: var(--brand-2); color: #fff; font-weight: 700; text-align: center; border-radius: 14px; padding: 11px; }

/* ---------- Crédits SMS restants */
.solde-sms { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; margin-bottom: 14px; border: 1px solid transparent; line-height: 1.4; }
.solde-sms > div { flex: 1; min-width: 0; }
.solde-point { flex: none; width: 12px; height: 12px; border-radius: 50%; }
.solde-date { opacity: .75; font-size: .85rem; white-space: nowrap; }
.solde-ok { background: #e7f6ee; border-color: #b6e2c8; color: #116b43; }
.solde-ok .solde-point { background: #1f9d63; }
.solde-bas { background: #fff3db; border-color: #f5cf85; color: #8a4b00; }
.solde-bas .solde-point { background: #f08c00; box-shadow: 0 0 0 4px rgba(240,140,0,.2); }
.solde-vide { background: #fdecea; border-color: #f3b4ae; color: #a1261d; }
.solde-vide .solde-point { background: #d92d20; box-shadow: 0 0 0 4px rgba(217,45,32,.2); }
.solde-inconnu { background: #eef1f5; border-color: #dfe4ea; color: var(--muted); }
.solde-inconnu .solde-point { background: #98a2b3; }
.pastille-onglet { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-left: 6px; vertical-align: middle; }
.pastille-onglet.bas { background: #f08c00; }
.pastille-onglet.vide { background: #d92d20; }

/* ---------- Liens de vérification (fiche candidat) et modèles ajoutés */
.lv-canaux { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.lv-canaux .btn { margin-left: auto; }
.lv-table td { vertical-align: top; }
.lv-url { word-break: break-all; }
.lv-table code { font-size: .82rem; word-break: break-all; }
.lien-bouton { background: none; border: 0; padding: 2px 0; font: inherit; font-size: .82rem; font-weight: 600; color: var(--brand-2); cursor: pointer; text-decoration: underline; }
.tpl-colonne { position: sticky; top: 16px; }
.tpl-colonne .tpl-list { position: static; }
.tpl-list .chip { font-size: .68rem; vertical-align: middle; }
.lv-table th, .lv-table td { padding-left: 8px; padding-right: 8px; }
.lv-ligne { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; margin-bottom: 6px; }
.lv-lib { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); min-width: 52px; }
.lv-table .badge { white-space: nowrap; }
.reaffect input { flex: 1; min-width: 0; padding: 5px 8px; font-size: .9rem; }
.reaffect.hidden { display: none; }
#team td:nth-child(3) { white-space: nowrap; }

/* ------------------------------------------------ Suivi : statut manuel, rappels, rendez-vous fixé par l'équipe */
.b-suivi { background: #ece8fb; color: #4b3aa8; }
.rappels { margin-bottom: 16px; padding: 16px 20px; border-left: 4px solid #f08c00; }
.rappels-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.rappels-tete h2 { margin: 0; font-size: 1.05rem; }
.rappels-liste { list-style: none; margin: 10px 0 0; padding: 0; }
.rappels-liste li { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--line); }
.rap-quand { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 52px; }
.rap-nom { font-size: .95rem; }
.rap-note { flex: 1; min-width: 120px; color: var(--muted); }
.sv-ligne { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; }
.sv-ligne input { flex: 1; min-width: 0; }
.sv-nb { min-width: 84px; text-align: right; }
.r-sous { margin: 8px 0 0 32px; }
.r-sous.hidden { display: none; }
#dlg-manuel textarea { width: 100%; resize: vertical; }

/* ------------------------------------------------ Speech / Trame de discussion */
.tr-barre { display: grid; grid-template-columns: minmax(180px, 280px) minmax(180px, 260px) 1fr; gap: 12px 16px; align-items: end; margin-bottom: 16px; }
.tr-barre .field { margin: 0; }
.tr-barre-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.tr-desc { grid-column: 1 / -1; margin: 0; }
.tr-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; align-items: start; }
.tr-layout .card + .card { margin-top: 0; }
.tr-phases { padding: 10px; position: sticky; top: 12px; display: flex; flex-direction: column; gap: 2px; }
.tr-phases button { display: flex; gap: 10px; align-items: center; text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 8px; font: inherit; font-size: .92rem; color: var(--text); cursor: pointer; }
.tr-phases button:hover { background: var(--info-bg); }
.tr-phases button.on { background: var(--brand-2); color: #fff; font-weight: 600; }
.tr-phases button.fait { color: var(--muted); }
.tr-num { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 700; background: #e6ebf1; color: var(--muted); }
.tr-phases button.on .tr-num { background: #fff; color: var(--brand-2); }
.tr-phases button.fait .tr-num { background: var(--ok-bg); color: var(--ok); }
.tr-phase-tete h2 { margin: 2px 0 16px; }
.tr-bloc { border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; }
.tr-bloc p { margin: 0 0 8px; }
.tr-bloc p:last-child { margin-bottom: 0; }
.tr-etq { display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.tr-dire { background: var(--info-bg); border-left: 4px solid var(--brand-2); }
.tr-dire p { font-size: 1.12rem; line-height: 1.55; }
.tr-dire .tr-etq { color: var(--brand-2); }
.tr-consigne { background: var(--warn-bg); border-left: 4px solid #e0a400; color: #5c4300; font-size: .92rem; }
.tr-consigne .tr-etq { color: var(--warn); }
.tr-objection { background: #f6f3fd; border-left: 4px solid #7a63d6; }
.tr-objection .tr-etq { color: #4b3aa8; }
.tr-objection p.tr-question { font-weight: 600; font-style: italic; margin-bottom: 12px; }
.tr-page { border: 1px solid var(--line); background: #fff; }
.tr-page .tr-etq { color: var(--muted); }
.tr-page > .tr-dire { border-radius: 10px; padding: 14px 16px; margin-bottom: 14px; }
.tr-page > .tr-dire .tr-etq { color: var(--brand-2); }
.tr-page h3 { margin: 4px 0 8px; }
.tr-page h4 { margin: 14px 0 6px; }
.tr-etapes { margin: 8px 0; padding-left: 1.4em; }
.tr-etapes li { margin-bottom: 8px; }
.tr-etapes li span { display: block; color: var(--muted); font-size: .92rem; }
.tr-liste { margin: 6px 0; padding-left: 1.3em; }
.tr-article { border-top: 1px solid var(--line); padding: 8px 0; }
.tr-article summary { cursor: pointer; font-weight: 600; }
.tr-article p { margin: 8px 0 0; }
.tr-guidage { background: #eef8f1; border-left: 4px solid var(--ok); }
.tr-guidage .tr-etq { color: var(--ok); }
.tr-guidage > p { font-size: 1.05rem; line-height: 1.5; }
.tr-vue { margin-top: 8px; font-size: .9rem; }
.tr-vue summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.tr-vue-corps { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-top: 8px; }
.tr-creer { border: 2px dashed #c5d2e2; text-align: center; }
.tr-creer p { margin-bottom: 12px; }
.tr-var { background: #fff3bf; border-radius: 4px; padding: 0 5px; font-style: italic; color: #6b5200; }
.tr-nav { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
/* Modification d'une trame (administrateur) */
.tr-eb { border: 1px solid var(--line); border-left: 4px solid #c5d2e2; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; background: #fff; }
.tr-eb.actif { border-color: var(--brand-2); box-shadow: 0 0 0 2px rgba(14, 117, 194, .15); }
.tr-eb-titre { background: #f1f5fa; border-left-color: var(--brand); margin-top: 22px; }
.tr-eb-dire { border-left-color: var(--brand-2); }
.tr-eb-consigne { border-left-color: #e0a400; }
.tr-eb-objection { border-left-color: #7a63d6; }
.tr-eb-guidage { border-left-color: var(--ok); }
.tr-eb-tete { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.tr-eb-outils { margin-left: auto; display: flex; gap: 4px; }
.tr-eb [data-champ] { width: 100%; margin-bottom: 8px; }
.tr-eb [data-champ]:last-child { margin-bottom: 0; }
.tr-eb textarea { resize: vertical; }
.tr-ajout { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); margin: 16px -24px -24px; padding: 12px 24px 16px; border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 -6px 12px -8px rgba(16, 30, 54, .18); }
.tr-ajout-types { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
@media (max-width: 900px) {
  .tr-layout { grid-template-columns: 1fr; }
  .tr-phases { position: static; flex-direction: row; overflow-x: auto; }
  .tr-phases button { white-space: nowrap; }
  .tr-barre { grid-template-columns: 1fr; }
  .tr-barre-actions { justify-content: flex-start; }
}
#r-date-wrap { grid-template-columns: 1.3fr 1fr .9fr; }
#t-candidats .toolbar input, #t-candidats .toolbar select { flex-basis: 140px; min-width: 0; }

/* ------------------------------------------------ Horloge du serveur (en-tête de l'espace équipe) */
.horloge { display: grid; grid-template-columns: auto; justify-items: end; line-height: 1.2; padding: 4px 12px; border-radius: 8px; border: 1px solid transparent; cursor: help; }
.horloge.hidden { display: none; }
.horloge-heure { font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--brand); }
.horloge-date { font-size: .74rem; color: var(--muted); white-space: nowrap; }
.horloge-local { font-size: .74rem; font-weight: 600; color: var(--warn); white-space: nowrap; }
.horloge-local:empty { display: none; }
.horloge.decale { background: var(--warn-bg); border-color: #f0d28a; }
@media (max-width: 760px) { .horloge-date { display: none; } }

/* ------------------------------------------------ Fenêtre « Statuts » : intitulés des statuts de base */
.sb-titre { margin: 18px 0 4px; font-size: 1rem; }
.sb-table { width: 100%; table-layout: fixed; }
.sb-table td { vertical-align: middle; padding: 6px 8px 6px 0; }
.sb-table th:first-child, .sb-table td:first-child { width: 24%; }
.sb-table input { width: 100%; padding: 8px 10px; }
#dlg-suivis { max-height: calc(100vh - 32px); overflow-y: auto; }
.reaffect input[type=email] { min-width: 0; }

/* ------------------------------------------------ Couleurs des statuts (fenêtre « Statuts ») */
.couleur-choix { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.couleur-choix input[type=color], .sb-table .couleur-choix input[type=color], .sv-ligne .couleur-choix input[type=color] { flex: none; width: 36px; height: 30px; padding: 2px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; }
.couleur-apercu { width: 120px; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.sb-table .sb-col-couleur { width: 230px; }
dialog#dlg-suivis.dlg-large { width: min(1000px, calc(100% - 32px)); max-width: none; }
@media (max-width: 760px) { .couleur-apercu { display: none; } .sb-table .sb-col-couleur { width: 92px; } }

/* ------------------------------------------------ Aperçu « Rendez-vous confirmé » (Pages candidat) */
.ap-ticket { background: #fff; border-radius: 16px; overflow: hidden; }
.ap-ticket-top { background: linear-gradient(145deg, #1f8a52 0%, #1fa36e 100%); color: #fff; text-align: center; padding: 16px 12px 14px; }
.ap-ticket-top strong { display: block; font-size: 1.1rem; }
.ap-ticket-top span { display: block; opacity: .85; font-size: .82rem; margin-top: 2px; }
.ap-check { display: inline-grid !important; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.2); font-weight: 800; margin: 0 auto 6px; opacity: 1 !important; }
.ap-ticket-ligne { padding: 8px 12px; border-top: 1px solid #eef1f5; font-size: .82rem; }
.ap-ticket-ligne b { display: block; font-size: .7rem; color: #667085; text-transform: uppercase; letter-spacing: .04em; }
.ap-ticket-note { padding: 10px 12px; border-top: 1px solid #eef1f5; font-size: .82rem; background: #f8fafc; }

/* ------------------------------------------------ Aperçu « Page de connexion » (Pages candidat) */
.ap-cnx-haut { background: #124c7c; color: #fff; font-weight: 800; font-size: 1.05rem; line-height: 1.25; padding: 18px 14px; border-radius: 14px; margin-bottom: 10px; }
.ap-cnx-carte { background: #fff; border-radius: 14px; padding: 14px; }

/* ------------------------------------------------ V2 : postes et documents (administration) */
.po-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.po-item { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.po-item.ferme { background: #fafbfc; }
.po-ordre { display: flex; flex-direction: column; gap: 4px; }
.po-corps { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.po-tete { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.po-tete strong { font-size: 1.02rem; }
.po-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.po-pieces { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 16px; }
.po-pieces .check { margin-top: 8px; }
.docs-autres { margin-top: 14px; font-size: .92rem; }
.docs-autres summary { cursor: pointer; color: var(--muted); }
.docs-autres ul { margin: 8px 0 0; }
@media (max-width: 760px) { .po-item { flex-wrap: wrap; } .po-actions { width: 100%; justify-content: flex-start; } }
.ag-weekend { margin: -6px 0 12px; }
.ag-weekend:empty { display: none; }
.at-barre { position: sticky; bottom: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 -4px 14px rgba(15,25,40,.06); }
.at-barre strong { flex: 1; min-width: 180px; }
.at-barre select { width: auto; flex: 0 1 320px; min-width: 200px; }
#at-rows input[type=checkbox], #at-tous { width: 18px; height: 18px; }

/* ------------------------------------------------ Mise en page élargie de l'espace équipe (admin, RH, recruteur) */
/* Marges réduites : le contenu (tableaux, agenda, éditeurs) et l'en-tête occupent toute la largeur de l'écran,
   jusqu'à 1800 px (au-delà, les lignes deviendraient trop longues à lire). */
.admin-body .topbar-in, .admin-body .wrap { max-width: 1800px; padding-left: 20px; padding-right: 20px; }
.admin-body .topbar-in { padding-top: 10px; padding-bottom: 10px; }
.admin-body .wrap { padding-top: 16px; }
.admin-body .card { padding: 18px 20px; }
.admin-body .card + .card { margin-top: 12px; }
.admin-body .barre-onglets { margin-bottom: 16px; }
.admin-body .kpis { margin-bottom: 14px; }
.admin-body th, .admin-body td { padding: 10px 12px; }
.admin-body .drawer { width: min(760px, 100%); }
@media (max-width: 760px) {
  .admin-body .topbar-in, .admin-body .wrap { padding-left: 10px; padding-right: 10px; }
  .admin-body .card { padding: 14px 12px; }
  .admin-body th, .admin-body td { padding: 9px 8px; }
}
/* Audit : le texte « Actions » réservé aux lecteurs d'écran (position absolue) sortait du tableau défilant et créait un
   défilement horizontal de toute la page sur téléphone ; l'en-tête passe sur deux lignes sur petit écran. */
.table-wrap { position: relative; }
@media (max-width: 760px) {
  .admin-body .topbar-in { flex-wrap: wrap; row-gap: 6px; }
  .admin-body .topbar .spacer { flex-basis: 0; }
  .admin-body #btn-moi, .admin-body .topbar [data-action=logout] { padding: 4px 8px; }
}
/* Audit mise en page (téléphone) : l'éditeur d'e-mails et les badges longs ne débordent plus de l'écran */
.tpl-layout > *, .tpl-cols > * { min-width: 0; }
.po-tete .badge, #t-messages .badge { white-space: normal; }
