/* ==========================================================================
   Espace RH
   ========================================================================== */
.hr { max-width: 1320px; }
.hr-pane { display: flex; flex-direction: column; }

.hr-hero { display: flex; flex-direction: column; gap: 22px; max-width: 1180px; margin-bottom: var(--section); }
.hr-hero .title-hero { max-width: 22ch; }
.hr-hero .title-hero { font-size: clamp(40px, 4.6vw, 88px); }
.hr-hero .lead { max-width: 36ch; }
.hr-hero .lead .belt { vertical-align: 0.1em; margin: 0 2px; }
.hr-hero--center { max-width: none; align-items: center; text-align: center; margin-bottom: clamp(48px, 8vh, 96px); }
.hr-hero--center .title-hero { max-width: none; }
.hr-hero--center .lead { max-width: 40ch; }

.hr-cap { display: flex; flex-direction: column; gap: 14px; margin-bottom: clamp(36px, 6vh, 64px); max-width: 62ch; }
.hr-cap .muted { font-size: var(--fs-md); }

/* Info-bulle partagée (survol / focus) */
.hr-tip {
  position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translate(-50%, 4px);
  padding: 8px 12px; border-radius: 10px; background: #1D1D1F; color: #fff;
  font-size: var(--fs-xs); font-weight: 500; white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity 160ms var(--ease), transform 200ms var(--ease); z-index: 5;
}
*:hover > .hr-tip, *:focus-visible > .hr-tip { opacity: 1; transform: translate(-50%, 0); }

/* -------------------------------------------------------------- Frise */
.hr-scale { margin: 0 0 var(--section); }
.hr-scale__plot { position: relative; padding-top: 8px; }
.hr-scale__dots { position: relative; height: 150px; }
.hr-dot {
  --row: 0;
  position: absolute; bottom: calc(14px + var(--row) * 24px); transform: translateX(-50%);
  width: 22px; height: 22px; display: grid; place-items: center; outline: none;
}
.hr-dot i { width: 18px; height: 18px; border-radius: 50%; box-shadow: 0 0 0 2px var(--bg); opacity: 0.55; transition: opacity 200ms var(--ease), transform 200ms var(--ease); }
.hr-dot:hover i, .hr-dot:focus-visible i { opacity: 1; transform: scale(1.25); }
.hr-dot.is-me { width: 52px; height: 52px; bottom: 14px; z-index: 3; }
.hr-dot.is-me .clogo { box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px var(--team-a); }
.hr-scale__me {
  position: absolute; bottom: 88px; transform: translateX(-50%);
  font-size: var(--fs-md); font-weight: 700; color: var(--text); white-space: nowrap; letter-spacing: -0.02em;
}
.hr-scale__track { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; }
.hr-band { display: flex; flex-direction: column; gap: 12px; }
.hr-band::before { content: ''; display: block; height: 8px; border-radius: 4px; background: var(--b); opacity: 0.85; }
.hr-band:first-child::before { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1); }
.hr-band b { font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); }
.hr-scale__note { margin-top: 28px; font-size: var(--fs-sm); }

