/* ATS Mydral — mise en page propre à l'ATS, construite sur les jetons Mydral UI (tokens.css + mydral-ui.css).
   Aucune couleur en dur : tout passe par les jetons, le thème sombre suit tout seul. */
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body.md-app { display: flex; flex-direction: column; min-height: 100vh; }
.page { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: var(--space-6) var(--space-4) 48px; }
.page.wide { max-width: none; }
h1 { margin: 0; font: 700 30px/1.2 var(--font-sans); color: var(--heading); }
h2, h3 { color: var(--heading); }
.muted { color: var(--muted); } .small { font-size: 13px; } .mono { font-family: var(--font-mono); font-size: 13px; }
.grow { flex: 1; min-width: 0; } .spacer { flex: 1; } .right { margin-left: auto; }
.row { display: flex; align-items: center; gap: var(--space-3); } .gap { gap: var(--space-2); } .wrap { flex-wrap: wrap; }
.stack > * + * { margin-top: var(--space-5); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); margin-top: var(--space-5); }
.grid2 > .md-card, .grid2 > div > .md-card + .md-card { margin: 0; }
.grid2 > div { display: flex; flex-direction: column; gap: var(--space-5); }
.md-card + .md-card, .md-card + .grid2, .grid2 + .md-card { margin-top: var(--space-5); }
.grid2 > .md-card.md-card, .grid2 > div > .md-card.md-card { margin-top: 0; }

/* ---------- en-tête : logo clair / sombre, menu utilisateur */
.md-brand .logo-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .md-brand .logo-light { display: none; } :root:not([data-theme="light"]) .md-brand .logo-dark { display: block; } }
:root[data-theme="dark"] .md-brand .logo-light { display: none; }
:root[data-theme="dark"] .md-brand .logo-dark { display: block; }
.md-header .md-nav { margin-right: auto; }
.who { display: flex; align-items: center; gap: var(--space-3); }
.usermenu { position: relative; }
.usermenu summary { list-style: none; display: flex; align-items: center; gap: var(--space-2); cursor: pointer; padding: 4px 8px; border-radius: var(--radius-pill); color: var(--ink); }
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu summary:hover { background: var(--mist); }
.usermenu .menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; background: var(--surface); border-radius: var(--radius-md);
  box-shadow: var(--shadow-pop); padding: 8px; display: flex; flex-direction: column; z-index: 30; }
.usermenu .menu > div { padding: 6px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.usermenu .menu a { color: var(--ink); padding: 8px 10px; border-radius: var(--radius-sm); font-weight: 700; }
.usermenu .menu a:hover { background: var(--mist); text-decoration: none; }
.avatar { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--mist); color: var(--heading); font: 700 12px/1 var(--font-sans); }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; } .avatar.lg { width: 60px; height: 60px; font-size: 20px; }

/* ---------- barre d'outils de page */
.toolbar { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.sub { color: var(--muted); margin: 6px 0 var(--space-5); }
.filters { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }
.filters .md-input, .filters .md-select { background: var(--surface); padding: 8px 12px; font-size: 14px; }
.filters input[type=search] { min-width: 240px; }
.md-input, .md-select, textarea.md-input { width: 100%; }
.filters .md-input, .filters .md-select, .inline .md-input { width: auto; }
textarea.md-input { resize: vertical; min-height: 84px; }
.inline { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 8px 14px; margin: 0 0 var(--space-3); }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.err-text { color: var(--bad); }
.stars { color: var(--heading); letter-spacing: 1px; white-space: nowrap; }
.md-table tbody tr.link { cursor: pointer; } .md-table tbody tr.link:hover td { background: var(--mist); }
.md-table td { white-space: normal; }
tr.inactive td { opacity: .55; }
.actions-cell > div { display: flex; gap: var(--space-2); justify-content: flex-end; }
.stage-dot { --c: var(--muted); display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; color: var(--ink); }
.stage-dot::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }

