/* Emploi Touramakhan — design repris de touramakhan-offres (static/styles.css) : barre latérale vert foncé, cartes,
   pastilles, filtres en rubriques. Même palette, mêmes composants ; s'y ajoutent les pages propres à Emploi. */
:root {
  --green-900: #0b3d33; --green-800: #0f5c4d; --green-700: #157060; --green-200: #bfe3d3; --green-100: #e5f0ec;
  --lime: #8fd3b6; --bg: #f5f6f2; --surface: #ffffff; --surface-2: #eef1ec; --text: #1b2421; --muted: #5d6662;
  --border: #dcdfd7; --warn: #8a5300; --warn-bg: #fff3dc; --danger: #a8322d; --danger-bg: #fde8e6; --ok: #1f6a3b;
  --ok-bg: #e3f3e7; --link: var(--green-700); --radius: 10px; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 2px 8px rgba(0,0,0,.04);
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #111614; --surface: #1a201e; --surface-2: #222a27; --text: #e6ece9; --muted: #9aa7a1; --border: #313b37;
    --green-100: #1b332c; --green-200: #285447; --warn: #f0b45a; --warn-bg: #3a2c12; --danger: #f08a82;
    --danger-bg: #3d1d1b; --ok: #79cf94; --ok-bg: #19301f; --link: var(--lime); --shadow: none; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--link); }
h1 { font-size: 22px; line-height: 1.25; margin: 0 0 4px; } h2 { font-size: 17px; margin: 18px 0 8px; } h3 { font-size: 15px; margin: 12px 0 6px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .error { color: var(--danger); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; background: var(--surface); padding: 6px 10px; z-index: 60; }
:focus-visible { outline: 2px solid var(--green-700); outline-offset: 1px; }

/* structure : barre latérale + contenu */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: var(--green-900); color: #e9f5ef; display: flex; flex-direction: column; padding: 16px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; padding: 4px 8px 16px; }
.brand b { display: block; font-size: 17px; font-weight: 500; } .brand small { display: block; color: var(--lime); font-size: 12px; letter-spacing: .04em; }
.brand-lg { color: var(--text); padding: 0; } .brand-lg small { color: var(--green-700); }
.logo { width: 30px; height: 30px; border-radius: 8px; background: var(--lime); flex: none; position: relative; }
.logo::after { content: ""; position: absolute; inset: 8px 7px; border-top: 3px solid var(--green-900); border-bottom: 3px solid var(--green-900); }
.nav { display: grid; gap: 2px; }
.nav a { color: #cfe6dc; text-decoration: none; padding: 9px 12px; border-radius: 8px; display: flex; justify-content: space-between; align-items: center; }
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav a.active { background: var(--green-800); color: #fff; box-shadow: inset 3px 0 0 var(--lime); }
.nav-label { padding: 0 12px 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #9fbfb2; }
.account a.nav-bottom { color: #cfe6dc; text-decoration: none; padding: 9px 12px; margin: 0 -8px; border-radius: 8px; font-size: 15px; }
.account a.nav-bottom:hover { background: rgba(255,255,255,.07); color: #fff; }
.account a.nav-bottom.active { background: var(--green-800); color: #fff; box-shadow: inset 3px 0 0 var(--lime); }
.nav .pill { background: var(--lime); color: var(--green-900); border-radius: 999px; padding: 0 7px; font-size: 12px; font-weight: 600; }
.account { margin-top: auto; border-top: 1px solid rgba(255,255,255,.12); padding: 12px 8px 0; font-size: 13px; display: grid; gap: 8px; }
.account p { margin: 0; } .account .muted { color: #9fbfb2; } .account a:not(.btn) { color: var(--lime); }
.account .who { overflow-wrap: anywhere; } .account .role { color: var(--lime); }
.account .btn, .account button { background: transparent; color: #e9f5ef; border-color: rgba(255,255,255,.25); justify-content: flex-start; text-align: start; }
.account .btn:hover, .account button:hover { background: rgba(255,255,255,.08); }
.account .btn-primary { background: var(--lime); border-color: var(--lime); color: var(--green-900); }
.account .btn-primary:hover { background: #a6dec6; }
.account form { margin: 0; }
main { padding: 22px clamp(16px, 3vw, 32px) 24px; min-width: 0; outline: none; display: flex; flex-direction: column; min-height: 100vh; }
main > .foot { margin-top: auto; }
.foot { border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; padding: 14px 0 0; margin-top: 32px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; } .foot p { margin: 0; }
.menu-toggle { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 250px; z-index: 30; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: 0 0 30px rgba(0,0,0,.3); }
  html:not(.js) .sidebar { position: static; width: auto; height: auto; transform: none; }   /* sans JavaScript : menu en haut */
  .menu-toggle { display: block; position: fixed; top: 10px; right: 12px; z-index: 31; background: var(--green-900); color: #fff; border: 0; }
  html:not(.js) .menu-toggle { display: none; }
  main { padding-top: 56px; min-height: 0; }
  html:not(.js) main { padding-top: 22px; }
}

/* page de connexion (comme Offres) */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--green-900); }
.login-card { background: var(--surface); padding: 28px; border-radius: 14px; width: min(440px, 100%); display: grid; gap: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.login-card h1 { font-size: 20px; } .login-card p { margin: 0; } .login-card form p, .login-card form > div { margin: 0 0 10px; }
.login-card input:not([type=checkbox]):not([type=radio]) { max-width: none; }
.login-card form button[type=submit] { width: 100%; justify-content: center; }

/* contrôles */
input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; max-width: 100%; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=url], input[type=date],
input[type=file], input:not([type]), select, textarea { width: 100%; max-width: 32rem; }
textarea { min-height: 70px; }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; margin: 0; accent-color: var(--green-800); flex: none; }
button, .btn, input[type=submit] { font: inherit; font-weight: 500; cursor: pointer; border-radius: 8px; padding: 8px 13px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
button:hover, .btn:hover { background: var(--surface-2); }
button:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary, form button[type=submit]:not(.linklike):not(.btn):not(.btn-sm):not(.btn-danger):not(.star) { background: var(--green-800); border-color: var(--green-800); color: #fff; }
.btn-primary:hover, form button[type=submit]:not(.linklike):not(.btn):not(.btn-sm):not(.btn-danger):not(.star):hover { background: var(--green-700); }
.btn-sm { padding: 4px 9px; font-size: 13px; }
.btn-danger { color: var(--danger); border-color: var(--danger); background: var(--surface); }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--link); cursor: pointer; text-decoration: underline; }
form p, form > div { margin: 0 0 12px; }
label { display: block; font-weight: 500; margin-bottom: 4px; }
.helptext, form .helptext, form small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.errorlist { color: var(--danger); margin: 4px 0; padding-left: 18px; font-size: 14px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row form, form.row { margin: 0; }
.spacer { flex: 1; }
.head { display: flex; gap: 12px; align-items: end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.head p { margin: 4px 0 0; }

/* blocs */
.card, .hero, .tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card { padding: 14px 16px; }
.hero { padding: clamp(20px, 4vw, 34px); }
.hero h1 { font-size: clamp(22px, 3vw, 28px); margin-bottom: 10px; }
.hero .lead { font-size: 16px; color: var(--muted); max-width: 46rem; margin: 0 0 14px; }
section { margin-top: 24px; } section.hero { margin-top: 0; } .hero + section { margin-top: 28px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.tile { padding: 14px 16px; display: grid; gap: 6px; align-content: start; } .tile p { margin: 0; color: var(--muted); font-size: 14px; }
.tile h2, .tile h3 { font-size: 15px; margin: 0; }
.steps { padding-left: 22px; display: grid; gap: 6px; margin: 0; }
.doc-actions { gap: 6px; margin: 6px 0; } .doc-actions form, form.inline { display: inline; margin: 0; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: var(--green-100); color: var(--green-800); font-weight: 500; }
@media (prefers-color-scheme: dark) { .badge { color: var(--lime); } }
.badge.warn { background: var(--warn-bg); color: var(--warn); } .badge.bad { background: var(--danger-bg); color: var(--danger); }
.badge.ok { background: var(--ok-bg); color: var(--ok); } .badge.grey { background: var(--surface-2); color: var(--muted); }
.hero > .badge { margin-bottom: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.table-wrap { overflow-x: auto; padding: 0; } .table-wrap table { min-width: 720px; }

/* messages */
.messages { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 6px; }
.msg { padding: 10px 14px; border-radius: 8px; background: var(--green-100); }
.msg.error { background: var(--danger-bg); color: var(--danger); } .msg.warning { background: var(--warn-bg); color: var(--warn); }
.msg.success { background: var(--ok-bg); color: var(--ok); }

/* recherche et filtres (comme les opportunités d'Offres) */
.hero-search { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 12px; max-width: 40rem; }
.hero-search input { flex: 1; min-width: 12rem; max-width: none; }
.searchbar { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 8px; margin-bottom: 10px; }
.searchbar input { max-width: none; }
@media (max-width: 700px) { .searchbar { grid-template-columns: 1fr; } .searchbar > button { justify-content: center; } }
.layout { display: grid; grid-template-columns: 260px 1fr; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .layout { grid-template-columns: 1fr; } }
.filters { display: grid; gap: 12px; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
.filters-toggle { display: none; }
@media (max-width: 1100px) {
  .filters { position: static; max-height: none; }
  .js .filters-toggle { display: block; width: 100%; text-align: left; }
  .js .filters:not(.open) > :not(.filters-toggle) { display: none; }
}
.filters fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 4px; min-width: 0; }
.filters legend, .filters .legend { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; margin-bottom: 2px; padding: 0; }
.filters .field { margin: 0; display: grid; gap: 2px; }
.filters input, .filters select { max-width: none; }
.filters > button[type=submit] { justify-content: center; }
.filters p { margin: 0; }
.checks { display: grid; gap: 2px; } .checks.scroll { max-height: 200px; overflow: auto; }
.checks label, .filters .check { display: flex; gap: 6px; font-size: 14px; align-items: center; font-weight: 400; margin: 0; }
.checks label.muted { color: var(--muted); }
.checks .count { color: var(--muted); font-size: 13px; }
.checks .group { font-size: 12px; color: var(--muted); font-weight: 600; margin: 6px 0 2px; }
.checks .group:first-child { margin-top: 0; }
.results-col { min-width: 0; margin: 0; }
.tools { margin-bottom: 10px; } .tools label.inline { margin: 0; font-weight: 400; } .tools select { width: auto; }
.criteria { justify-content: space-between; margin-bottom: 10px; flex-wrap: wrap; } .criteria p { margin: 0; }
.save-search { margin: 0; flex-wrap: nowrap; } .save-search input { width: 12rem; max-width: 40vw; padding: 4px 9px; font-size: 13px; }
.results { display: grid; gap: 10px; min-width: 0; }
.results.grid { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; align-items: start; }
.star { font-size: 17px; line-height: 1; padding: 4px 8px; background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.star[aria-pressed=true] { background: var(--green-100); border-color: var(--green-700); color: var(--green-800); }
.js .opp[data-href] { cursor: pointer; }

/* carte d'offre (comme .opp d'Offres) */
.opp { display: grid; gap: 6px; }
.opp:hover { border-color: var(--green-200); }
.opp h3 { margin: 0; font-size: 15px; line-height: 1.35; font-weight: 500; }
.opp h3 a { color: var(--text); text-decoration: none; }
.opp h3 a:hover { color: var(--link); text-decoration: underline; }
.meta { display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.geo { font-size: 12px; color: var(--muted); border-left: 3px solid var(--lime); padding-left: 8px; }
.empty { padding: 20px; } .empty h2 { margin-top: 0; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 16px; }

/* fiche */
.detail { padding: clamp(16px, 3vw, 26px); }
.detail h1 { margin-bottom: 6px; }
.detail .lead { font-size: 16px; margin: 0 0 12px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
dl.kv { display: grid; grid-template-columns: 190px 1fr; gap: 6px 12px; margin: 14px 0; font-size: 14px; }
dl.kv dt { color: var(--muted); } dl.kv dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) { dl.kv { grid-template-columns: 1fr; } dl.kv dd { margin-bottom: 6px; } }
.detail section { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 6px; }
.description { overflow-wrap: anywhere; font-size: 14px; } .description table { display: block; overflow-x: auto; }

/* espace personnel et gestion : sous-navigation en onglets (comme .tabs d'Offres) */
.space { display: block; }
.space-nav { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 14px; flex-wrap: wrap; }
.space-nav a { padding: 8px 12px; border-radius: 8px 8px 0 0; color: var(--text); text-decoration: none; font-weight: 500; }
.space-nav a:hover { background: var(--surface-2); }
.space-nav a[aria-current=page] { background: var(--green-100); color: var(--green-800); box-shadow: inset 0 -2px 0 var(--green-800); }
@media (prefers-color-scheme: dark) { .space-nav a[aria-current=page] { color: var(--lime); box-shadow: inset 0 -2px 0 var(--lime); } }
.space-main { padding: clamp(14px, 3vw, 22px); min-width: 0; }
.space-main > h1:first-child, .space-main > h2:first-child { margin-top: 0; }

/* espace candidat */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 10px; }
.chips a { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); text-decoration: none; color: var(--text); font-size: 13px; }
.chips a[aria-current=page] { background: var(--green-800); border-color: var(--green-800); color: #fff; }
.badge.st-enregistree { background: var(--surface-2); color: var(--muted); }
.badge.st-en_preparation { background: var(--warn-bg); color: var(--warn); }
.badge.st-envoyee, .badge.st-entretien { background: var(--green-100); color: var(--green-800); }
.badge.st-retenue { background: var(--ok-bg); color: var(--ok); }
.badge.st-ecartee { background: var(--danger-bg); color: var(--danger); }
.track-box { margin: 12px 0; padding: 12px 14px; border-radius: 8px; background: var(--green-100); }
.track-box p { margin: 0 0 8px; } .track-box form { margin: 0; }
.history { padding-left: 18px; } .danger-zone { margin-top: 24px; border-top: 1px solid var(--border); padding-top: 14px; }
.resolve { padding: 14px; margin-bottom: 14px; } .resolve input { max-width: 26rem; }
.saved { padding-left: 18px; display: grid; gap: 6px; } .saved li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .saved form { margin: 0; }
@media (max-width: 640px) {
  .table-wrap.stack table { min-width: 0; }
  .table-wrap.stack thead { display: none; }
  .table-wrap.stack tr { display: block; border-bottom: 1px solid var(--border); padding: 8px 0; }
  .table-wrap.stack td { display: block; border: 0; padding: 2px 0; }
  .table-wrap.stack td[data-label]::before { content: attr(data-label) " : "; color: var(--muted); font-size: 13px; }
  .table-wrap.stack td.num { text-align: left; } .table-wrap.stack td.num br { display: none; } .table-wrap.stack td.num a { margin-left: 8px; }
}

/* compteurs (gestion, tableau de bord) */
.counters { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 12px 0 16px; }
.counter { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; }
.counter b { display: block; font-size: 24px; font-variant-numeric: tabular-nums; color: var(--green-800); }
@media (prefers-color-scheme: dark) { .counter b { color: var(--lime); } }
.counter span { font-size: 12px; color: var(--muted); }
.counter a { text-decoration: none; }
.counter span.counter-sub { display: block; margin-top: 2px; font-size: 11.5px; }
.counter span:not(.counter-sub) { display: block; color: var(--text); font-size: 12.5px; }
.add-candidate { margin: 10px 0 16px; } .add-candidate summary { cursor: pointer; font-weight: 600; }
.opp .row select, .opp .row input { max-width: 14rem; }
pre.code { background: var(--surface-2); padding: 10px; border-radius: 8px; overflow: auto; font-size: 12px; }
.entrance { max-width: 30rem; margin: 12px auto; padding: 24px; } .entrance h1 { font-size: 20px; }

/* fiche en panneau latéral (comme .drawer d'Offres) */
.drawer { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 40; display: flex; justify-content: flex-end; }
.drawer-panel { background: var(--bg); width: min(760px, 100%); height: 100%; overflow: auto; padding: 16px 20px 40px; outline: none; }
.drawer-panel > .head { position: sticky; top: -16px; background: var(--bg); padding: 4px 0 10px; margin: 0 0 6px; z-index: 1; align-items: center; }
.drawer-panel > .head h2 { margin: 0; }
.drawer-panel .detail { box-shadow: none; }
body.drawer-open { overflow: hidden; }

/* sources et collecte (gestion) */
.plans h2 { margin-top: 0; }
.plan-list { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 6px; }
.plan-list li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.plan-list li > span:first-child { flex: 1; min-width: 14rem; }
.plan-list form { margin: 0; }
.sources-setup { display: grid; gap: 12px; }
.source-card { display: grid; gap: 8px; scroll-margin-top: 16px; }
.source-card h3 { margin: 0; font-size: 16px; }
.source-card:target { border-color: var(--green-700); box-shadow: 0 0 0 2px var(--green-200); }
.steps-line { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; counter-reset: step; }
.steps-line li { counter-increment: step; font-size: 13px; padding: 3px 10px 3px 6px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.steps-line li::before { content: counter(step); display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
  margin-right: 6px; font-size: 11px; font-weight: 600; background: var(--border); color: var(--text); }
.steps-line li.done { background: var(--ok-bg); color: var(--ok); } .steps-line li.done::before { content: "✓"; background: var(--ok); color: #fff; }
.steps-line li.current { background: var(--warn-bg); color: var(--warn); font-weight: 600; } .steps-line li.current::before { background: var(--warn); color: #fff; }
.next-step { margin: 0; color: var(--warn); }
.setup summary { cursor: pointer; font-weight: 500; font-size: 14px; }
.setup-form { display: grid; grid-template-columns: 1.2fr 2fr .7fr auto; gap: 8px; align-items: end; margin: 8px 0 0; }
.setup-form > div { margin: 0; } .setup-form label { font-size: 12px; color: var(--muted); }
.setup-form input, .setup-form select { max-width: none; }
@media (max-width: 900px) { .setup-form { grid-template-columns: 1fr; } }
.source-card .actions { margin: 0; } .source-card .actions form { margin: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.results-mini p { margin: 0; }
.legend { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; margin: 0 0 2px; }

/* refonte 2026-11 : Mon compte, envoi d'une candidature */
.account-rows { display: grid; gap: 10px; max-width: 920px; }
.row-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.row-item p { margin: 2px 0 0; }
.send-box { background: var(--surface-2); border-radius: var(--radius); padding: 10px 14px; margin: 8px 0; }
.send-box p { margin: 0 0 6px; }
.nav .pill.warn { background: var(--warn-bg); color: var(--warn); }
.report { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 10px; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--border); margin: 0 0 14px; }
.tabs a { padding: 8px 14px; text-decoration: none; color: var(--muted); }
.tabs a[aria-current="page"] { color: var(--green-800); border-bottom: 2px solid var(--green-800); font-weight: 600; }


/* Statistiques (refonte, lot 3) : graphiques SVG rendus côté serveur, aucun style en ligne (CSP). */
.chart { margin: 8px 0 4px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart .axis { stroke: var(--muted); stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .mark { fill: var(--green-700, #1f6b4f); }
.chart .hit { fill: transparent; }
.chart .bar:hover .mark { fill: var(--green-800); }
.chart .bar:hover .hit { fill: var(--surface-2); }
@media (prefers-color-scheme: dark) { .chart .mark { fill: var(--lime); } .chart .bar:hover .mark { fill: #b5e6cf; } }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin: 12px 0; }
.stat-grid > .card { margin: 0; }
.stat-block table td, .stat-block table th { padding: 5px 6px; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.share-cell { width: 110px; }
.share-bar { width: 56px; height: 6px; vertical-align: middle; }
.share-bar .track { fill: var(--surface-2); }
.share-bar .fill { fill: var(--green-700, #1f6b4f); }
@media (prefers-color-scheme: dark) { .share-bar .fill { fill: var(--lime); } }
.funnel { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 8px; }
.funnel li { display: grid; grid-template-columns: minmax(160px, 1fr) 2fr 60px; align-items: center; gap: 10px; font-size: 14px; }
.funnel .share-bar { width: 100%; height: 8px; }
.funnel b { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .funnel li { grid-template-columns: 1fr 60px; } .funnel .share-bar { grid-column: 1 / -1; grid-row: 2; } }
@media (max-width: 640px) { .chart { overflow-x: auto; } .chart svg { min-width: 620px; } .chart figcaption { min-width: 0; } }

/* CV et lettres (refonte, lot 4) : éditeur intégré. */
.editor-form { display: grid; gap: 10px; }
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; position: sticky; top: 0; z-index: 2;
  background: var(--surface); padding: 6px 0; border-bottom: 1px solid var(--border); }
.editor-toolbar .btn { padding: 4px 9px; font-size: 13px; min-height: 32px; }
.editor-toolbar .sep { width: 1px; height: 22px; background: var(--border); margin: 0 4px; }
.editor-page { min-height: 480px; max-width: 794px; width: 100%; margin: 0 auto; padding: 40px 48px; background: #fff; color: #1b2421;
  border: 1px solid var(--border); border-radius: 4px; box-shadow: var(--shadow); line-height: 1.5; font-size: 15px; outline: none; }
.editor-page:focus { border-color: var(--green-700); }
.editor-page h2 { font-size: 20px; margin: 18px 0 6px; color: #0f5c4d; }
.editor-page h3 { font-size: 16px; margin: 14px 0 4px; }
.editor-page p { margin: 0 0 8px; }
.editor-actions { position: sticky; bottom: 0; background: var(--surface); padding: 8px 0; border-top: 1px solid var(--border); }
textarea.editor-fallback { width: 100%; font: inherit; }
.versions { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.versions li { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; }
.steps { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 10px; counter-reset: step; }
.steps > li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.steps > li::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 26px; height: 26px;
  border-radius: 50%; background: var(--green-100); color: var(--green-800); font-weight: 600; font-size: 13px; }
.steps > li.done::before { content: "✓"; background: var(--green-800); color: #fff; }
.steps form.row { margin: 4px 0 0; }
@media (max-width: 640px) { .editor-page { padding: 20px 16px; min-height: 360px; } }
@media (prefers-color-scheme: dark) { .steps > li::before { background: var(--surface-2); color: var(--lime); } }
.editor-toolbar[hidden], .editor-page[hidden] { display: none; }
.editor-page strong, .editor-page b { font-weight: 700; }
.editor-page h2, .editor-page h3 { font-weight: 700; }
.editor-page h3 { text-transform: uppercase; letter-spacing: .03em; font-size: 13.5px; color: #0f5c4d; border-bottom: 1px solid #d7e2dc; padding-bottom: 2px; }
.editor-toolbar b { font-weight: 800; }
.card fieldset.stack { border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 12px 10px; margin: 0; }
.card fieldset.stack legend { padding: 0 4px; font-size: 14px; }
/* Jetons (refonte, lot 5) */
.pack-row { display: grid; grid-template-columns: 2fr 1fr 1fr 80px 96px 120px; gap: 8px; align-items: center; padding: 6px 0;
  border-bottom: 1px solid var(--border); }
.pack-row input:not([type=checkbox]) { width: 100%; margin: 0; }
.pack-row label { display: flex; gap: 4px; align-items: center; margin: 0; font-weight: 400; }
.pack-head span { text-align: left; }
.pack-row .btn { width: 100%; }
.pack-head { border-bottom: 0; padding-bottom: 0; text-transform: uppercase; letter-spacing: .04em; font-size: 11.5px; }
@media (max-width: 760px) { .pack-row { grid-template-columns: 1fr 1fr; } .pack-head { display: none; } }
/* Assistant (refonte, lot 6) */
.badge.danger { background: var(--danger-bg); color: var(--danger); }
.corrections { list-style: none; padding: 0; margin: 8px 0 12px; display: grid; gap: 8px; }
.corrections label { display: block; font-weight: 400; line-height: 1.5; }
.corrections del { color: var(--danger); } .corrections ins { color: var(--ok); text-decoration: none; font-weight: 600; }
.assist { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
/* Support (refonte, lot 7) */
.chat { display: grid; gap: 10px; }
.bubble { max-width: 640px; padding: 10px 14px; border-radius: 14px; font-size: 14.5px; }
.bubble p { margin: 0 0 6px; } .bubble p:last-child { margin-bottom: 0; }
.bubble.bot { background: var(--surface-2); border-top-left-radius: 4px; }
.bubble.me { background: var(--green-800); color: #fff; justify-self: end; border-top-right-radius: 4px; }
.chat-input { display: flex; gap: 8px; } .chat-input input { flex: 1; margin: 0; }
/* Filtres dynamiques (Mes offres) */
.live-filters .live-hide { display: none; }
.results-col[aria-busy="true"] .results { opacity: .55; transition: opacity .15s; }
/* Versions */
.account a.version { color: inherit; text-decoration: none; } .account a.version:hover { text-decoration: underline; }
.changelog h3 { font-size: 15px; margin: 14px 0 4px; } .changelog ul { margin: 4px 0 8px; }
.changelog.current { border-color: var(--green-700); }

/* Suivi des candidatures envoyées (1.10.0) */
.todo-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.todo-list li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 10px; font-size: 14px; }
.todo-list .due-date { font-weight: 600; white-space: nowrap; }
.todo-list form { margin: 0; }
@media (max-width: 640px) {
  .todo-list li { grid-template-columns: 1fr auto; }
  .todo-list .todo-text { grid-column: 1 / -1; grid-row: 2; }
}
.todo-list .due-retard .due-date, .todo-list li.due-retard .due-date { color: var(--danger); }
.todo-list li.due-aujourdhui .due-date { color: var(--warn); }
.track-line { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 10px 0 4px; }
.track-card > p.small { margin: 4px 0; }
.card.opp + .card.opp { margin-top: 12px; }
.track-line li { font-size: 13px; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.track-line li.done { background: var(--green-100); color: var(--green-800); }
.track-line li.current { background: var(--surface); color: var(--green-800); box-shadow: inset 0 0 0 1.5px var(--green-800); font-weight: 600; }
.track-line li.done.ok { background: var(--ok-bg); color: var(--ok); font-weight: 600; }
.track-line li.done.ko { background: var(--danger-bg); color: var(--danger); font-weight: 600; }
.next-action { gap: 8px; align-items: center; margin: 2px 0 10px; }
.track-actions { gap: 8px; align-items: center; }
.track-actions form { margin: 0; }
.pop > summary { list-style: none; cursor: pointer; display: inline-block; }
.pop > summary::-webkit-details-marker { display: none; }
.pop[open] > summary { margin-bottom: 6px; }
.pop form { gap: 8px; align-items: center; }
.track-links { margin: 8px 0 0; }
.chips .count { opacity: .7; font-size: 12px; margin-left: 2px; }

.error-page { max-width: 640px; margin: 10vh auto; padding: 0 16px; }

/* ===== Pages du visiteur : présentation reprise d'Offres 2.20 (2026-11-05), aucun comportement modifié ===== */
.inline-icon { display: inline-block; vertical-align: -.18em; flex-shrink: 0; }
input[type=checkbox] { accent-color: var(--green-800); flex-shrink: 0; }

/* En-tête : titre, une phrase, une ligne de chiffres. */
.page-header { align-items: end; margin-bottom: 10px; gap: 12px; }
.page-header > div { min-width: 0; flex: 1 1 340px; }
.page-description { color: var(--muted); margin: 4px 0 0; max-width: 74ch; font-size: 13px; }
.page-metrics { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0 0 6px; }
.metric { display: inline-flex; flex-direction: row-reverse; align-items: baseline; gap: 6px; margin: 0; }
.metric dt { color: var(--muted); font-size: 13px; }
.metric dd { margin: 0; font-size: 15px; font-weight: 600; color: var(--green-800); font-variant-numeric: tabular-nums; }
.freshness { margin: 0 0 14px; }

/* Recherche : un libellé au-dessus de chaque champ. */
.searchbar.card { padding: 0; background: none; border: 0; box-shadow: none; margin-bottom: 12px; gap: 12px; align-items: end;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto; }
.search-field { display: grid; gap: 7px; min-width: 0; margin: 0; font-size: 12px; font-weight: 600; color: var(--muted); }
.search-field input { width: 100%; min-width: 0; max-width: none; font-weight: 400; font-size: 14px; color: var(--text); }
.searchbar.card > button { min-height: 42px; justify-content: center; }
@media (max-width: 1100px) { .searchbar.card { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .searchbar.card { grid-template-columns: minmax(0, 1fr); } }

/* Barre d'outils des résultats et filtres. */
.results-toolbar { margin: 0 0 16px; padding: 0 0 12px; border-bottom: 1px solid var(--border); gap: 10px; }
.results-toolbar .result-count { color: var(--text); font-weight: 600; }
.filters.card { padding: 6px 16px 16px; box-shadow: none; }
.filters fieldset + fieldset { border-top: 1px solid var(--border); padding-top: 12px; }
.filters legend { padding-top: 4px; }
.filters select { width: 100%; }
.checks label { display: grid; grid-template-columns: 16px minmax(0, 1fr) max-content; gap: 8px; align-items: start;
  line-height: 1.5; min-height: 30px; padding: 2px 0; }
.checks .check-label-text { min-width: 0; overflow-wrap: anywhere; }
.checks .count { white-space: nowrap; font-variant-numeric: tabular-nums; }
.checks input[type=checkbox] { width: 14px; height: 14px; margin: 3px 0 0; }

/* Carte d'offre : pastilles, titre, lieu et clôture avec icônes, rattachement, source sous un filet. */
.results { gap: 16px; }
.opp { position: relative; padding: 16px 18px; gap: 8px; transition: border-color .15s, box-shadow .15s; }
.opp:hover { border-color: var(--green-700); box-shadow: var(--shadow); }
.opp h3 { font-size: 16px; font-weight: 600; line-height: 1.45; }
.opp > .meta:last-child { border-top: 1px solid var(--border); padding-top: 12px; }
.opp > .row:first-child:has(.star) { padding-right: 50px; min-height: 44px; }
.opp > .row:first-child .star { position: absolute; top: 16px; right: 18px; }
.badge { padding: 3px 9px; line-height: 1.4; }
.star { font-size: 25px; line-height: 1; min-width: 44px; min-height: 44px; padding: 6px; border-radius: 10px; color: var(--green-800);
  display: inline-grid; place-items: center; text-decoration: none; }
.star:focus-visible { outline: 3px solid var(--green-700); outline-offset: 2px; }
@media (max-width: 700px) { .opp { padding: 16px; } .opp > .row:first-child .star { top: 16px; right: 16px; } }
@media (prefers-color-scheme: dark) { .metric dd, .star, .star[aria-pressed=true] { color: var(--lime); } }
@media (prefers-reduced-motion: reduce) { .opp { transition: none; } }

/* Choix de la langue (comme Offres) : bas de la barre latérale sur ordinateur, haut de l'écran sur mobile. */
.language-switch { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; }
.language-switch label { margin: 0; font-weight: 400; }
.language-switch select { width: auto; font-size: 13px; padding: 4px 8px; }
@media (min-width: 861px) {
  .language-switch { position: fixed; left: 0; bottom: 0; width: 240px; z-index: 31; justify-content: space-between;
    padding: 10px 20px 14px; background: var(--green-900); border-top: 1px solid rgba(255,255,255,.12); color: #cfe6dc; }
  .language-switch select { background: var(--green-800); color: #fff; border-color: rgba(255,255,255,.25); }
  .sidebar { padding-bottom: 64px; }
}
@media (max-width: 860px) {
  .language-switch { position: absolute; top: 10px; left: 16px; min-height: 40px; }
}

/* Arabe : lecture de droite à gauche (dir="rtl"). La grille place déjà la barre latérale à droite ; les positions
   et bordures physiques sont inversées ici. */
[dir=rtl] .nav a.active, [dir=rtl] .account a.nav-bottom.active { box-shadow: inset -3px 0 0 var(--lime); }
[dir=rtl] .skip { left: auto; right: -999px; } [dir=rtl] .skip:focus { right: 8px; }
[dir=rtl] .geo { border-left: 0; padding-left: 0; border-right: 3px solid var(--lime); padding-right: 8px; }
[dir=rtl] .steps, [dir=rtl] .errorlist, [dir=rtl] .history, [dir=rtl] .saved { padding-left: 0; padding-right: 22px; }
[dir=rtl] th, [dir=rtl] td, [dir=rtl] .js .filters-toggle { text-align: right; }
[dir=rtl] .num, [dir=rtl] .funnel b { text-align: left; }
[dir=rtl] .chips .count { margin-left: 0; margin-right: 2px; }
[dir=rtl] .opp > .row:first-child:has(.star) { padding-right: 0; padding-left: 50px; }
[dir=rtl] .opp > .row:first-child .star { right: auto; left: 18px; }
@media (max-width: 700px) { [dir=rtl] .opp > .row:first-child .star { left: 16px; } }
@media (min-width: 861px) { [dir=rtl] .language-switch { left: auto; right: 0; } }
@media (max-width: 860px) {
  [dir=rtl] .sidebar { inset: 0 0 0 auto; transform: translateX(100%); }
  [dir=rtl] .sidebar.open { transform: none; }
  [dir=rtl] .menu-toggle { right: auto; left: 12px; }
  [dir=rtl] .language-switch { left: auto; right: 16px; }
}

/* Éditeur mis en page (2026-11-05) : modèles, couleur, police, photo ; feuille A4 de static/css/cv.css. */
.design-panel { border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 12px 10px; }
.design-panel > summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.tpl-choice { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 4px 0 0; }
.tpl-choice legend { margin-bottom: 4px; }
.tpl-card { display: grid; justify-items: center; gap: 4px; cursor: pointer; font-size: 12.5px; }
.tpl-card input { position: absolute; opacity: 0; pointer-events: none; }
.tpl-card:has(input:checked) .tpl-thumb { outline: 2px solid var(--green-700); outline-offset: 2px; }
.tpl-card input:focus-visible + .tpl-thumb { outline: 2px dashed var(--green-700); outline-offset: 2px; }
.tpl-thumb { position: relative; display: block; width: 64px; height: 88px; background: #fff; border: 1px solid #cfd6d3; border-radius: 4px; overflow: hidden; }
.tpl-thumb i { position: absolute; left: 8px; right: 8px; height: 3px; background: #c9d2ce; border-radius: 2px; }
.tpl-thumb i:nth-child(1) { top: 10px; height: 6px; right: 26px; background: #1b2421; }
.tpl-thumb i:nth-child(2) { top: 24px; background: #0f5c4d; height: 2px; }
.tpl-thumb i:nth-child(3) { top: 34px; bottom: 30px; height: auto; background: repeating-linear-gradient(#c9d2ce 0 3px, transparent 3px 8px); }
.tpl-thumb i:nth-child(4) { top: 64px; bottom: 8px; height: auto; background: repeating-linear-gradient(#c9d2ce 0 3px, transparent 3px 8px); }
.tt-moderne i:nth-child(1) { top: 0; left: 0; right: 0; height: 22px; background: #1f4e8c; border-radius: 0; }
.tt-moderne i:nth-child(2) { top: 28px; background: #e7eef8; height: 5px; }
.tt-colonnes::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 21px; background: #e6f1ec; }
.tt-colonnes i { left: 26px; }
.tt-sobre i:nth-child(2) { background: #1b2421; height: 1px; }
.tt-impact i:nth-child(1) { top: 0; left: 0; right: 0; height: 26px; background: #0b0e1a; border-radius: 0; }
.tt-impact i:nth-child(2) { top: 22px; left: 6px; right: 6px; height: 9px; border-radius: 3px;
  background: linear-gradient(to right, #c6ff3d 0 24%, transparent 24% 26%, #fff 26% 49%, transparent 49% 51%, #fff 51% 74%, transparent 74% 76%, #3d2bff 76%); box-shadow: 0 0 0 1px #0b0e1a inset; }
.tt-impact i:nth-child(3) { right: 26px; }
.tt-impact::after { content: ""; position: absolute; right: 6px; top: 36px; width: 16px; height: 30px; background: #f1f2f8; border-radius: 3px; }
.tpl-help { margin: 4px 0 6px; min-height: 1.2em; }
.design-row { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: flex-start; }
.design-row > [hidden] { display: none; }
.design-row select { min-height: 34px; }
.swatches { display: flex; gap: 6px; border: 0; padding: 0; margin: 0; flex-wrap: wrap; }
.swatches legend { margin-bottom: 4px; width: 100%; }
.swatch { width: 26px; height: 26px; border-radius: 50%; cursor: pointer; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border); }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch:has(input:checked) { box-shadow: 0 0 0 2px var(--green-700); }
.swatch:has(input:focus-visible) { outline: 2px dashed var(--green-700); outline-offset: 2px; }
.sw-vert { background: #0f5c4d; } .sw-bleu { background: #1f4e8c; } .sw-electrique { background: #3d2bff; } .sw-bordeaux { background: #7a1f3d; }
.sw-ardoise { background: #334155; } .sw-orange { background: #b45309; } .sw-violet { background: #5b21b6; }
.photo-controls .row { gap: 6px; align-items: center; margin: 2px 0; }
.photo-controls input[type=file] { max-width: 240px; font-size: 13px; }
.photo-controls p { margin: 2px 0 0; max-width: 420px; }
.editor-toolbar select { min-height: 32px; font-size: 13px; max-width: 190px; }
.editor-toolbar .mono { font-family: "JetBrains Mono", monospace; font-size: 12px; }
.editor-toolbar .btn-soft { background: var(--green-100); }
.tb-menu { position: relative; }
.tb-menu > summary { list-style: none; cursor: pointer; }
.tb-menu > summary::-webkit-details-marker { display: none; }
.tb-pop { position: absolute; top: calc(100% + 4px); inset-inline-start: 0; z-index: 5; display: flex; gap: 6px; align-items: center; padding: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); white-space: nowrap; }
.tb-pop.tb-col { flex-direction: column; align-items: stretch; }
.tb-pop .btn.small { min-height: 30px; padding: 3px 9px; font-size: 13px; justify-content: flex-start; text-align: start; }
.tb-pop .dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border); cursor: pointer; padding: 0; }
.tcs-accent { background: #0f5c4d; } .tcs-gris { background: #6b7280; } .tcs-rouge { background: #b91c1c; } .tcs-vert { background: #15803d; }
.tcs-bleu { background: #1d4ed8; } .tcs-orange { background: #c2410c; }
.hls-jaune { background: #fef08a; } .hls-vert { background: #bbf7d0; } .hls-bleu { background: #bfdbfe; } .hls-rose { background: #fbcfe8; }
.tb-a { font-weight: 800; border-bottom: 3px solid #b91c1c; line-height: 1; }
.tb-hl { background: #fef08a; color: #1b2421; padding: 0 3px; border-radius: 2px; }
.find-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px; border: 1px solid var(--border); border-radius: var(--radius); }
.find-bar[hidden] { display: none; }
.find-bar input { min-height: 32px; max-width: 220px; }
.sheet-wrap { overflow-x: auto; padding: 18px 0; background: var(--surface-2, #eef1ef); border-radius: var(--radius); }
.sheet-wrap[hidden], .sheet-note[hidden] { display: none; }
.sheet-wrap .cv-sheet { min-height: 1123px; box-shadow: 0 2px 14px rgba(0, 0, 0, .14); }
.sheet-wrap .cv-sheet::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 1121px, rgba(220, 38, 38, .45) 1121px, rgba(220, 38, 38, .45) 1123px); }
.cv-body { outline: none; min-height: 600px; }
.cv-body:focus-visible { outline: none; }
.sheet-wrap .cv-break { display: block; height: 0; border-top: 2px dashed #94a3b8; margin: 14px -48px; }
.editor-count { margin-inline-start: auto; }
body.editor-fullscreen { overflow: hidden; }
body.editor-fullscreen .editor-form { position: fixed; inset: 0; z-index: 50; margin: 0; border-radius: 0; overflow: auto; background: var(--surface); padding: 10px 16px; }
@media (max-width: 860px) { .sheet-wrap .cv-sheet { width: 794px; max-width: none; } }
.result-sheet { max-height: 900px; overflow: auto; }
.result-sheet .cv-sheet { min-height: 0; }
.result-sheet .cv-sheet::after { display: none; }
.match-table td { vertical-align: top; }
.editor-toolbar, .editor-actions { z-index: 6; }
.tb-pop { z-index: 7; }
body.editor-fullscreen .editor-form { display: block; }
body.editor-fullscreen .editor-form > * + * { margin-top: 10px; }