/* -------------------------------------------- Compétences (dumbbell) */
.hr-skills { margin-bottom: var(--section); }
.hr-verdict b { color: var(--text); font-weight: 600; }
.hr-legend { display: flex; flex-wrap: wrap; gap: 28px; margin-bottom: 24px; font-size: var(--fs-sm); color: var(--text-2); }
.hr-legend span { display: inline-flex; align-items: center; gap: 10px; }
.k { display: inline-block; flex: none; }
.k--me { width: 14px; height: 14px; border-radius: 50%; background: var(--team-a); }
.k--avg { width: 12px; height: 12px; border-radius: 50%; background: #AEAEB2; }
.k--best { width: 3px; height: 16px; border-radius: 2px; background: var(--text); }

.hr-dumb { display: flex; flex-direction: column; }
.hr-dumb__row {
  display: grid; grid-template-columns: minmax(220px, 300px) 1fr 120px; align-items: center; gap: clamp(20px, 3vw, 48px);
  padding: 22px 0; border-top: 1px solid var(--line);
}
.hr-dumb__row--ticks { border-top: 0; padding: 4px 0 0; }
.hr-dumb__label { display: flex; flex-direction: column; gap: 4px; }
.hr-dumb__label b { font-size: var(--fs-md); font-weight: 600; letter-spacing: -0.015em; }
.hr-dumb__label span { font-size: var(--fs-xs); }
.hr-dumb__plot { position: relative; height: 28px; }
.hr-dumb__axis { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line); }
.hr-dumb__span { position: absolute; top: 50%; height: 2px; margin-top: -1px; background: color-mix(in srgb, var(--team-a) 35%, transparent); border-radius: 1px; }
.m { position: absolute; top: 50%; transform: translate(-50%, -50%); outline: none; }
.m::before { content: ''; display: block; }
.m--avg::before { width: 12px; height: 12px; border-radius: 50%; background: #AEAEB2; box-shadow: 0 0 0 2px var(--bg); }
.m--best::before { width: 3px; height: 22px; border-radius: 2px; background: var(--text); }
.m--me { z-index: 2; }
.m--me::before { width: 16px; height: 16px; border-radius: 50%; background: var(--team-a); box-shadow: 0 0 0 3px var(--bg); }
.m::after { content: ''; position: absolute; inset: -10px; }   /* zone de survol plus grande que la marque */
.hr-dumb__value { display: flex; align-items: center; justify-content: flex-end; gap: 12px; font-size: var(--fs-sm); font-weight: 600; }
.hr-good { color: var(--win); }
.hr-grid-line { position: absolute; top: -6px; bottom: -6px; width: 1px; background: var(--line); }
.hr-tick { position: absolute; top: 0; transform: translateX(-50%); font-size: var(--fs-xs); font-weight: 600; color: var(--text-3); }

/* --------------------------------------------------------- Chiffres */
.hr-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: var(--section); }
.hr-kpi { padding: clamp(32px, 4vw, 56px); display: flex; flex-direction: column; gap: 10px; }
.hr-kpi__label { font-size: var(--fs-md); font-weight: 600; }
.hr-kpi__value { font-size: clamp(72px, 8vw, 150px); color: var(--team-a); margin: 8px 0 4px; }
.hr-kpi__sub { font-size: var(--fs-md); color: var(--text-2); }
.hr-kpi__sub b { color: var(--text); font-weight: 600; }
.hr-strip { display: flex; align-items: flex-end; gap: 2px; height: 56px; margin-top: 28px; }
.hr-strip span { flex: 1; min-height: 4px; border-radius: 4px 4px 0 0; background: #D1D1D6; }
.hr-strip span.is-me { background: var(--team-a); }

.hr-next { display: flex; flex-direction: column; align-items: center; gap: 32px; text-align: center; padding-bottom: 40px; }

/* ------------------------------------------------- Défi (viralité) */
.hr-cta { margin-bottom: var(--section); }

/* ------------------------------------------- Préparation du duel */
.hr-step { display: flex; align-items: flex-start; gap: 22px; margin: 0 0 28px; }
.hr-step + .hr-grid, .hr-skillpick + .hr-step { margin-top: 0; }
.hr-skillpick + .hr-step { margin-top: clamp(64px, 10vh, 120px); }
.hr-step__n {
  flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--text); color: var(--bg); font-weight: 700; font-size: var(--fs-md); margin-top: 4px;
}
.hr-step .muted { margin-top: 8px; }
.hr-skillpick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.hr-skillpick.is-shake { animation: hr-shake 420ms var(--ease); }
.hr-skill {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left;
  padding: 28px 64px 26px 28px; border-radius: 24px; background: var(--bg-alt);
  transition: background 300ms var(--ease), box-shadow 300ms var(--ease), transform 300ms var(--ease);
}
.hr-skill:hover { transform: translateY(-2px); }
.hr-skill b { font-size: var(--fs-lg); font-weight: 700; letter-spacing: -0.025em; }
.hr-skill span:not(.hr-co__check) { font-size: var(--fs-sm); color: var(--text-2); }
.hr-skill .hr-co__check { top: 24px; right: 22px; }
.hr-skill.is-on { background: var(--bg-raised); box-shadow: inset 0 0 0 2px var(--team-a), var(--shadow); }
.hr-skill.is-on .hr-co__check { background: var(--team-a); color: #fff; box-shadow: none; transform: scale(1.08); }

/* ------------------------------------------------------ Adversaires */
.hr-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; padding-bottom: 140px; }
.hr-co {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center;
  padding: 30px 16px 24px; border-radius: 24px; background: var(--bg-alt);
  transition: background 300ms var(--ease), box-shadow 300ms var(--ease), transform 300ms var(--ease);
}
.hr-co:hover { transform: translateY(-2px); }
.hr-co.is-on { background: var(--bg-raised); box-shadow: inset 0 0 0 2px var(--team-a), var(--shadow); }
.hr-co__check {
  position: absolute; top: 14px; right: 14px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; color: transparent; box-shadow: inset 0 0 0 1.5px var(--line-strong);
  transition: background 260ms var(--ease), color 260ms var(--ease), transform 360ms var(--ease-spring);
}
.hr-co__check svg { width: 16px; height: 16px; }
.hr-co.is-on .hr-co__check { background: var(--team-a); color: #fff; box-shadow: none; transform: scale(1.08); }
.hr-co__name { font-size: var(--fs-md); font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; }
.hr-co__meta { display: flex; align-items: center; gap: 10px; font-size: var(--fs-xs); color: var(--text-2); }
.hr-co__meta .belt { background: var(--bg); }
.hr-co.is-on .hr-co__meta .belt { background: var(--bg-alt); }

.hr-bar {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 30;
  display: flex; align-items: center; gap: 20px; padding: 8px 8px 8px 30px; border-radius: 999px;
  background: var(--glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--line);
}
.hr-count { font-size: var(--fs-lg); font-weight: 500; color: var(--text-3); }
.hr-count b { font-weight: 700; color: var(--text); }
.hr-count.is-full b { color: var(--team-a); }
.hr-count.is-shake { animation: hr-shake 420ms var(--ease); }
.hr-bar__hint { font-size: var(--fs-sm); color: var(--text-2); min-width: 6em; max-width: 34ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hr-bar .btn.is-off { opacity: 0.3; pointer-events: none; }
@keyframes hr-shake { 0%, 100% { transform: none; } 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }

/* ---------------------------------------------------------- Équipes */
.hr-map { display: flex; flex-direction: column; gap: 6px; }
.hr-map__row { display: grid; grid-template-columns: minmax(170px, 230px) repeat(var(--n), 1fr); gap: 6px; align-items: stretch; }
.hr-map__row--head { margin-bottom: 8px; }
.hr-map__col { font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); text-align: center; align-self: end; line-height: 1.2; }
.hr-map__svc { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding-right: 12px; }
.hr-map__svc b { font-size: var(--fs-md); font-weight: 600; letter-spacing: -0.015em; }
.hr-map__svc span { font-size: var(--fs-xs); }
.hr-cell {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; height: 68px; border-radius: 16px;
  background: color-mix(in srgb, var(--c) 16%, var(--bg));
}
.hr-cell i { width: 14px; height: 5px; border-radius: 2px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); }
.hr-cell__lvl { font-size: var(--fs-lg); font-weight: 700; letter-spacing: -0.03em; }
.hr-cell__gain { font-size: var(--fs-xs); font-weight: 600; color: var(--win); }

