:root {
  --ink: #203030; --ink2: #3b4f4f; --mut: #6b7c7c; --line: #dfe6e6; --bg: #f4f6f6; --card: #fff;
  --gold: #f0c040; --gold-d: #d9a517; --ok: #18864b; --warn: #b36b00; --ko: #c02f2f;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.wrap { max-width: 920px; margin: 0 auto; padding: 0 16px; }
.top { background: var(--ink); color: #fff; border-bottom: 4px solid var(--gold); }
.top-in { display: flex; align-items: center; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.logo { height: 44px; width: auto; background: #fff; border-radius: 8px; padding: 4px 8px; }
.titles { flex: 1; min-width: 0; }
.titles h1 { margin: 0; font-size: 20px; }
.titles p { margin: 2px 0 0; font-size: 13px; color: #c5d3d3; }
.quiet { color: #c5d3d3; font-size: 13px; text-decoration: none; border: 1px solid #4b6262; padding: 4px 10px; border-radius: 6px; }
main { padding-top: 18px; padding-bottom: 8px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin: 0 0 16px; }
.card h2 { margin: 0 0 10px; font-size: 16px; }
label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.row { display: flex; gap: 10px; }
input[type=text], input[type=password] { flex: 1; min-width: 0; width: 100%; padding: 11px 12px; font-size: 16px; border: 1px solid #c7d2d2; border-radius: 8px; background: #fff; color: var(--ink); }
input[type=text]:focus, input[type=password]:focus { outline: 2px solid var(--gold); border-color: var(--gold-d); }
.btn { background: var(--gold); color: var(--ink); border: 0; font-weight: 700; font-size: 15px; padding: 11px 18px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--gold-d); }
.btn:disabled { opacity: .55; cursor: wait; }
.btn.full { width: 100%; margin-top: 12px; }
.btn.small { padding: 4px 10px; font-size: 13px; text-decoration: none; display: inline-block; }
.btn.ghost { background: #fff; border: 1px solid #c7d2d2; font-weight: 600; }
.hint { color: var(--mut); font-size: 12.5px; margin: 6px 0 0; }
code { background: #eef2f2; padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 12px; }
.chk { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: 14px; margin: 0; cursor: pointer; }
.chk input { width: 18px; height: 18px; accent-color: var(--gold-d); }
.msg { margin: 10px 0 0; padding: 8px 12px; border-radius: 8px; background: #fdeaea; color: var(--ko); font-size: 13.5px; }
.msg.info { background: #eef6ff; color: #1d4e89; }
.job-head { display: flex; justify-content: space-between; align-items: center; }
.job-title { margin: 0 0 8px; font-weight: 600; word-break: break-all; }
.badge { padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #eef2f2; color: var(--ink2); }
.badge.running { background: #fff4d6; color: #8a6200; } .badge.done { background: #e8f6ee; color: var(--ok); }
.badge.partial { background: #fff4e0; color: var(--warn); } .badge.error { background: #fdeaea; color: var(--ko); }
.bar { height: 12px; background: #e6ecec; border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold-d)); transition: width .4s ease; }
.steps { list-style: none; margin: 12px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 14px; }
.steps li { display: flex; gap: 8px; align-items: baseline; font-size: 13.5px; padding: 3px 0; border-bottom: 1px dashed #e8eded; }
.steps .ic { width: 20px; text-align: center; flex: none; }
.steps .lb { flex: 1; min-width: 0; }
.steps .nt { display: block; font-size: 12px; color: var(--mut); }
.steps .tm { color: var(--mut); font-size: 12px; flex: none; }
.steps li.pending { color: #98a6a6; } .steps li.running { font-weight: 700; } .steps li.skipped { color: #98a6a6; }
.result { background: #f3faf6; border: 1px solid #cfe9da; border-radius: 10px; padding: 10px 14px; margin: 10px 0; }
.result.err { background: #fdf3f3; border-color: #f0c9c9; }
.result .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.result p { margin: 0 0 4px; font-size: 13.5px; }
details summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--ink2); margin: 6px 0; }
pre { background: #1d2a2a; color: #d6e4e4; padding: 10px 12px; border-radius: 8px; font: 12px/1.45 Consolas, Menlo, monospace; max-height: 260px; overflow: auto; white-space: pre-wrap; word-break: break-word; margin: 0; }
.queue { list-style: none; padding: 0; margin: 0; }
.queue li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid #edf1f1; font-size: 14px; cursor: pointer; }
.queue li:last-child { border-bottom: 0; }
.hist { width: 100%; border-collapse: collapse; font-size: 14px; }
.hist th { text-align: left; font-size: 12px; color: var(--mut); border-bottom: 1px solid var(--line); padding: 6px 8px; }
.hist td { padding: 7px 8px; border-bottom: 1px solid #edf1f1; vertical-align: middle; }
.hist td.nd { font-weight: 600; word-break: break-all; }
.hist td a.lnk { margin-right: 6px; color: #1b5e8a; text-decoration: none; font-weight: 600; font-size: 13px; }
.hist .empty { color: var(--mut); text-align: center; padding: 14px; }
.foot { color: var(--mut); font-size: 12px; text-align: center; padding: 8px 16px 24px; }
.login { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.login-card { width: 100%; max-width: 360px; text-align: center; }
.login-card h1 { font-size: 20px; margin: 10px 0 14px; }
.login-card form { text-align: left; }
.login-card .logo { height: 54px; }
@media (max-width: 640px) {
  .top-in { flex-wrap: wrap; gap: 10px; } .titles p { display: none; }
  .row { flex-direction: column; } .btn { width: 100%; }
  .hist thead { display: none; }
  .hist, .hist tbody, .hist tr, .hist td { display: block; width: 100%; }
  .hist tr { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin: 0 0 10px; }
  .hist td { border: 0; padding: 2px 0; }
  .hist td[data-l]::before { content: attr(data-l) " : "; color: var(--mut); font-size: 12px; }
  .steps { grid-template-columns: 1fr; }
}

[hidden] { display: none !important; }
.access { margin-top: 14px; padding: 14px 16px; border: 1px solid #ecd68a; border-left: 5px solid var(--gold); border-radius: 10px; background: #fffbea; }
.access .aq { margin: 0 0 2px; font-size: 15px; }
.access .acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.access .btn.small { padding: 8px 14px; font-size: 14px; }
#acc-fields { margin-top: 12px; }
#acc-fields label { margin-top: 10px; }
#acc-fields input[type=text] { flex: none; }
#acc-fields .btn { margin-top: 12px; }
.opt { font-weight: 400; color: var(--mut); }
.help { margin-top: 12px; padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px; color: var(--ink2); }
.help p { margin: 0 0 6px; }
.help ul { margin: 0 0 6px; padding-left: 18px; }
.help li { margin: 2px 0; }
.notices { list-style: none; margin: 8px 0 0; padding: 0; }
.notices li { margin: 0 0 6px; padding: 8px 12px; border-radius: 8px; background: #fff4e0; color: #7a4a00; font-size: 13px; }
.client-check { margin: 6px 0 0; padding: 6px 12px; border-radius: 8px; background: #eef6ff; color: #1d4e89; font-size: 13.5px; font-weight: 600; }
.client-check.new { background: #fffbea; color: #7a5b00; }
.msg.ok { background: #f3faf6; color: var(--ok); }

/* --- choix de l'agence et thème (Bforbiz = thème d'origine ; VISEMEO = cyan #00A9E0 / vert #3DCC7E tirés du logo) --- */
.ag-title { font-size: 20px !important; text-align: center; margin: 4px 0 14px !important; }
.ag-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ag-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 150px; padding: 18px 12px; border: 2px solid var(--line); border-radius: 16px; background: #fff; cursor: pointer; font: inherit; color: var(--ink); transition: border-color .15s, box-shadow .15s, transform .1s; }
.ag-btn:hover, .ag-btn:focus-visible { box-shadow: 0 6px 20px rgba(0,0,0,.10); transform: translateY(-1px); outline: none; }
.ag-btn[data-agency="bforbiz"]:hover, .ag-btn[data-agency="bforbiz"]:focus-visible { border-color: #f0c040; }
.ag-btn[data-agency="visemeo"]:hover, .ag-btn[data-agency="visemeo"]:focus-visible { border-color: #00A9E0; }
.ag-logo { display: flex; align-items: center; justify-content: center; height: 64px; width: 100%; }
.ag-logo img { max-height: 56px; max-width: 90%; width: auto; object-fit: contain; }
.ag-label { font-size: 22px; font-weight: 800; letter-spacing: .3px; }
.ag-bar { margin: 4px 0 0 !important; font-size: 13px !important; color: #fff !important; }
.ag-bar a { color: var(--gold); font-weight: 700; }
.hist-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.hist-head h2 { margin-bottom: 10px; }
.scope { font-weight: 400; font-size: 12.5px; color: var(--mut); }
.ag-tag { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 700; background: #eef2f2; color: var(--ink2); }
.ag-tag.visemeo { background: #e0f4fc; color: #006e96; }
.ag-tag.bforbiz { background: #fff4d6; color: #8a6200; }
body[data-agency="visemeo"] { --gold: #00A9E0; --gold-d: #0089b8; }
body[data-agency="visemeo"] .top { border-bottom-color: #00A9E0; border-image: linear-gradient(90deg, #00A9E0, #3DCC7E) 1; }
body[data-agency="visemeo"] .btn { color: #fff; background: #0090c0; }
body[data-agency="visemeo"] .btn:hover { background: #007aa3; }
body[data-agency="visemeo"] .btn.ghost { background: #fff; color: var(--ink); }
body[data-agency="visemeo"] .btn.ghost:hover { background: #f1f8fb; }
body[data-agency="visemeo"] .chk input { accent-color: #00A9E0; }
body[data-agency="visemeo"] input[type=text]:focus { outline-color: #3DCC7E; border-color: #00A9E0; }
@media (max-width: 520px) { .ag-choices { grid-template-columns: 1fr; } .ag-btn { min-height: 120px; } }

/* qa-block : contrôle qualité */
.qa { margin-top: 8px; padding: 8px 12px; border-radius: 8px; font-size: 13px; }
.qa.ok { background: #eaf7ef; color: #1b6b3e; }
.qa.check { background: #fff4e0; color: #7a4a00; }
.qa-list { margin: 4px 0 0 18px; padding: 0; } .qa-list li { margin: 2px 0; }

/* [comptes-v2] pages publiques (connexion, invitation, réinitialisation…) : plus de style en ligne (CSP style-src 'self') */
.au-s12 { font-size:12px; } .au-s13 { font-size:13px; } .au-lh { line-height:1.45; } .au-c { text-align:center; }
.au-mt14 { margin-top:14px; } .au-mt16 { margin-top:16px; } .au-intro { margin:0 0 12px; font-size:13px; line-height:1.4; }
/* [logo-plateforme-v1] */
.pf-login { display:flex; align-items:center; justify-content:center; gap:12px; margin:0 0 16px; text-align:left; }
.pf-login .pf-ic { width:56px; height:56px; border-radius:12px; flex:0 0 56px; }
.pf-login h1 { margin:0; font-size:20px; line-height:1.2; }
.pf-login span { display:block; font-size:12.5px; color:#5A6B7D; margin-top:2px; }
/* [pages-legales-v1] pages publiques Confidentialité / Conditions + pied de la page de connexion */
.pl-foot { text-align:center; font-size:11.5px; margin:10px 0 0; color:#5A6B7D; } .pl-foot a { color:#5A6B7D; }
.pl-body { background:#F4F6F8; margin:0; padding:24px 14px; }
.pl-card { max-width:820px; margin:0 auto; padding:22px 26px; }
.pl-head { display:flex; align-items:center; gap:12px; border-bottom:1px solid #E3E8EE; padding-bottom:12px; margin-bottom:6px; }
.pl-head img { border-radius:10px; flex:0 0 44px; }
.pl-head h1 { font-size:20px; margin:0; line-height:1.2; } .pl-head span { display:block; font-size:12px; color:#5A6B7D; margin-top:2px; }
.pl-txt { font-size:13.5px; line-height:1.55; color:#1F2D3D; }
.pl-txt h2 { font-size:14.5px; margin:16px 0 4px; } .pl-txt p { margin:4px 0 8px; } .pl-txt ul { margin:4px 0 8px; padding-left:20px; } .pl-txt li { margin:2px 0; }
.pl-txt code { font-size:12px; background:#EEF2F6; padding:0 4px; border-radius:4px; }
.pl-nav { border-top:1px solid #E3E8EE; margin-top:14px; padding-top:10px; font-size:12px; text-align:center; color:#5A6B7D; }
@media (max-width:600px) { .pl-card { padding:16px; } }

/* [legal-v2] pied de page de l'application */
.app-foot { text-align:center; font-size:11.5px; color:#5A6B7D; padding:10px 16px 14px; } .app-foot a { color:#5A6B7D; }