/* ---------- pipeline (kanban) */
.board { display: flex; gap: var(--space-3); overflow-x: auto; padding-bottom: var(--space-3); align-items: flex-start; }
.col { flex: 0 0 276px; background: var(--mist); border-radius: var(--radius-lg); display: flex; flex-direction: column; max-height: calc(100vh - 230px); }
.col > header { --c: var(--muted); display: flex; align-items: center; gap: 8px; padding: 12px 14px 10px; font-weight: 700; color: var(--heading);
  border-top: 4px solid var(--c); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.col .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.col .count { margin-left: auto; background: var(--surface); border-radius: var(--radius-pill); padding: 0 9px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cards { padding: 0 8px 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 64px; }
.col.over { outline: 2px dashed var(--heading); outline-offset: -2px; }
.card { display: block; background: var(--surface); border-radius: var(--radius-md); padding: 11px 12px; box-shadow: var(--shadow-card); color: var(--ink); cursor: grab; border: 1px solid transparent; }
.md-app a.card:hover { border-color: var(--line); text-decoration: none; }
.card.dragging { opacity: .4; }
.card .name { font-weight: 700; color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .headline { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .job { margin-top: 8px; color: var(--ink); background: var(--mist); border-radius: var(--radius-sm); padding: 3px 7px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .meta > * { white-space: nowrap; }
.card .meta { display: flex; flex-wrap: wrap; row-gap: 4px; gap: 8px; align-items: center; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.card .meta .md-chip { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.empty { color: var(--muted); font-size: 13px; text-align: center; padding: 16px 0; }
.dropzones { display: flex; flex-direction: column; gap: var(--space-3); flex: 0 0 150px; }
.col.zone { flex: none; border: 2px dashed var(--c); background: transparent; }
.col.zone .cards { padding: 18px 10px; text-align: center; color: var(--muted); font-size: 13px; min-height: 0; }

/* ---------- fiche candidature */
.head { display: flex; gap: var(--space-4); align-items: center; }
.head h1 { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 26px; }
.contact { display: flex; gap: var(--space-4); margin-top: 6px; flex-wrap: wrap; }
.stagebox { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.stagebox .md-select { min-width: 220px; font-weight: 700; border-width: 2px; }
.rating { display: flex; }
.rating button { border: 0; background: none; font-size: 24px; color: var(--line); cursor: pointer; padding: 0 1px; line-height: 1; }
.rating button.on { color: var(--heading); }
.rating button:focus-visible { outline: 2px solid var(--link); border-radius: 4px; }
blockquote { margin: 0; padding: 10px 14px; background: var(--mist); border-radius: var(--radius-md); white-space: pre-wrap; }
iframe.cv { width: 100%; height: 480px; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 10px; background: #fff; }
.docs { list-style: none; padding: 0; margin: 0 0 12px; } .docs li { display: flex; gap: 10px; align-items: baseline; padding: 4px 0; flex-wrap: wrap; }
.note-form { display: grid; gap: var(--space-2); justify-items: end; margin-bottom: var(--space-4); }
.note { border-top: 1px solid var(--line); padding: 10px 0; } .note .body { white-space: pre-wrap; margin-top: 4px; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 5px 0 5px 16px; border-left: 2px solid var(--line); position: relative; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 11px; width: 10px; height: 10px; border-radius: 50%; background: var(--violet); }

/* ---------- offres */
.jobs { display: grid; gap: var(--space-3); }
.job-card .md-card__title { margin-bottom: 4px; }
.big { font: 700 28px/1.15 var(--font-sans); color: var(--heading); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.big span { font: 400 13px var(--font-sans); color: var(--muted); }
.bar { display: flex; height: 22px; border-radius: var(--radius-sm); overflow: hidden; margin-top: 14px; gap: 2px; }
.bar span { color: var(--on-dark); font: 700 11px/22px var(--font-sans); text-align: center; min-width: 18px; text-shadow: 0 0 2px rgba(0,0,0,.45); }
.legend { display: flex; gap: var(--space-2) var(--space-4); flex-wrap: wrap; align-items: center; margin: 0 0 var(--space-4); color: var(--muted); font-size: 13px; }
.legend-title { font-weight: 700; color: var(--ink); }
.jobs > .md-card.md-card { margin-top: 0; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: middle; }

/* ---------- tableau de bord */
.md-hero { margin-bottom: var(--space-5); }
.md-hero .hero-top { display: flex; gap: var(--space-4); justify-content: space-between; align-items: flex-start; flex-wrap: wrap; }
.md-hero .md-seg button { background: transparent; color: var(--on-dark); border-color: rgba(255,255,255,.35); }
.md-hero .md-seg button[aria-pressed="true"] { background: var(--on-dark); color: #062B6F; border-color: var(--on-dark); }
.md-hero .md-select { background: rgba(255,255,255,.08); color: var(--on-dark); border-color: rgba(255,255,255,.35); max-width: 320px; }
.md-hero .md-select option { color: #30343B; }
.md-hero .md-kpis { margin-top: 20px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.md-hero .md-kpi a { color: var(--on-dark); text-decoration: underline; }
.kpi-warn .md-kpi__value { color: var(--charter-yellow); }
.funnel { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.f-row { display: grid; grid-template-columns: 170px 1fr 104px 80px 104px 104px; gap: var(--space-3); align-items: center; padding: 7px 6px; border-radius: var(--radius-sm); }
.f-row:not(.f-head):hover, .f-row:focus { background: var(--mist); outline: none; }
.f-head { font: 700 12.5px/1.4 var(--font-sans); color: var(--muted); text-transform: uppercase; letter-spacing: .03em; border-bottom: 1px solid var(--line); border-radius: 0; }
.f-label { color: var(--heading); font-weight: 700; }
.f-barcol { display: flex; align-items: center; gap: 10px; min-width: 0; }
.f-head .f-barcol { display: block; }
.f-bar { display: block; height: 22px; background: var(--series-1); border-radius: 4px; flex: none; }
.f-val { white-space: nowrap; font-variant-numeric: tabular-nums; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.weekly { display: grid; grid-template-columns: 28px 1fr; gap: 6px; height: 210px; }
.w-grid { display: flex; flex-direction: column; justify-content: space-between; font-size: 11px; color: var(--tick); text-align: right; padding-bottom: 18px; }
.w-bars { display: flex; align-items: stretch; gap: 3px; border-bottom: 1px solid var(--axis); position: relative;
  background: linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 100% calc((100% - 18px) / 2) no-repeat,
              linear-gradient(var(--grid) 1px, transparent 1px) 0 calc((100% - 18px) / 2) / 100% 1px no-repeat; }
.w-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; position: relative; padding-bottom: 18px; outline: none; }
.w-bar { display: block; width: 100%; max-width: 26px; background: var(--series-1); border-radius: 4px 4px 0 0; }
.w-col:hover .w-bar, .w-col:focus .w-bar { filter: brightness(.85); }
.w-x { position: absolute; bottom: 0; font-size: 10.5px; color: var(--tick); white-space: nowrap; }
.hbar { display: grid; grid-template-columns: 170px 1fr 40px; gap: 10px; align-items: center; padding: 5px 0; outline: none; }
.hbar .track { background: var(--mist); border-radius: 4px; height: 12px; overflow: hidden; }
.hbar .track i { display: block; height: 100%; background: var(--series-1); border-radius: 4px; }
.hbar:hover .track i, .hbar:focus .track i { filter: brightness(.85); }
.hbar .n { text-align: right; font-weight: 700; color: var(--heading); font-variant-numeric: tabular-nums; }
.tip { position: fixed; z-index: 50; pointer-events: none; background: var(--surface); color: var(--ink); font-size: 13px; padding: 8px 11px;
  border-radius: var(--radius-sm); box-shadow: var(--shadow-pop); max-width: 280px; }
.tip-title { font-weight: 700; color: var(--heading); margin-bottom: 2px; }

/* ---------- connexion, compte, utilisateurs */
.auth-box { max-width: 440px; margin: 40px auto; }
.auth-box.wide-box { max-width: 580px; }
.auth-box h1 { font-size: 26px; margin-bottom: 4px; }
.md-flash, .md-note, .md-error { margin: 12px 0; }
.md-flash.ok { background: var(--ok-bg); color: var(--ok); }
code.secret { font: 700 15px var(--font-mono); background: var(--surface); color: var(--heading); padding: 2px 8px; border-radius: 6px; user-select: all; }
.users-grid { grid-template-columns: 1fr 2fr; }
.demo-purge { margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid var(--line); }

/* ---------- fenêtres */
dialog { border: 0; border-radius: var(--radius-lg); padding: 24px; width: min(540px, 92vw); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-pop); }
dialog::backdrop { background: rgba(6, 22, 51, .55); }
dialog h3 { margin: 0 0 6px; font: 700 19px/1.3 var(--font-sans); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.actions { display: flex; justify-content: flex-end; gap: var(--space-2); margin-top: var(--space-3); }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 60; }

@media (max-width: 860px) {
  .grid2, .users-grid { grid-template-columns: 1fr; }
  .md-header { padding: 12px 16px 10px; }
  .md-brand img { height: 34px; }
  .who b { display: none; }
  .head { flex-wrap: wrap; } .stagebox { align-items: flex-start; }
  .filters, .toolbar .filters { width: 100%; }
  .filters .md-input, .filters .md-select, .filters input[type=search] { width: 100%; min-width: 0; flex: 1 1 100%; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; } .kv dd { margin-bottom: 8px; }
  .f-row { grid-template-columns: 100px 1fr 62px; gap: 8px; } .f-row > :nth-child(n+4) { display: none; } .f-val .muted { display: none; }
  .hbar { grid-template-columns: 110px 1fr 32px; }
  .md-hero__title { font-size: 28px; }
  .md-card { overflow-x: auto; }
  .two { grid-template-columns: 1fr; }
}

/* Version PHP : code de vérification, séparateur */
.code-input{font-size:1.5rem;letter-spacing:.35em;text-align:center;max-width:12ch}
hr.sep{border:0;border-top:1px solid var(--line, #E1E4EA);margin:var(--space-5, 24px) 0 var(--space-4, 16px)}