/* ------------------------------------- Conseils pour le prochain duel */
.hr-advice { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 20px; max-width: calc(var(--n, 3) * 460px); margin: 0 auto; }
.hr-adv { padding: clamp(28px, 3vw, 48px); display: flex; flex-direction: column; gap: 10px; }
.hr-adv__tag { font-size: var(--fs-sm); font-weight: 600; color: var(--team-a); }
.hr-adv__big { font-size: clamp(64px, 6vw, 110px); margin: 10px 0 18px; }
.hr-adv__title { font-size: var(--fs-lg); font-weight: 700; letter-spacing: -0.025em; line-height: 1.2; }
.hr-adv__text { font-size: var(--fs-md); color: var(--text-2); line-height: 1.45; flex: 1; }
.hr-adv__btn { align-self: flex-start; margin-top: 22px; }
.hr-advice__more { text-align: center; margin-top: 48px; }

@media (max-width: 1100px) {
  .hr-grid { grid-template-columns: repeat(3, 1fr); }
  .hr-kpis, .hr-advice { grid-template-columns: 1fr; }
  .hr-skillpick { grid-template-columns: repeat(2, 1fr); }
  .hr-dumb__row { grid-template-columns: 1fr 100px; }
  .hr-dumb__label { grid-column: 1 / -1; }
  .hr-map { overflow-x: auto; }
  .hr-map__row { min-width: 820px; }
}
@media (max-width: 640px) {
  .hr-grid { grid-template-columns: repeat(2, 1fr); }
  .hr-skillpick { grid-template-columns: 1fr; }
  .hr-bar { padding-left: 20px; gap: 12px; }
  .hr-bar__hint { display: none; }
}

