/* @portee: admin */
/* =========================================================================
   Module Candidatures (CVthèque) — liste, aperçu rapide, fiche, formulaire RH.
   Préfixes : .cv (liste), .cvd (aperçu), .cvf (fiche), .cvform (formulaire). Variables du thème uniquement.
   ========================================================================= */

/* ------------------------------------------------------------------ Liste : cartes statistiques compactes */
.cv-stats .stats-grid { grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: .6rem; }
.cv-stats .kpi { padding: .75rem .85rem .8rem; gap: .15rem; border-radius: var(--r); }
.cv-stats .kpi-label { font-size: .76rem; line-height: 1.25; }
.cv-stats .kpi-value { font-size: clamp(1.3rem, 1.05rem + .6vw, 1.7rem); }
.cv-stats .kpi-foot { font-size: .72rem; }
.cv-stats .kpi-icon { top: .65rem; right: .65rem; width: 1.85rem; height: 1.85rem; font-size: 1rem; border-radius: 8px; }
.cv-stats .kpi.has-icon .kpi-label { padding-right: 2.1rem; }
.cv-kpi-origin { grid-column: span 2; justify-content: space-between; }
.cv-origin-bar { display: flex; height: .55rem; border-radius: 999px; overflow: hidden; background: var(--bg-sunken); margin: .45rem 0 .35rem; gap: 2px; }
.cv-origin-bar i { display: block; height: 100%; min-width: 4px; }
.cv-origin-legend { display: flex; flex-wrap: wrap; gap: .2rem .8rem; font-size: .76rem; }
.cv-origin-legend a { display: inline-flex; align-items: center; gap: .35rem; color: var(--text-2); text-decoration: none !important; border-radius: 6px; padding: .05rem .2rem; margin-left: -.2rem; }
.cv-origin-legend a:hover { color: var(--text); background: var(--bg-hover); }
.cv-origin-legend a i { width: .55rem; height: .55rem; border-radius: 50%; display: inline-block; }
.cv-origin-legend b { color: var(--text); }
.o-formulaire { background: var(--brand); }
.o-compte { background: var(--text); }
.o-rh { background: var(--info); }
@media (max-width: 560px) { .cv-kpi-origin { grid-column: 1 / -1; } }

/* ------------------------------------------------------------------ Liste : zone vivante */
.cv-live { display: flex; flex-direction: column; min-height: 0; }
.cv-tabsrow { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .6rem; flex-shrink: 0; min-width: 0; }
.cv-tabsrow .subtabs { min-width: 0; }
.cv-tabs .subtab, .cvf-tabs .subtab { padding: .4rem .7rem; font-size: .85rem; gap: .38rem; }
@media (max-width: 1640px) { .cv-tabs .subtab .ph, .cvf-tabs .subtab .ph { display: none; } }
.cv-total { white-space: nowrap; flex-shrink: 0; }
.cv-dt { position: relative; overflow: visible; }
.cv-dt > .dt-foot { border-radius: 0 0 var(--r-lg) var(--r-lg); }
.cv-dt > .dt-toolbar { border-radius: var(--r-lg) var(--r-lg) 0 0; }
.cv-dt::before { content: ""; position: absolute; left: 0; top: 0; height: 2px; width: 0; background: var(--brand); z-index: 5; opacity: 0; transition: opacity .2s; }
.cv-live.is-loading .cv-dt::before { opacity: 1; animation: cv-progress 1.1s var(--ease) infinite; }
.cv-live.is-loading .cv-scroll { opacity: .55; transition: opacity .15s; }
@keyframes cv-progress { 0% { left: 0; width: 0; } 50% { left: 20%; width: 50%; } 100% { left: 100%; width: 0; } }

.cv-toolbar { gap: .5rem; }
.cv-toolbar .dt-search { flex: 1 1 260px; max-width: 420px; }
.cv .btn.is-on, .cv-toolbar .btn.is-on { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-soft); }
.cv-toolbar .btn .dot-count { margin-left: .1rem; }
.cv-sort { min-height: 2.15rem; padding-block: .3rem; font-size: .85rem; max-width: 230px; }
.cv-export { display: contents; }

