/* hr-interviews : styles propres à RH → Fiches salariés et à la fenêtre d'un entretien (chargé après style.css).
   Couleurs vives réservées au sens : rouge = retard, orange = à programmer / à venir, vert = réalisé ; gris = annulé. */

/* ---------- liste des salariés ---------- */
.hp-head .btn { flex: 0 0 auto; }
.hp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.hp-card { display: grid; gap: 4px; text-align: left; align-content: start; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-left: 6px solid var(--alert-green);
  border-radius: 14px; padding: 12px 14px; font: inherit; cursor: pointer; min-width: 0; }
.hp-card:hover { background: var(--surface-2); }
.hp-card.hp-red { border-left-color: var(--alert-red); }
.hp-card.hp-orange { border-left-color: var(--alert-orange); }
.hp-card > span { display: block; min-width: 0; overflow-wrap: anywhere; }
.hp-card-top { display: flex !important; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.hp-card-top strong { font-size: 1.05rem; }
.hp-line { font-size: .9rem; }
.hp-next { font-weight: 650; }
.hp-next-red { color: var(--bad); }
.hp-next-orange { color: var(--warn); }
.hp-next-green { color: var(--ink); }

/* ---------- fiche : bandeau ---------- */
.hp-back { padding-left: 0; text-decoration: none; font-weight: 650; }
.hp-banner { border-left: 6px solid var(--alert-green); }
.hp-banner.hp-red { border-left-color: var(--alert-red); }
.hp-banner.hp-orange { border-left-color: var(--alert-orange); }
.hp-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px 16px; margin: 0; }
.hp-facts dt { color: var(--muted); font-size: .85rem; font-weight: 600; }
.hp-facts dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.hp-next-box { margin: 0; background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.hp-next-box.hp-next-red { background: var(--bad-bg); color: var(--bad); }
.hp-next-box.hp-next-orange { background: var(--warn-bg); color: var(--warn); }
.hp-main-btn { min-height: 52px; font-size: 1.05rem; }

/* ---------- chronologie verticale ---------- */
.hp-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.hp-timeline::before { content: ""; position: absolute; left: 13px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.hp-year { position: relative; margin: 10px 0 2px 40px; font-size: .8rem; font-weight: 800; letter-spacing: .08em; color: var(--muted); }
.hp-tl { position: relative; display: flex; align-items: center; gap: 12px; padding: 6px 0; flex-wrap: wrap; }
.hp-dot { position: relative; flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .85rem; font-weight: 800;
  background: var(--surface); border: 2px solid var(--line); color: var(--muted); }
.hp-tl-main { display: grid; gap: 0; min-width: 0; flex: 1 1 200px; text-align: left; }
.hp-tl-btn { flex: 1 1 200px; min-width: 0; background: none; border: 0; padding: 4px 6px; margin: -4px -6px; font: inherit; color: inherit; text-align: left; cursor: pointer; border-radius: 10px; }
.hp-tl-btn:hover { background: var(--surface-2); }
.hp-tl-btn .hp-tl-main { flex: none; }
.hp-tl-date { font-weight: 700; font-variant-numeric: tabular-nums; }
.hp-tl-label { overflow-wrap: anywhere; }
.hp-tl-state { font-size: .8rem; font-weight: 700; }
.hp-tl.st-done .hp-dot { border-color: var(--alert-green); background: color-mix(in srgb, var(--alert-green) 14%, var(--surface)); color: var(--ok); }
.hp-tl.st-done .hp-tl-state { color: var(--ok); }
.hp-tl.st-upcoming .hp-dot { border-color: var(--alert-orange); background: color-mix(in srgb, var(--alert-orange) 14%, var(--surface)); color: var(--warn); }
.hp-tl.st-upcoming .hp-tl-state { color: var(--warn); }
.hp-tl.st-late .hp-dot { border-color: var(--alert-red); background: var(--bad-bg); color: var(--bad); }
.hp-tl.st-late .hp-tl-state, .hp-tl.st-late .hp-tl-date { color: var(--bad); }
.hp-tl.st-cancelled { opacity: .6; }
.hp-tl.st-cancelled .hp-tl-label, .hp-tl.st-cancelled .hp-tl-date { text-decoration: line-through; }
.hp-tl.st-info .hp-tl-label { color: var(--muted); }

/* ---------- historique : volets dépliables ---------- */
.hp-iv { background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--alert-green); border-radius: 14px; padding: 0 14px; }
.hp-iv.st-upcoming { border-left-color: var(--alert-orange); }
.hp-iv.st-late { border-left-color: var(--alert-red); }
.hp-iv.st-cancelled { border-left-color: var(--line-strong, var(--line)); background: var(--surface-2); }
.hp-iv > summary { list-style: none; cursor: pointer; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; min-height: 52px; padding: 8px 0; }
.hp-iv > summary::-webkit-details-marker { display: none; }
.hp-iv > summary::before { content: "▸"; color: var(--muted); font-size: .9rem; width: 1em; flex: none; }
.hp-iv[open] > summary::before { content: "▾"; }
.hp-iv-date { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 650; }
.hp-iv.st-cancelled > summary strong { text-decoration: line-through; }
.hp-iv-body { padding: 4px 0 14px; }
.hp-fields { display: grid; gap: 10px; margin: 0; }
.hp-fields dt { color: var(--muted); font-size: .85rem; font-weight: 700; }
.hp-fields dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.hp-iv-actions { gap: 8px; }

/* ---------- fenêtre d'un entretien ---------- */
.hp-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.hp-shortcuts { gap: 8px; margin-top: 8px; }
.hp-form h3 { font-size: 1rem; }
@media (max-width: 520px) {
  .hp-grid-3 { grid-template-columns: 1fr 1fr; }
  .hp-grid-3 .field:first-child { grid-column: 1 / -1; }
  .hp-head .btn { flex: 1 1 100%; }
  .hp-main-btn { width: 100%; }
  .hp-iv { padding: 0 10px; }
}
@media print { .hp-main-btn, .hp-iv-actions, .hp-back { display: none; } }