/* ---------- S'inspirer des meilleurs (bloc qui s'ouvre) ---------- */
.hr-inspire { margin-top: clamp(40px, 6vh, 64px); padding: 0; overflow: hidden; }
.hr-inspire__head, .hr-sk__line {
  width: 100%; display: flex; align-items: center; gap: 20px; text-align: left; cursor: pointer;
}
.hr-inspire__head { padding: 28px 32px; }
.hr-inspire__titles { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.hr-inspire__titles b { font-size: var(--fs-lg); font-weight: 700; letter-spacing: -0.025em; }
.hr-inspire__titles small { font-size: var(--fs-md); color: var(--text-2); }
.hr-inspire__chev {
  flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--bg-raised); position: relative;
  transition: transform 400ms var(--ease);
}
.hr-inspire__chev::before {
  content: ''; position: absolute; left: 50%; top: 45%; width: 9px; height: 9px;
  border-right: 2px solid var(--text); border-bottom: 2px solid var(--text); transform: translate(-50%, -50%) rotate(45deg);
}
.is-open > button .hr-inspire__chev { transform: rotate(180deg); }
/* ouverture fluide : la hauteur passe de 0 à auto via grid */
.hr-inspire__body, .hr-sk__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 600ms var(--ease); }
.is-open > .hr-inspire__body, .is-open > .hr-sk__body { grid-template-rows: 1fr; }
.hr-inspire__inner, .hr-sk__inner { overflow: hidden; }
.hr-inspire__inner { padding: 0 32px; }
.is-open .hr-inspire__inner { padding-bottom: 36px; }
.hr-inspire__kicker { font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); margin: 12px 0 16px; }
.hr-habits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px; }
.hr-habit { background: var(--bg-raised); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.hr-habit .display { font-size: clamp(36px, 3.4vw, 56px); color: var(--team-a); }
.hr-habit p { font-size: var(--fs-md); color: var(--text-2); line-height: 1.4; }
.hr-plan { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hr-plan li { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 18px; padding: 18px 20px; border-radius: var(--radius); background: var(--bg-raised); transition: box-shadow 300ms var(--ease); }
.hr-plan li.is-on { box-shadow: inset 0 0 0 2px var(--team-a); }
.hr-plan__n { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--team-a-soft); color: var(--team-a); }
.hr-plan b { font-size: var(--fs-md); font-weight: 700; letter-spacing: -0.015em; }
.hr-plan p { font-size: var(--fs-sm); color: var(--text-2); margin-top: 4px; }
.hr-plan__send { display: flex; align-items: center; gap: 20px; margin-top: 24px; flex-wrap: wrap; }

/* ---------- Compétence par compétence, en clair ---------- */
.hr-sk { list-style: none; margin: 0; padding: 0; }
.hr-sk__row { border-top: 1px solid var(--line); }
.hr-sk__row:last-child { border-bottom: 1px solid var(--line); }
.hr-sk__line { padding: 22px 0; display: grid; grid-template-columns: minmax(200px, 1.1fr) 1.4fr minmax(220px, auto) 36px; gap: 28px; }
.hr-sk__name { display: flex; flex-direction: column; gap: 4px; }
.hr-sk__name b { font-size: var(--fs-md); font-weight: 700; letter-spacing: -0.015em; }
.hr-sk__name small { font-size: var(--fs-sm); color: var(--text-3); }
.hr-sk__bar { position: relative; height: 12px; border-radius: 999px; background: var(--bg-sunken); }
.hr-sk__fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--team-a); }
.hr-sk__avg { position: absolute; top: -6px; bottom: -6px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--text); }
.hr-sk__val { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hr-sk__val b { font-size: var(--fs-lg); font-weight: 700; letter-spacing: -0.02em; }
.hr-sk__val b small { font-size: var(--fs-sm); font-weight: 500; color: var(--text-3); }
.hr-sk__val > small { flex-basis: 100%; font-size: var(--fs-sm); }
.hr-sk__inner { padding: 0 0 0 0; }
.is-open .hr-sk__inner { padding: 4px 0 28px; }
.hr-sk__inner p { font-size: var(--fs-md); color: var(--text-2); max-width: 70ch; }
.hr-sk__inner p b { color: var(--text); }
.hr-sk__tip { margin: 10px 0 18px; font-size: var(--fs-lg) !important; color: var(--text) !important; letter-spacing: -0.015em; }
.hr-sk__legend { display: flex; align-items: center; gap: 10px; margin-top: 18px; font-size: var(--fs-sm); }
.hr-sk__legend-fill { width: 22px; height: 8px; border-radius: 999px; background: var(--team-a); margin-left: 0; }
.hr-sk__legend-avg { width: 3px; height: 16px; border-radius: 2px; background: var(--text); margin-left: 16px; }

@media (max-width: 900px) {
  .hr-habits { grid-template-columns: 1fr; }
  .hr-sk__line { grid-template-columns: 1fr 36px; }
  .hr-sk__bar, .hr-sk__val { grid-column: 1; }
  .hr-plan li { grid-template-columns: 36px 1fr; }
  .hr-plan li .btn { grid-column: 2; justify-self: start; }
}