/* Panneau des filtres */
.cv-pop { position: fixed; z-index: 120; width: min(820px, calc(100vw - 32px)); padding: 0; display: flex; flex-direction: column; max-height: min(74dvh, 680px); }
.cv-pop-body { padding: 1rem 1.1rem; overflow-y: auto; display: flex; flex-direction: column; gap: 1rem; }
.cv-pop .filter-pop-foot { margin: 0; padding: .75rem 1.1rem; background: var(--bg-sunken); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.cv-pop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .8rem; }
.cv-pop-pills { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .9rem 1.1rem; }
.cv-pop-pills .is-wide { grid-column: 1 / -1; }
.cv-pop .field { gap: .3rem; }
.cv-pills { display: flex; flex-wrap: wrap; gap: .3rem; }
.cv-pill { position: relative; cursor: pointer; }
.cv-pill input { position: absolute; opacity: 0; pointer-events: none; }
.cv-pill span { display: inline-flex; align-items: center; padding: .28rem .65rem; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--bg-elev); font-size: .8rem; font-weight: 600; color: var(--text-2); transition: all .12s; white-space: nowrap; }
.cv-pill:hover span { border-color: var(--text-3); color: var(--text); }
.cv-pill input:checked + span { background: var(--bg-inverse); border-color: var(--bg-inverse); color: var(--text-inverse); }
.cv-pill input:focus-visible + span { box-shadow: var(--ring); }

