/* PSC Gestion — Absences (absences-rh.js) : bandeau, compteurs, listes et fenêtres de Suivi RH (classes sv-* de suivi.css),
   calendrier mensuel : une ligne par salarié, une case par jour, une couleur par motif. */
.app-absences_rh { --sv-blue: #0009E4; --sv-crit: #B3261E;
  --sv-retard-bg: #FBE3E1; --sv-retard-fg: #8C1D18; --sv-bientot-bg: #FFF0D4; --sv-bientot-fg: #8A5300; --sv-ok-bg: #DBF0E2; --sv-ok-fg: #1C6A3A;
  --sv-info-bg: #E2ECFB; --sv-info-fg: #1F4F8A; --sv-neutre-bg: #E5E6F8; --sv-neutre-fg: #4A4E7D;
  display: block; min-height: calc(100vh - 48px); background: var(--bg, #F2F3FC); color: var(--ink, #0C0E3D); font-family: 'Public Sans', system-ui, sans-serif; }
:root[data-theme="dark"] .app-absences_rh { --sv-retard-bg: #3D1714; --sv-retard-fg: #FFB4AB; --sv-bientot-bg: #3A2C10; --sv-bientot-fg: #F1C67A;
  --sv-ok-bg: #12321F; --sv-ok-fg: #8FD6A8; --sv-info-bg: #1B2C4A; --sv-info-fg: #A9C8F5; --sv-neutre-bg: #1C1F40; --sv-neutre-fg: #A4A8D2; --sv-crit: #FF8A80; }
.app-absences_rh .sv-kpi { display: flex; flex-direction: column; gap: 2px; font-weight: 600; }
.app-absences_rh .sv-bar + .sv-bar { border-top: 0; }
.ab-nav { gap: 8px; }
.ab-mois { font: 700 18px/1.2 'Exo 2', 'Public Sans', sans-serif; min-width: 150px; text-align: center; text-transform: capitalize; }
.ab-sp { flex: 1; }
.ab-leg { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 8px 14px 0; font-size: 12.5px; color: var(--muted, #4A4E7D); }
.ab-leg span { display: inline-flex; gap: 6px; align-items: center; }
.ab-leg i { display: inline-block; width: 14px; height: 10px; border-radius: 3px; }
.ab-leg i.ab-pt { width: 8px; height: 8px; border-radius: 50%; }
.ab-leg i.ab-hach { background: repeating-linear-gradient(135deg, #6B6F99 0 3px, transparent 3px 6px); border: 1px solid #6B6F99; }
.ab-cal { padding: 10px 14px 14px; }
.ab-scroll { overflow-x: auto; border: 1px solid var(--line, #D3D5F0); border-radius: 10px; }
table.ab-t { border-collapse: collapse; font-size: 12px; min-width: 100%; }
.ab-t th, .ab-t td { border-bottom: 1px solid var(--line, #D3D5F0); text-align: center; padding: 0; height: 34px; min-width: 26px; }
.ab-t thead th { font-weight: 700; color: var(--muted, #4A4E7D); background: var(--sunken, #E5E6F8); font-size: 11.5px; line-height: 1.15; padding: 4px 0; position: sticky; top: 0; }
.ab-t thead th span { display: block; font-size: 10px; font-weight: 600; opacity: .8; }
.ab-t th.ab-nom { position: sticky; left: 0; z-index: 2; background: var(--surface, #fff); text-align: left; padding: 4px 10px; min-width: 200px; max-width: 240px; font-weight: 600; border-right: 1px solid var(--line, #D3D5F0); }
.ab-t thead th.ab-nom { background: var(--sunken, #E5E6F8); z-index: 3; }
.ab-t th.ab-nom span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.ab-t th.ab-nom small { display: block; font-weight: 400; color: var(--muted, #4A4E7D); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ab-t .we { background: rgba(74, 78, 125, .07); }
.ab-t .auj { box-shadow: inset 2px 0 0 var(--sv-blue), inset -2px 0 0 var(--sv-blue); }
.ab-t thead th.auj { background: var(--sv-blue); color: #fff; }
.ab-t td[data-jour] { cursor: copy; }
.ab-t td[data-jour]:hover { background: var(--accent-soft, #DFDCFB); }
.ab-t td.ab-on { cursor: pointer; padding: 0; }
.ab-b { display: flex; align-items: center; justify-content: center; gap: 2px; height: 22px; margin: 0 -1px; color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .02em; position: relative; white-space: nowrap; overflow: visible; }
.ab-b.d { border-top-left-radius: 6px; border-bottom-left-radius: 6px; margin-left: 2px; }
.ab-b.f { border-top-right-radius: 6px; border-bottom-right-radius: 6px; margin-right: 2px; }
.ab-b.att { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.55) 0 3px, transparent 3px 6px) !important; }
.ab-t td.ab-on:hover .ab-b, .ab-t td.ab-on:focus-visible .ab-b { filter: brightness(1.15); outline: 2px solid var(--ink, #0C0E3D); outline-offset: 1px; }
.ab-pt { display: inline-block; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid #fff; flex: none; }
.ab-pt.ok { background: #1C6A3A; } .ab-pt.warn { background: #F0A020; } .ab-pt.non { background: #9A9DB8; }
.ab-t td.ab-tot, .ab-t th.ab-tot { min-width: 48px; font-weight: 700; color: var(--muted, #4A4E7D); border-left: 1px solid var(--line, #D3D5F0); }
.ab-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) minmax(0, 1.1fr) minmax(0, 1.5fr) auto; gap: 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line, #D3D5F0); cursor: pointer; }
.ab-row:last-child { border-bottom: 0; }
.ab-row:hover { background: var(--accent-soft, #DFDCFB); }
.ab-m { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; }
.ab-m i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; flex: none; }
.ab-remp { border-top: 1px solid var(--line, #D3D5F0); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.ab-remp p { margin: 0; }
.ab-toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 50; background: var(--ink, #0C0E3D); color: #fff; padding: 10px 14px; border-radius: 10px; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25); display: flex; gap: 10px; align-items: center; max-width: 92vw; }
.ab-toast .sv-btn { background: #fff; color: var(--ink, #0C0E3D); }
@media (max-width: 900px) {
  .app-absences_rh .sv-kpis { grid-template-columns: 1fr 1fr; }
  .ab-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ab-row > .sv-act { grid-column: 1 / -1; justify-content: flex-start; }
  .ab-t th.ab-nom { min-width: 140px; }
}

/* Composant « Calendrier des absences » en lecture seule (Accueil, Vue d'ensemble) */
.ab-w { --sv-blue: #0009E4; background: var(--surface, #fff); color: var(--ink, #0C0E3D); border: 1px solid var(--line, #D3D5F0); border-radius: 12px; padding: 12px 14px 14px; margin: 16px 0; font-family: 'Public Sans', system-ui, sans-serif; }
.ab-w-h { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.ab-w-h h2 { font: 700 17px/1.25 'Exo 2', 'Public Sans', sans-serif; margin: 0; }
.ab-w-nav { display: flex; gap: 6px; align-items: center; }
.ab-w-nav b { min-width: 120px; text-align: center; text-transform: capitalize; font-size: 14px; }
.ab-w-nav button, .ab-w-vue button, .ab-w-go { font: inherit; font-size: 13px; font-weight: 600; border: 1px solid var(--line, #D3D5F0); background: var(--surface, #fff); color: var(--ink, #0C0E3D); border-radius: 8px; padding: 4px 10px; cursor: pointer; }
.ab-w-nav button:hover, .ab-w-vue button:hover, .ab-w-go:hover { border-color: #0009E4; }
.ab-w-vue { display: inline-flex; gap: 4px; }
.ab-w-vue button[aria-pressed="true"] { background: #0009E4; border-color: #0009E4; color: #fff; }
.ab-w-n { font-size: 13px; color: var(--muted, #4A4E7D); flex: 1; }
.ab-w-go { background: #0009E4; border-color: #0009E4; color: #fff; }
.ab-w .ab-leg { padding: 8px 0 0; }
.ab-w .ab-cal { padding: 8px 0 0; }
.ab-w .ab-t td.ab-on { cursor: pointer; }
.ab-w-vide, .ab-w .ab-vide { color: var(--muted, #4A4E7D); padding: 18px 4px; margin: 0; text-align: center; }
/* Présentation (21/10) : bandeau avec l'action principale, compteurs compacts, barre d'outils sur une ligne,
   calendrier plus lisible, liste en colonnes alignées */
.app-absences_rh .sv-band-t { gap: 16px; }
.app-absences_rh .sv-band-t > div { flex: 1; min-width: 0; }
.ab-band-btn { flex: none; display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 15px; font-weight: 700; color: var(--sv-blue); background: #fff; border: 0; border-radius: 10px; padding: 11px 18px; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.ab-band-btn span { font-size: 20px; line-height: 1; }
.ab-band-btn:hover { background: #EEF0FF; }
.ab-band-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.app-absences_rh .sv-kpis { gap: 10px; }
.app-absences_rh .sv-kpi { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; row-gap: 1px; align-items: center; padding: 10px 14px; min-height: 0; border-left-width: 4px; font-size: 13.5px; line-height: 1.3; }
.app-absences_rh .sv-kpi b { grid-row: 1 / span 2; font-size: 28px; line-height: 1; min-width: 26px; text-align: center; }
.app-absences_rh .sv-kpi span { font-size: 12px; line-height: 1.3; font-weight: 400; }
.app-absences_rh .sv-kpi.zero { border-left-color: var(--line, #D3D5F0); }
.app-absences_rh .sv-kpi.zero b { color: var(--muted, #4A4E7D); opacity: .6; }
.ab-nav { gap: 10px; flex-wrap: wrap; }
.ab-mnav { display: inline-flex; align-items: center; border: 1px solid var(--line, #D3D5F0); border-radius: 10px; overflow: hidden; background: var(--surface, #fff); }
.ab-mnav button { font: inherit; font-size: 18px; line-height: 1; border: 0; background: none; color: var(--ink, #0C0E3D); padding: 7px 12px; cursor: pointer; }
.ab-mnav button:hover { background: var(--accent-soft, #DFDCFB); }
.ab-mnav .ab-mois { min-width: 150px; font-size: 16px; padding: 0 4px; }
.ab-seg { display: inline-flex; border: 1px solid var(--line, #D3D5F0); border-radius: 10px; overflow: hidden; }
.ab-seg button { font: inherit; font-size: 13px; font-weight: 600; border: 0; background: var(--surface, #fff); color: var(--muted, #4A4E7D); padding: 7px 12px; cursor: pointer; }
.ab-seg button + button { border-left: 1px solid var(--line, #D3D5F0); }
.ab-seg button[aria-pressed="true"] { background: var(--sv-blue); color: #fff; }
.ab-nav .sv-search { margin-left: auto; flex: 1 1 220px; max-width: 340px; }
.ab-leg { padding: 10px 14px 0; }
.ab-cal { padding: 10px 14px 16px; }
.ab-t th, .ab-t td { height: 40px; min-width: 28px; }
.ab-t tbody tr:hover th.ab-nom, .ab-t tbody tr:hover td:not(.ab-on) { background: #F6F6FE; }
.ab-t .auj { box-shadow: none; background: rgba(0, 9, 228, .07); }
.ab-t thead th.auj { background: var(--sv-blue); color: #fff; border-radius: 0; }
.ab-b { height: 26px; font-size: 11px; gap: 4px; box-shadow: 0 1px 2px rgba(12, 14, 61, .18); }
.ab-b.d { border-top-left-radius: 8px; border-bottom-left-radius: 8px; justify-content: flex-start; padding-left: 7px; }
.ab-b.f { border-top-right-radius: 8px; border-bottom-right-radius: 8px; }
.ab-b.d.f { justify-content: center; padding-left: 0; }
.ab-pt { width: 9px; height: 9px; }
.ab-h2 { font: 700 16px/1.3 'Exo 2', 'Public Sans', sans-serif; margin: 0; }
.ab-list .ab-row { grid-template-columns: minmax(170px, 1.3fr) minmax(150px, 1fr) minmax(170px, 1fr) minmax(190px, 1.2fr) 250px; padding: 11px 16px; }
.ab-list .ab-head { cursor: default; padding-block: 8px; background: var(--sunken, #E5E6F8); font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted, #4A4E7D); }
.ab-list .ab-head:hover { background: var(--sunken, #E5E6F8); }
.ab-list .ab-row .sv-act { justify-content: flex-end; }
.ab-list .ab-row .sv-act .sv-btn { white-space: nowrap; }
.ab-att { color: var(--sv-bientot-fg) !important; font-weight: 600; }
.ab-per { font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) { .ab-list .ab-row { grid-template-columns: minmax(150px, 1.2fr) minmax(130px, 1fr) minmax(150px, 1fr) minmax(170px, 1.2fr); } .ab-list .ab-row > .sv-act { grid-column: 1 / -1; justify-content: flex-start; } }
@media (max-width: 900px) { .ab-list .ab-head { display: none; } .ab-band-btn { padding: 9px 12px; font-size: 14px; } .ab-nav .sv-search { max-width: none; margin-left: 0; } }
@media (max-width: 560px) { .app-absences_rh .sv-band-t { flex-wrap: wrap; } .ab-band-btn { width: 100%; justify-content: center; } }table.ab-t { width: 100%; table-layout: auto; }
.ab-t th, .ab-t td { min-width: 0; width: 2.6%; }
.ab-t th.ab-nom { min-width: 170px; width: 190px; }
.ab-t td.ab-tot, .ab-t th.ab-tot { min-width: 44px; width: 44px; }
.ab-b { box-shadow: none; }
@media (max-width: 1100px) { .ab-t th, .ab-t td { min-width: 24px; } }

/* Fenêtre « Remplacement » posée sur l'écran Absences (26/10/2026) */
.ab-rdlg { width: min(820px, 96vw); }
.ab-rdlg [hidden] { display: none !important; }
.ab-rp { border: 1px solid var(--line, #D3D5F0); border-radius: 10px; padding: 10px 14px 12px; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.ab-rp legend { font-weight: 700; padding: 0 6px; }
.ab-hj { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.ab-hj label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 600; color: var(--muted, #4A4E7D); }
.ab-hj input { font: inherit; font-size: 14px; width: 100%; min-width: 0; padding: 6px 8px; border: 1px solid var(--line, #D3D5F0); border-radius: 8px; background: var(--surface, #fff); color: var(--ink, #0C0E3D); text-align: right; }
@media (max-width: 560px) { .ab-hj { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* heures payées ou récupérées, dates de repos */
.ab-recup { display: flex; flex-direction: column; gap: 8px; }
.ab-pay { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.ab-pay > span, .ab-repos > span { font-size: 12.5px; font-weight: 600; color: var(--muted, #4A4E7D); }
.ab-repos { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.ab-rl { display: flex; flex-wrap: wrap; gap: 6px; }
.ab-rl span { display: inline-flex; gap: 4px; align-items: center; }
.ab-rl input { font: inherit; font-size: 14px; padding: 6px 8px; border: 1px solid var(--line, #D3D5F0); border-radius: 8px; background: var(--surface, #fff); color: var(--ink, #0C0E3D); }
.ab-grise { opacity: .45; }

/* Calendrier présenté comme le planning Lucca (28/10/2026) : salariés regroupés par chantier (repliables), avatar, semaines,
   absents par jour, une pastille par jour, dimanches et fériés hachurés, bulle de détail au survol */
.ab-lucca thead th { position: static; }
.ab-lucca tr.ab-sem th { height: 24px; padding: 0 6px; font-size: 11px; font-weight: 700; text-align: left; white-space: nowrap; overflow: hidden; background: var(--surface, #fff); border-left: 1px solid var(--line, #D3D5F0); color: var(--muted, #4A4E7D); }
.ab-lucca tr.ab-sem th.ab-nom { vertical-align: bottom; padding: 6px 10px; font-size: 12px; border-left: 0; }
.ab-lucca tr.ab-js th { height: 38px; background: var(--surface, #fff); color: var(--ink, #0C0E3D); font-size: 12.5px; }
.ab-lucca tr.ab-js th span { text-transform: uppercase; color: var(--muted, #4A4E7D); }
.ab-lucca tr.ab-js th.auj { background: var(--sv-blue, #0009E4); color: #fff; border-radius: 8px 8px 0 0; }
.ab-lucca tr.ab-js th.auj span { color: #fff; }
.ab-lucca tr.ab-cpt th, .ab-lucca tr.ab-cpt td { height: 28px; background: var(--sunken, #E5E6F8); }
.ab-lucca tr.ab-cpt th.ab-nom { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted, #4A4E7D); }
.ab-cpt b { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; font-size: 11px; font-weight: 800; }
.ab-cpt b.n1 { background: #E2ECFB; color: #1F4F8A; } .ab-cpt b.n2 { background: #FFF0D4; color: #8A5300; } .ab-cpt b.n3 { background: #FBE3E1; color: #8C1D18; }
:root[data-theme="dark"] .ab-cpt b.n1 { background: #1B2C4A; color: #A9C8F5; } :root[data-theme="dark"] .ab-cpt b.n2 { background: #3A2C10; color: #F1C67A; } :root[data-theme="dark"] .ab-cpt b.n3 { background: #3D1714; color: #FFB4AB; }
.ab-lucca .nt { background: repeating-linear-gradient(135deg, rgba(74, 78, 125, .11) 0 4px, transparent 4px 8px); }
.ab-leg i.ab-nt { background: repeating-linear-gradient(135deg, rgba(74, 78, 125, .35) 0 3px, transparent 3px 6px); border: 1px solid var(--line, #D3D5F0); }
.ab-lucca td.ab-on { padding: 0 1px; }
.ab-lucca .ab-b, .ab-lucca .ab-b.d, .ab-lucca .ab-b.d.f { height: 24px; margin: 0; padding: 0 0 0 4px; border-radius: 5px; justify-content: flex-start; box-shadow: none; overflow: visible; }
.ab-lucca .ab-b em { position: relative; z-index: 1; font-style: normal; font-size: 10.5px; font-weight: 800; text-shadow: 0 1px 1px rgba(0, 0, 0, .25); }
.ab-lucca .ab-b .ab-pt { position: absolute; top: -4px; right: -3px; z-index: 2; }
.ab-lucca td.nt .ab-b { opacity: .4; }
.ab-lucca th.ab-nom { min-width: 200px; width: 220px; }
.ab-pr { display: flex; align-items: center; gap: 9px; min-width: 0; }
.ab-t th.ab-nom .ab-av { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: hsl(var(--h, 240) 55% 89%); color: hsl(var(--h, 240) 50% 28%); font-size: 11.5px; font-weight: 800; }
:root[data-theme="dark"] .ab-t th.ab-nom .ab-av { background: hsl(var(--h, 240) 35% 26%); color: hsl(var(--h, 240) 60% 86%); }
.ab-t th.ab-nom .ab-id { flex: 1; min-width: 0; }
.ab-lucca tr.ab-g th.ab-nom { position: static; max-width: none; height: 34px; padding: 0; text-align: left; background: var(--sunken, #E5E6F8); }
.ab-g button { position: sticky; left: 0; display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; color: var(--ink, #0C0E3D); font: inherit; font-size: 13px; font-weight: 700; padding: 7px 10px; cursor: pointer; }
.ab-g button:focus-visible { outline: 2px solid var(--sv-blue, #0009E4); outline-offset: -2px; border-radius: 6px; }
.ab-g button i { font-style: normal; transition: transform .15s; }
.ab-g button[aria-expanded="false"] i { transform: rotate(-90deg); }
.ab-t tr.ab-g th.ab-nom small { display: inline; font-size: 12px; font-weight: 500; color: var(--muted, #4A4E7D); }
.ab-bulle { position: fixed; z-index: 60; max-width: 300px; display: flex; flex-direction: column; gap: 5px; padding: 10px 12px; border: 1px solid var(--line, #D3D5F0); border-radius: 10px; background: var(--surface, #fff); color: var(--ink, #0C0E3D); box-shadow: 0 8px 24px rgba(12, 14, 61, .18); font: 13px/1.35 'Public Sans', system-ui, sans-serif; pointer-events: none; }
.ab-bulle[hidden] { display: none; }
.ab-bulle .sv-pill { align-self: flex-start; }
.ab-bulle .ab-att { color: #8A5300; font-weight: 600; }
@media (max-width: 560px) { .ab-t th.ab-nom .ab-av { display: none; } .ab-lucca th.ab-nom { min-width: 130px; width: 140px; } }
/* cartes = filtres de la liste (26/11/2026) : carte du filtre en cours */
.app-absences_rh .sv-kpi[data-kf] { cursor: pointer; }
.app-absences_rh .sv-kpi[aria-pressed="true"] { outline: 2px solid var(--sv-blue, #2B39D9); outline-offset: -2px; background: var(--accent-soft, #EEF0FF); }
