/* Temps & Planning → Remplacements (public/js/repl-admin.js) : deux statuts seulement, rouge « À attribuer » et vert « Attribué ».
   « Aucun remplacement nécessaire » reste neutre (gris) : une décision, pas une troisième couleur de statut. */
.repl-views { margin-bottom: 4px; }
.repl-tiles .dash-tile.active { outline: 3px solid var(--honey); outline-offset: 1px; }
.repl-pill { display: inline-block; padding: 3px 9px; border-radius: 999px; font-weight: 700; font-size: .85rem; white-space: nowrap; border: 1px solid transparent; }
.repl-pill.bad { background: var(--bad-bg); color: var(--bad); border-color: var(--bad); }
.repl-pill.ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok); }
.repl-pill.neutral { background: var(--surface-2); color: var(--muted); border-color: var(--line); }
.repl-flag { display: inline-block; margin-left: 6px; font-size: .78rem; font-weight: 700; color: var(--bad); }
.repl-flag.soft { color: var(--muted); font-weight: 600; }
.badge.repl-manual { margin-left: 6px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.repl-alerts { border-left: 6px solid var(--bad); padding: 10px 14px; }
.repl-alerts p { margin: 2px 0; }
.repl-filter-card summary { font-weight: 700; cursor: pointer; }
.repl-filters { margin-top: 10px; }
.repl-table-card { padding: 0; overflow-x: auto; }
.repl-table { width: 100%; border-collapse: collapse; }
.repl-table { font-size: .9rem; }
.repl-table th, .repl-table td { padding: 9px 7px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.repl-ranges span { display: block; white-space: nowrap; }
.repl-table td[data-label="Durée"], .repl-table td[data-label="Date"] { white-space: nowrap; }
.repl-table th { font-size: .82rem; color: var(--muted); font-weight: 700; white-space: nowrap; }
.repl-row.to_assign td:first-child { box-shadow: inset 5px 0 0 var(--bad); }
.repl-row.assigned td:first-child { box-shadow: inset 5px 0 0 var(--ok); }
.repl-row.not_needed { color: var(--muted); }
.repl-cov { display: grid; gap: 3px; min-width: 110px; }
.repl-cov-bar { height: 8px; border-radius: 6px; background: var(--bad-bg); overflow: hidden; }
.repl-cov-fill { display: block; height: 100%; }
.repl-cov-fill.bad { background: var(--bad); }
.repl-cov-fill.ok { background: var(--ok); }
.repl-upcoming { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.repl-dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; }
.repl-dl dt { color: var(--muted); font-weight: 650; }
.repl-dl dd { margin: 0; }
.repl-alert-box { border: 2px solid var(--bad); background: var(--bad-bg); color: var(--bad); border-radius: 12px; padding: 10px 14px; display: grid; gap: 8px; }
.repl-alert-box p { margin: 0; font-weight: 650; }
.repl-remaining { font-weight: 700; color: var(--bad); margin: 0; }
.repl-decision { background: var(--surface-2); border-radius: 10px; padding: 8px 12px; margin: 0; }
.repl-assign { padding: 12px 14px; display: grid; gap: 6px; box-shadow: none; border-left: 5px solid var(--ok); }
.repl-assign p { margin: 0; }
.repl-hours { font-weight: 700; }
.repl-hours.to_review, .repl-hours.contract_check { color: var(--honey-strong); }
.repl-hours.overtime, .repl-hours.complementary, .repl-hours.within_contract, .repl-hours.manual { color: var(--ok); }
.repl-hours-box { border-top: 1px solid var(--line, #e5e5e5); padding-top: .4rem; margin-top: .4rem; }
.repl-hours-box .repl-dl { margin: 0 0 .3rem; }
/* Heures à vérifier : repère neutre (texte souligné de miel), jamais une couleur de statut de couverture. */
.repl-hours-flag { display: inline-block; margin-left: 4px; font-size: .78rem; font-weight: 650; color: var(--honey-strong); }
.repl-pending-btn { border: 1px solid var(--line); background: transparent; color: var(--ink, inherit); font-weight: 650; }
.repl-pending-btn .n { color: var(--honey-strong); margin-left: 4px; }
.repl-pending-list { list-style: none; padding: 0; margin: 0; }
.repl-pending-list li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); }
/* Temps de travail contractuel (fiche RH) */
.badge.ct-ok { background: var(--ok-bg); color: var(--ok); }
.badge.ct-todo { background: var(--warn-bg); color: var(--warn); }
.repl-opti { color: var(--honey-strong); font-weight: 650; }
.repl-opti.done { color: var(--ok); }
.repl-warn-list { margin: 0; padding-left: 18px; color: var(--muted); }
.repl-events { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.repl-cands { display: grid; gap: 6px; }
.repl-cand { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; padding: 8px 12px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; }
.repl-cand > input { grid-row: span 3; width: 20px; height: 20px; min-height: 0; }
.repl-cand.sel { border-color: var(--ok); background: var(--ok-bg); }
.repl-cand.off { opacity: .75; cursor: default; }
.repl-cand.off > input { visibility: hidden; }
.repl-cand-warn { color: var(--honey-strong); font-weight: 650; }
.repl-sched { margin: 0; padding-left: 18px; }
.repl-sched li.repl { font-weight: 700; }
.repl-sched li.brk { color: var(--muted); }
.repl-checks { border-radius: 12px; padding: 10px 14px; }
.repl-checks ul { margin: 4px 0; padding-left: 18px; }
.repl-checks.block { background: var(--bad-bg); color: var(--bad); border: 2px solid var(--bad); }
.repl-checks.warn { background: color-mix(in srgb, var(--honey) 18%, var(--surface)); border: 2px solid var(--honey-strong); }
.repl-infos { margin: 0; padding-left: 18px; }
.repl-times { align-items: end; }
.repl-legacy > summary { font-weight: 700; cursor: pointer; }
/* Planning : créneau « Remplacement — Nom » (non modifiable depuis le planning). */
.pblock.a-repl { border-left-style: double; border-left-width: 6px; }
.badge.repl-chip { background: var(--ok-bg); color: var(--ok); border: 1px solid var(--ok); margin-left: 4px; white-space: nowrap; }
.repl-notice { border-left: 5px solid var(--ok); }

@media (max-width: 760px) {
  .repl-table thead { display: none; }
  .repl-table, .repl-table tbody, .repl-table tr, .repl-table td { display: block; width: 100%; }
  .repl-table tr { border-bottom: 1px solid var(--line); padding: 10px 12px 10px 16px; position: relative; }
  .repl-row.to_assign { box-shadow: inset 5px 0 0 var(--bad); }
  .repl-row.assigned { box-shadow: inset 5px 0 0 var(--ok); }
  .repl-row td:first-child { box-shadow: none !important; }
  .repl-table td { border: 0; padding: 2px 0; display: grid; grid-template-columns: 40% 1fr; gap: 8px; }
  .repl-table td::before { content: attr(data-label); color: var(--muted); font-size: .82rem; font-weight: 650; }
  .repl-table td[data-label="Action"] { grid-template-columns: 1fr; padding-top: 6px; }
  .repl-table td[data-label="Statut"] { align-items: start; }
  .repl-pill { white-space: normal; justify-self: start; }
  .repl-table td[data-label="Action"]::before { display: none; }
  .repl-dl { grid-template-columns: 1fr; gap: 0 0; }
  .repl-dl dd { margin-bottom: 6px; }
}

/* ---- Organisation des remplacements depuis les repos compensatoires (repl-org.js, repl-offers-me.js) ---- */
.repl-st { display: inline-block; padding: 3px 9px; border-radius: 999px; font-weight: 700; font-size: .82rem; line-height: 1.3; border: 1px solid transparent; }
.repl-st.tone-neutral { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
.repl-st.tone-muted { background: var(--surface-2); color: var(--muted); border-color: var(--line); }
.repl-st.tone-bad { background: var(--bad-bg); color: var(--bad); border-color: var(--bad); }
.repl-st.tone-warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn); }
.repl-st.tone-info { background: var(--k-rest-bg); color: var(--k-rest); border-color: var(--k-rest); }
.repl-st.tone-ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok); }
.repl-st.tone-done { background: var(--ok); color: #fff; border-color: var(--ok); }
.repl-sum { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 4px; }
.repl-sum-k { font-weight: 650; font-size: .9rem; }
.repl-sum-day { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.repl-sum-slot.compact .repl-sum-k { display: none; }
.repl-sum-slot.compact .repl-sum { margin-top: 6px; }
.repl-day { border-left: 4px solid var(--line); }
.repl-day.tone-bad { border-left-color: var(--bad); }
.repl-day.tone-warn { border-left-color: var(--warn); }
.repl-day.tone-info { border-left-color: var(--k-rest); }
.repl-day.tone-ok, .repl-day.tone-done { border-left-color: var(--ok); }
.repl-active { background: var(--surface-2); border-radius: 8px; padding: 8px 10px; }
.repl-active p { margin: 2px 0; }
.repl-checks .repl-check { margin: 4px 0; padding: 6px 8px; border-radius: 6px; font-size: .9rem; }
.repl-check.block { background: var(--bad-bg); color: var(--bad); }
.repl-check.warn { background: var(--warn-bg); color: var(--warn); }
.repl-check.info { background: var(--surface-2); color: var(--ink); }
.repl-dur { align-self: end; padding-bottom: 8px; font-weight: 650; }
.repl-mine { border-left: 4px solid var(--line); }
.repl-mine.tone-warn { border-left-color: var(--warn); }
.repl-mine.tone-ok, .repl-mine.tone-done { border-left-color: var(--ok); }
.repl-mine.tone-info { border-left-color: var(--k-rest); }
.repl-answer .btn { min-height: 44px; flex: 1 1 200px; }
.repl-answer-form textarea { min-height: 90px; }
@media (max-width: 640px) {
  .repl-actions { display: flex; flex-direction: column; align-items: stretch; }
  .repl-actions .btn { width: 100%; min-height: 40px; }
  .repl-answer { flex-direction: column; }
}
/* Historique des sollicitations dans la fenêtre d'organisation : tient dans la largeur sans défilement. */
.repl-offer-table { font-size: .88rem; }
.repl-offer-table th, .repl-offer-table td { padding: .45rem .5rem; }
/* Suivi mensuel des remplacements (repl-monthly.js) */
.repl-month-nav { align-items: center; gap: 8px; }
.repl-month-title { margin: 0; min-width: 9.5em; text-align: center; }
.repl-month-nav input[type=month] { width: auto; }
.repl-filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.repl-filters #rm-reset { margin-top: 6px; }
.repl-site { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--site-soft); color: var(--ink, #1f281d); border-left: 4px solid var(--site-c); font-size: .88rem; white-space: nowrap; }
.repl-sites { display: flex; flex-wrap: wrap; gap: 4px; }
.repl-month-table tr[class*=tone-] td:first-child { border-left: 4px solid transparent; }
.repl-month-table tr.tone-ok td:first-child { border-left-color: var(--ok, #2e7d4f); }
.repl-month-table tr.tone-warn td:first-child { border-left-color: var(--warn, #b7791f); }
.repl-month-table tr.tone-bad td:first-child { border-left-color: var(--bad, #b42318); }
.repl-month-table tr.tone-info td:first-child { border-left-color: #2f6fb0; }
.repl-month-table tr.tone-done td:first-child { border-left-color: #535e4e; }
.repl-person-detail > td { background: var(--bg, #f7f6f1); padding: 6px; }
.repl-person-table td:first-child, .repl-site-table td:first-child { white-space: nowrap; }
.repl-person-table th, .repl-site-table th { white-space: normal; }
@media (max-width: 720px) {
  .repl-person-table td, .repl-site-table td { white-space: normal; }
  .repl-month-title { min-width: 0; flex: 1; }
  .repl-person-detail > td { display: block; padding: 0; }
  .repl-person-detail > td::before { content: none; }
}
/* Export PDF du suivi mensuel */
.print-sheet .repl-print { width: 100%; border-collapse: collapse; font-size: 8.5pt; margin-bottom: 4mm; }
.print-sheet .repl-print th, .print-sheet .repl-print td { border: 1px solid #bbb; padding: 1.2mm 1.6mm; text-align: left; vertical-align: top; }
.print-sheet .repl-print th { background: #eef1ea; }
.print-sheet .repl-print-totals { font-size: 9.5pt; margin: 0 0 3mm; }
.print-sheet h2 { font-size: 12pt; margin: 4mm 0 2mm; }
.print-sheet .ps-page + .ps-page { break-before: page; }