.cv-chips .chip-x { max-width: 320px; }
.cv-chips .chip-x { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Tableau */
.cv-table td { padding-block: .6rem; }
.cv-table tbody tr[data-cand] { cursor: pointer; }
.cv-table tbody tr.is-previewed { box-shadow: inset 3px 0 0 var(--brand); background: var(--bg-hover); }
.cv-who { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.cv-who-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.cv-who .xsmall .ph, .cv-who .xsmall .ph-fill { margin-left: .2rem; }
.cv-name { color: var(--text); font-weight: 700; text-decoration: none; }
.cv-name:hover { color: var(--brand-ink); text-decoration: none; }
.text-brand { color: var(--brand-ink); }
.cv-clip { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-meter { display: inline-block; vertical-align: middle; width: 56px; height: 6px; border-radius: 999px; background: var(--bg-sunken); overflow: hidden; margin-right: .4rem; }
.cv-meter > i { display: block; height: 100%; background: var(--brand); border-radius: inherit; }
.cv-scroll { container-type: inline-size; container-name: cvdt; }
.cv-table { table-layout: fixed; }
.cv-table th, .cv-table td { padding-inline: .7rem; }
.cv-table .c-check { width: 2.7rem; }
.cv-table .c-who { width: 31%; }
.cv-table .c-poste { width: 24%; }
.cv-table .c-profil { width: 18%; }
.cv-table .c-dossier { width: 7.2rem; }
.cv-table .c-date { width: 7.6rem; }
.cv-table .c-statut { width: 9rem; }
.cv-table .c-actions { width: 8.4rem; }
.cv-table .cv-clip, .cv-table .cv-who-txt { max-width: 100%; }
.cv-table .cv-status { width: 100%; }
@container cvdt (max-width: 1240px) { .cv-col-lg { display: none !important; } .cv-table .c-actions { width: 6.4rem; } }
@container cvdt (max-width: 900px) { .cv-col-md { display: none; } }
@container cvdt (max-width: 640px) {
  .cv-col-sm, .cv-table .c-poste, .cv-table tbody td:nth-child(3) { display: none; }
  .cv-table .c-who { width: auto; } .cv-table .c-statut { width: 6.8rem; } .cv-table .c-check { width: 2.3rem; }
  .cv-table .col-actions { display: none; }
  .cv-table th, .cv-table td { padding-inline: .5rem; }
  .cv-table .cv-who { gap: .5rem; }
}
.cv-who-txt > span, .cv-who-txt > a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.cv-dt .dt-foot .select { min-height: 2.1rem; padding-right: 2rem; }

/* Sélecteur de statut en pastille */
.cv-status {
  --b-fg: var(--text-2); --b-bg: var(--muted-soft);
  appearance: none; -webkit-appearance: none; border: 1px solid transparent; border-radius: 999px; cursor: pointer;
  padding: .22rem 1.6rem .22rem .65rem; font: inherit; font-size: .78rem; font-weight: 700; line-height: 1.35;
  color: var(--b-fg); background-color: var(--b-bg); max-width: 100%;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - .8rem) 55%, calc(100% - .55rem) 55%; background-size: 4px 4px, 4px 4px; background-repeat: no-repeat;
  transition: box-shadow .15s, filter .15s;
}
.cv-status:hover { filter: brightness(.97); box-shadow: 0 0 0 1px var(--b-fg) inset; }
.cv-status:focus { outline: none; box-shadow: var(--ring); }
.cv-status:disabled { opacity: .6; cursor: progress; }
.cv-status option { color: var(--text); background: var(--bg-elev); }

/* Liste */
.cv-row { cursor: pointer; gap: .85rem; }
.cv-row.is-selected { background: var(--brand-soft); }
.cv-row.is-previewed { box-shadow: inset 3px 0 0 var(--brand); background: var(--bg-hover); }
.cv-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.cv-row-main .cv-clip { max-width: 100%; }
.cv-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; flex-shrink: 0; }
.cv-facts { display: flex; flex-wrap: wrap; gap: .25rem .8rem; font-size: .78rem; color: var(--text-2); min-width: 0; }
.cv-facts > * { display: inline-flex; align-items: center; gap: .3rem; color: inherit; text-decoration: none; min-width: 0; }
.cv-facts a:hover { color: var(--text); }
.cv-facts .ph, .cv-facts .ph-fill { color: var(--text-3); }
.cv-facts.center { justify-content: center; }
@media (max-width: 760px) { .cv-row-actions { display: none; } .cv-row { flex-wrap: wrap; } .cv-row-side { flex-direction: row; width: 100%; justify-content: space-between; padding-left: 4.6rem; } }

/* Cartes */
.cv-cards { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.cv-card { cursor: pointer; align-items: stretch; gap: .55rem; padding: .9rem; }
.cv-card-top { display: flex; justify-content: space-between; align-items: center; }
.cv-card-check, .cv-mini-check { opacity: .35; transition: opacity .15s; margin: 0; }
.cv-card:hover .cv-card-check, .cv-card.is-selected .cv-card-check, .cv-mini:hover .cv-mini-check, .cv-mini.is-selected .cv-mini-check, .cv-card-check:focus-within, .cv-mini-check:focus-within { opacity: 1; }
.cv-card-photo { width: 6.2rem; height: 6.2rem; margin: 0 auto; border-radius: 50%; overflow: hidden; background: var(--bg-inverse); color: var(--text-inverse); display: grid; place-items: center; font-weight: 800; font-size: 1.9rem; box-shadow: 0 0 0 4px var(--bg-elev), 0 0 0 5px var(--line); }
.cv-card-photo img { width: 100%; height: 100%; object-fit: cover; }
.cv-card-id { text-align: center; min-width: 0; }
.cv-card-id .cv-name { display: block; line-height: 1.25; }
.cv-card-id .cv-clip { max-width: 100%; }
.cv-card-foot { display: flex; align-items: center; gap: .5rem; padding-top: .55rem; margin-top: auto; border-top: 1px solid var(--line); }
.cv-card-foot .cv-meter { flex: 1; width: auto; margin: 0; }

/* Mini-cartes */
.cv-minis { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.cv-mini { flex-direction: row; align-items: center; gap: .6rem; padding: .55rem .7rem; cursor: pointer; }
.cv-mini-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.cv-mini-txt .cv-name { font-size: .88rem; }
.cv-mini-txt .cv-clip { max-width: 100%; }
.cv-dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--b-fg, var(--text-3)); flex-shrink: 0; }

/* Actions groupées */
.cv-bulk { margin-top: .6rem; flex-shrink: 0; }
.cv-bulk .select { background-color: transparent; color: inherit; border-color: rgba(127,127,127,.45); }
.cv-bulk .select option { color: var(--text); background: var(--bg-elev); }
.cv-bulk .cv-bulk-danger { --btn-fg: var(--danger); }
.cv-bulk .menu { color: var(--text); }

/* ------------------------------------------------------------------ Aperçu rapide (tiroir) */
.cv-drawer { width: min(940px, 100%); }
.cv-drawer-bar { display: flex; align-items: center; gap: .35rem; padding: .6rem .9rem; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.cv-drawer-body { flex: 1; min-height: 0; overflow-y: auto; }
.cv-skel { padding: 1.4rem; display: flex; flex-direction: column; gap: .9rem; }
.cv-skel span { display: block; height: 1rem; border-radius: 8px; background: linear-gradient(90deg, var(--bg-sunken), var(--bg-hover), var(--bg-sunken)); background-size: 200% 100%; animation: cv-shimmer 1.2s linear infinite; }
.cv-skel span:first-child { height: 5rem; width: 60%; }
.cv-skel span:nth-child(3) { width: 80%; }
@keyframes cv-shimmer { to { background-position: -200% 0; } }

.cvd { display: flex; flex-direction: column; min-height: 100%; }
.cvd-head { display: flex; align-items: center; gap: 1.1rem; padding: 1.2rem 1.3rem .9rem; }
.cvd-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.cvd-name { font-size: 1.35rem; font-weight: 800; font-stretch: 110%; letter-spacing: -.01em; margin: 0; line-height: 1.15; }
.cvd-side { flex-shrink: 0; }
.cvd-actions { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; padding: .55rem 1.3rem .8rem; border-bottom: 1px solid var(--line); }
.cvd-tabs { margin: .8rem 1.3rem 0; }
.cvd-body { padding: .9rem 1.3rem 1.4rem; flex: 1; display: flex; flex-direction: column; min-height: 0; }
.cvd-body > section { flex: 1; }
.cvd-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.cvd-card { border: 1px solid var(--line); border-radius: var(--r); padding: .9rem 1rem; background: var(--bg-elev); min-width: 0; }
.cvd-title { font-size: .86rem; font-weight: 750; margin: 0 0 .65rem; display: flex; align-items: center; gap: .45rem; color: var(--text); }
.cvd-title .ph { color: var(--brand-ink); }
.cvd-dl { font-size: .86rem; gap: .4rem .8rem; grid-template-columns: minmax(90px, 32%) 1fr; }
.cvd-line { display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem; border-radius: var(--r-sm); border: 1px solid var(--line); color: var(--text); text-decoration: none !important; }
a.cvd-line:hover { background: var(--bg-hover); }
.cvd-docs { display: flex; flex-direction: column; gap: .7rem; min-height: 520px; }
.cvd-viewer { flex: 1; min-height: 480px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
@media (max-width: 680px) { .cvd-grid { grid-template-columns: minmax(0, 1fr); } .cvd-head { flex-wrap: wrap; } .cvd-side { display: none; } }

/* ------------------------------------------------------------------ Fiche candidat */
.cvf-head { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: .8rem; flex-shrink: 0; box-shadow: var(--shadow-1); }
.cvf-head-main { display: flex; align-items: center; gap: 1.1rem; padding: 1rem 1.2rem .85rem; }
.cvf-photo { box-shadow: 0 0 0 3px var(--bg-elev), 0 0 0 4px var(--brand); cursor: zoom-in; }
.cvf-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.cvf-id .breadcrumb { margin-bottom: 0; }
.cvf-name { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.75rem); font-weight: 800; font-stretch: 112%; letter-spacing: -.02em; margin: 0; line-height: 1.1; }
.cvf-role { font-size: .95rem; }
.cvf-head-side { display: flex; flex-direction: column; align-items: center; gap: .4rem; flex-shrink: 0; }
.cvf-actions { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; padding: .6rem 1.2rem; border-top: 1px solid var(--line); background: var(--bg-sunken); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.cvf-status { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.cvf-status .select { min-height: 2.15rem; padding-block: .3rem; font-size: .86rem; }
.cvf-danger { color: var(--danger); }
.cvf-tabs { margin-bottom: .8rem; }
.cvf-body { min-height: 0; }
.cvf-pane { min-width: 0; }
.cvf-card { padding: 1rem 1.1rem; }
.cvf-title { font-size: .95rem; font-weight: 750; margin: 0 0 .8rem; display: flex; align-items: center; gap: .5rem; }
.cvf-title .ph { color: var(--brand-ink); }
.cvf-card .dl { font-size: .88rem; gap: .45rem .9rem; }
.cvf-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; align-items: start; }
.cvf-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.cvf-align-start { align-items: start; }
.cvf-grid-parcours { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: .8rem; align-items: start; }
.cvf-checks { display: flex; flex-wrap: wrap; gap: .3rem; margin: .8rem 0 .6rem; }
.cvf-checks span { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .5rem; border-radius: 999px; font-size: .74rem; font-weight: 650; background: var(--bg-sunken); color: var(--text-3); }
.cvf-checks span.is-ok { background: var(--brand-soft); color: var(--brand-ink); }
.cvf-line { padding: .85rem 1.2rem; border-bottom: 1px solid var(--line); border-radius: 0; gap: .8rem; }
.cvf-line:last-child { border-bottom: 0; }
.cvf-date { display: flex; flex-direction: column; align-items: center; min-width: 3.3rem; padding: .3rem .5rem; border-radius: var(--r-sm); background: var(--bg-sunken); border: 1px solid var(--line); line-height: 1.1; }
.cvf-date b { font-size: 1.1rem; }
.cvf-date span { font-size: .7rem; color: var(--text-3); }
.cvf-pane-docs { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: .8rem; }
.cvf-doclist { padding: 1rem; align-self: start; }
.cvf-docbtn { display: flex; align-items: center; gap: .55rem; width: 100%; padding: .55rem .6rem; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg-elev); color: var(--text); font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; text-align: left; transition: border-color .12s, background .12s; }
.cvf-docbtn:hover { background: var(--bg-hover); }
.cvf-docbtn.is-active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.cvf-docbtn > .ph { font-size: 1.15rem; }
.cvf-viewer-wrap { overflow: hidden; display: flex; flex-direction: column; min-height: 520px; }
.cvf-viewer { flex: 1; min-height: 0; }

@media (min-width: 1024px) {
  body.is-fit .cvf-body { flex: 1; display: flex; flex-direction: column; }
  body.is-fit .cvf-pane { flex: 1; min-height: 0; overflow-y: auto; padding-right: .2rem; scrollbar-width: thin; }
  body.is-fit .cvf-pane-docs { overflow: hidden; }
  body.is-fit .cvf-pane-docs .cvf-doclist { max-height: 100%; overflow-y: auto; }
  body.is-fit .cvf-viewer-wrap { min-height: 0; height: 100%; }
  body.is-fit .cvf-grid-2.cvf-align-start > .panel { max-height: 100%; display: flex; flex-direction: column; }
  body.is-fit .cvf-grid-2.cvf-align-start > .panel > .panel-body, body.is-fit .cvf-grid-2.cvf-align-start > .panel > .cvf-scroll { overflow-y: auto; min-height: 0; }
}
@media (max-width: 1180px) { .cvf-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cvf-grid-3 > :last-child { grid-column: 1 / -1; } }
@media (max-width: 860px) {
  .cvf-grid-3, .cvf-grid-2, .cvf-grid-parcours, .cvf-pane-docs { grid-template-columns: minmax(0, 1fr); }
  .cvf-head-main { flex-wrap: wrap; } .cvf-id { order: 3; flex: 1 1 100%; } .cvf-head-side { flex-direction: row; margin-left: auto; }
  .cvf-actions .grow { display: none; }
  .cvf-viewer-wrap { min-height: 70vh; }
}

/* ------------------------------------------------------------------ Formulaire RH (étapes) */
.cvform-shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 1rem; min-height: 0; }
.cvform-steps { display: flex; flex-direction: column; gap: .25rem; padding: .6rem; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-lg); align-self: start; }
.cvform-step { position: relative; display: flex; align-items: center; gap: .7rem; width: 100%; padding: .6rem .65rem; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--text-2); font: inherit; text-align: left; cursor: pointer; transition: background .12s, color .12s; }
.cvform-step:hover { background: var(--bg-hover); color: var(--text); }
.cvform-step.is-active { background: var(--bg-inverse); color: var(--text-inverse); }
.cvform-step-ico { width: 2.1rem; height: 2.1rem; border-radius: 9px; display: grid; place-items: center; background: var(--bg-sunken); color: var(--text-2); font-size: 1.1rem; flex-shrink: 0; }
.cvform-step.is-active .cvform-step-ico { background: var(--brand); color: #000; }
.cvform-step-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.cvform-step-txt b { font-size: .9rem; }
.cvform-step-txt span { font-size: .74rem; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cvform-step-err { margin-left: auto; color: var(--danger); font-size: 1.1rem; }
.cvform-step.has-error:not(.is-active) .cvform-step-ico { background: var(--danger-soft); color: var(--danger); }
.cvform-meta { display: flex; align-items: center; gap: .7rem; margin-top: .5rem; padding: .8rem .6rem .3rem; border-top: 1px solid var(--line); }
.cvform-main { display: flex; flex-direction: column; min-height: 0; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.cvform-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1.3rem; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.cvform-title { margin: 0; font-size: 1.05rem; font-weight: 750; display: flex; align-items: center; gap: .55rem; }
.cvform-title .ph { color: var(--brand-ink); }
.cvform-body { padding: 1.3rem; }
.cvform-section { animation: cv-fade .22s var(--ease); }
@keyframes cv-fade { from { opacity: 0; transform: translateY(6px); } }
.cvform-rh { margin-top: 1.5rem; padding-top: 1.2rem; border-top: 1px dashed var(--line-strong); display: flex; flex-direction: column; gap: .8rem; }
.cvform-foot { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .7rem 1.3rem; border-top: 1px solid var(--line); background: var(--bg-sunken); border-radius: 0 0 var(--r-lg) var(--r-lg); flex-shrink: 0; }
.cvform-dots { display: flex; gap: .4rem; }
.cvform-dots i { width: .5rem; height: .5rem; border-radius: 50%; background: var(--line-strong); cursor: pointer; transition: transform .15s, background .15s; }
.cvform-dots i.is-active { background: var(--brand); transform: scale(1.35); }
.cvform-dots i.has-error { background: var(--danger); }
@media (min-width: 1024px) {
  body.is-fit .cvform-shell { flex: 1; }
  body.is-fit .cvform-steps { max-height: 100%; overflow-y: auto; }
  body.is-fit .cvform-main { max-height: 100%; }
  body.is-fit .cvform-body { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
}
@media (max-width: 1023px) {
  .cvform-shell { grid-template-columns: minmax(0, 1fr); }
  .cvform-steps { flex-direction: row; overflow-x: auto; scrollbar-width: none; position: sticky; top: calc(var(--topbar-h) + 4px); z-index: 10; }
  .cvform-step { width: auto; flex-shrink: 0; }
  .cvform-step-txt span { display: none; }
  .cvform-meta { display: none; }
  .cvform-foot { position: sticky; bottom: 0; z-index: 10; }
}
@media (max-width: 560px) { .cvform-step-txt { display: none; } .cvform-step { padding: .45rem; } .cvform-body { padding: 1rem; } }

/* Retrait d'une pièce jointe (formulaire RH) */
.cv-rm { position: relative; cursor: pointer; display: inline-flex; }
.cv-rm input { position: absolute; opacity: 0; pointer-events: none; }
.cv-rm span { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .55rem; border-radius: var(--r-xs); font-size: .78rem; font-weight: 650; color: var(--text-3); border: 1px solid transparent; }
.cv-rm:hover span { color: var(--danger); border-color: var(--line); }
.cv-rm input:checked + span { color: #fff; background: var(--danger); }
.cv-rm input:focus-visible + span { box-shadow: var(--ring); }
.file-item:has(.cv-rm input:checked) { border-color: var(--danger); background: var(--danger-soft); }
.file-item:has(.cv-rm input:checked) .strong { text-decoration: line-through; }

/* ------------------------------------------------------------------ Mobile : défilement normal */
@media (max-width: 1023px) {
  .cv-tabsrow { flex-wrap: wrap; }
  .cv-toolbar .dt-search { flex-basis: 100%; max-width: none; }
  .cv-sort { max-width: none; flex: 1; }
}

/* Les animations d'entrée du socle (fill-mode « both ») laissent un transform actif qui piège les éléments
   en position fixe (panneau de filtres) : on garde l'entrée mais sans état final retenu. */
.cv, .cv > *, .cvf, .cvf > *, .cvform, .cvform > * { animation-fill-mode: backwards; }
.cvd-tabs { max-width: calc(100% - 2.6rem); }
