/* Hub ValidationAbsences — accent ambre + compteurs collaborateur */

body:has(.va-hub-page) .container,
body:has(.va-hub-page) #content,
body:has(.va-hub-page).has-navbar > .content,
body:has(.va-hub-page)[data-navbar="side"].minimized #content,
body:has(.va-hub-page)[data-navbar="side"].has-navbar > .content,
body:has(.va-detail-page) .container,
body:has(.va-detail-page) #content,
body:has(.va-detail-page).has-navbar > .content {
    max-width: none !important;
    width: 100%;
}

.va-hub-page.sh-hub-page,
.va-hub-page .sh-hub {
    --sh-accent: #d97706;
    --sh-accent-2: #f59e0b;
    --sh-accent-dark: #92400e;
    --sh-accent-soft: #fffbeb;
    --sh-accent-ring: rgba(217, 119, 6, .22);
}

.va-hub-page .sh-header {
    background:
        radial-gradient(1200px 300px at 85% -60%, rgba(255, 255, 255, .14), transparent 60%),
        linear-gradient(120deg, #78350f 0%, #b45309 45%, #f59e0b 100%);
}

.va-hub-page .mh-kpi-row,
.va-hub-page .va-kpi-split {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 14px 24px;
    margin: 0 0 12px;
}

.va-hub-page .va-kpi-split.is-split {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(320px, 1.4fr);
    align-items: start;
}

.va-hub-page .mh-block-title {
    margin: 4px 0 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #64748b;
}

.va-hub-page .mh-status-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.va-hub-page .mh-scard {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 5px 10px 5px 8px;
    text-align: left;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: background .12s, border-color .12s, color .12s;
    min-height: 0;
    box-shadow: none;
    font: inherit;
    color: inherit;
}

.va-hub-page .mh-scard:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.va-hub-page .mh-scard.is-on {
    background: color-mix(in srgb, var(--mh-tone, #d97706) 10%, #fff);
    border-color: var(--mh-tone, #d97706);
}

.va-hub-page .mh-scard-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    background: var(--mh-tone, #64748b);
    font-variant-numeric: tabular-nums;
}

.va-hub-page .mh-scard-label {
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
}

.va-hub-page .mh-scard.tone-total { --mh-tone: #d97706; }
.va-hub-page .mh-scard.tone-ok { --mh-tone: #15803d; }
.va-hub-page .mh-scard.tone-info { --mh-tone: #0369a1; }
.va-hub-page .mh-scard.tone-warn { --mh-tone: #b45309; }
.va-hub-page .mh-scard.tone-danger { --mh-tone: #b91c1c; }
.va-hub-page .mh-scard.tone-neutral { --mh-tone: #64748b; }

.va-hub-page .va-kpi-counters {
    min-width: 0;
    flex: 1 1 320px;
}

.va-hub-page .sh-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
}

.va-hub-page .ph-filter-bar {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.va-hub-page .custom-applied-filters-wrap {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.va-hub-page .va-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 36px 16px;
    color: #64748b;
    font-size: 13.5px;
}

.va-hub-page .va-empty .fas {
    font-size: 22px;
    opacity: .7;
}

.va-hub-page .va-muted {
    color: #64748b;
    font-size: 12.5px;
}

/* Tableau compact — pas de scroll horizontal (clés = DEFAULT_COLUMNS) */
.va-hub-page.mh-hub-page .sh-table-wrap,
.va-hub-page .sh-table-wrap {
    overflow-x: hidden !important;
}

.va-hub-page.mh-hub-page .sh-table.mh-table,
.va-hub-page .sh-table.mh-table {
    table-layout: fixed !important;
    width: 100% !important;
    min-width: 0 !important;
}

.va-hub-page .sh-table th,
.va-hub-page .sh-table td {
    padding: 8px 8px;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
}

.va-hub-page.mh-hub-page .mh-table td {
    white-space: nowrap;
}

.va-hub-page .sh-table th {
    white-space: nowrap;
}

.va-hub-page .sh-table .sh-check-cell {
    width: 36px;
    min-width: 36px;
    max-width: 36px;
    padding-left: 10px;
    padding-right: 4px;
}

/* Répartition ~100% sur toute la largeur */
.va-hub-page .sh-table .va-col-nomDemandeur {
    width: 20%;
}

.va-hub-page .sh-table .va-col-status {
    width: 12%;
}

.va-hub-page .sh-table .va-col-requestType {
    width: 18%;
}

.va-hub-page .sh-table .va-col-period {
    width: 22%;
}

.va-hub-page .sh-table .va-col-nombreJours {
    width: 8%;
    text-align: center;
    white-space: nowrap;
}

.va-hub-page .sh-table .va-col-createdAt {
    width: 12%;
    white-space: nowrap;
}

.va-hub-page .sh-table .va-col-acts,
.va-hub-page .sh-table th.mh-col-acts,
.va-hub-page .sh-table td.mh-col-acts {
    width: 48px !important;
    min-width: 44px !important;
    max-width: 52px !important;
    padding-left: 4px;
    padding-right: 8px;
    text-align: center;
}

.va-hub-page .sh-table .va-col-nomDemandeur,
.va-hub-page .sh-table .va-col-requestType,
.va-hub-page .sh-table .va-col-period {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.va-hub-page .sh-table .va-col-status .sh-badge {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.va-hub-page .sh-table tbody tr.sh-row {
    cursor: pointer;
}

.va-hub-page .sh-table tbody tr.sh-row:hover {
    background: #f8fafc;
}

.va-hub-page .va-row-acts {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    justify-content: flex-end;
}

.va-hub-page .va-gavel-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #0f766e;
    cursor: pointer;
    transition: background .12s, color .12s;
}

.va-hub-page .va-gavel-btn:hover {
    background: #ecfdf5;
    color: #047857;
}

.va-hub-page .va-gavel-btn .fas {
    font-size: 14px;
}

/* ── Modal Gérer (Valider / Refuser) ── */
.va-manage-dialog .modal-dialog {
    max-width: 480px;
}

.va-manage-head {
    background: linear-gradient(135deg, #fffbeb 0%, #ffedd5 100%) !important;
    border-bottom-color: #fde68a !important;
}

.va-manage-head .cvt-ap-title {
    color: #92400e !important;
}

.va-manage-icon {
    background: linear-gradient(135deg, #d97706, #b45309) !important;
    box-shadow: 0 6px 16px rgba(180, 83, 9, .35) !important;
}

.va-manage-intro {
    margin: 0 0 14px;
    color: #475569;
    line-height: 1.45;
}

.va-manage-choices {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
}

.va-manage-choice {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    text-align: left;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s, background .15s, transform .12s;
    font: inherit;
    color: inherit;
}

.va-manage-choice:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .06);
    transform: translateY(-1px);
}

.va-manage-choice.is-on.is-ok {
    border-color: #86efac;
    background: #f0fdf4;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .12);
}

.va-manage-choice.is-on.is-danger {
    border-color: #fca5a5;
    background: #fef2f2;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .12);
}

.va-manage-choice-ico {
    flex: 0 0 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #fff;
}

.va-manage-choice.is-ok .va-manage-choice-ico {
    background: linear-gradient(135deg, #22c55e, #15803d);
}

.va-manage-choice.is-danger .va-manage-choice-ico {
    background: linear-gradient(135deg, #f87171, #b91c1c);
}

.va-manage-choice-txt {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.va-manage-choice-txt b {
    font-size: 14px;
    color: #0f172a;
}

.va-manage-choice-txt small {
    font-size: 12px;
    color: #64748b;
}

.va-manage-comments {
    margin-top: 4px;
}

.va-manage-label {
    display: block;
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
}

.va-manage-label .is-req {
    color: #dc2626;
}

.va-manage-warn {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 12px;
    line-height: 1.4;
}

.va-manage-textarea {
    width: 100%;
    min-height: 96px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    font: inherit;
    color: #0f172a;
    resize: vertical;
    transition: border-color .15s, box-shadow .15s, background .15s;
}

.va-manage-textarea:focus {
    outline: none;
    border-color: #d97706;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(217, 119, 6, .18);
}

.va-manage-textarea.is-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .15);
}

.va-manage-foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 22px 18px;
    background: #fff;
    border-top: 1px solid #f1f5f9;
}

.va-manage-foot .cvt-ap-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

@media (max-width: 960px) {
    .va-hub-page .va-kpi-split.is-split {
        grid-template-columns: 1fr;
    }
}

/* ── Détail ─────────────────────────────────────────────── */

/* Boutons header : override du width:38px global (.sh-header-btn) */
.va-detail-page .sh-header .sh-header-btn {
    width: auto;
    height: auto;
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    gap: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .28);
    white-space: nowrap;
    box-shadow: none;
    margin-left: 0;
}

.va-detail-page .sh-header .sh-header-btn:hover {
    background: rgba(255, 255, 255, .24);
    color: #fff;
}

.va-detail-page .sh-header .sh-icon-btn.sh-header-btn {
    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 0;
}

.va-detail-page .sh-header .va-btn-manage {
    background: #fff;
    color: #92400e;
    border-color: #fff;
}

.va-detail-page .sh-header .va-btn-manage:hover {
    background: #fffbeb;
    color: #78350f;
}

.va-detail-page .va-detail-head-text {
    min-width: 0;
}

.va-detail-actions {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: flex-end;
    flex-shrink: 0;
}

.va-detail-page .sh-subtitle .sh-badge {
    vertical-align: middle;
}

.va-detail-page .va-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 14px;
    margin-bottom: 14px;
    border: 1px solid transparent;
}

.va-detail-page .va-hero.tone-ok {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border-color: #a7f3d0;
}

.va-detail-page .va-hero.tone-warn {
    background: linear-gradient(135deg, #fffbeb, #ffedd5);
    border-color: #fdba74;
}

.va-detail-page .va-hero.tone-danger {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border-color: #fca5a5;
}

.va-detail-page .va-hero.tone-neutral {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.va-hero-ico {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: rgba(255, 255, 255, .7);
    flex: 0 0 auto;
}

.va-hero.tone-ok .va-hero-ico { color: #15803d; }
.va-hero.tone-warn .va-hero-ico { color: #c2410c; }
.va-hero.tone-danger .va-hero-ico { color: #b91c1c; }

.va-hero-label {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
}

.va-hero-hint {
    font-size: 13px;
    color: #64748b;
    margin-top: 2px;
}

.va-hero-date {
    margin-left: auto;
    text-align: right;
}

.va-hero-date-lab {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #94a3b8;
}

.va-hero-date-val {
    font-size: 16px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #0f172a;
}

.va-split-row {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
    gap: 14px;
    align-items: stretch;
    margin-bottom: 14px;
}

.va-split-row > .va-detail-card {
    margin-bottom: 0;
    height: 100%;
}

.va-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 14px;
    align-items: start;
}

.va-detail-main-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.va-numro {
    font-size: 15px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #92400e;
    letter-spacing: .02em;
}

.va-hist-timeline {
    position: relative;
    padding-left: 8px;
}

.va-hist-timeline::before {
    content: '';
    position: absolute;
    left: 22px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, #3b82f6 0%, #8b5cf6 50%, #06b6d4 100%);
    border-radius: 1px;
}

.va-hist-item {
    display: flex;
    gap: 12px;
    padding: 0 0 16px;
    position: relative;
}

.va-hist-item:last-child {
    padding-bottom: 0;
}

.va-hist-ico {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex: 0 0 auto;
    z-index: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
    background: #e2e8f0;
}

.va-hist-ico.draft { background: linear-gradient(135deg, #6b7280, #9ca3af); }
.va-hist-ico.info { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.va-hist-ico.validated { background: linear-gradient(135deg, #10b981, #059669); }
.va-hist-ico.rejected { background: linear-gradient(135deg, #ef4444, #dc2626); }
.va-hist-ico.pending { background: linear-gradient(135deg, #f59e0b, #d97706); }
.va-hist-ico.modified { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }

.va-hist-body {
    flex: 1;
    min-width: 0;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 12px;
}

.va-hist-msg {
    font-size: 13.5px;
    font-weight: 600;
    color: #374151;
    line-height: 1.45;
}

.va-hist-extra {
    margin-top: 4px;
    font-size: 12.5px;
    color: #4b5563;
    line-height: 1.4;
}

.va-hist-date {
    margin-top: 4px;
    font-size: 12px;
    color: #6b7280;
}

.va-detail-page [data-name="conges-counters-slot"] .conges-counters-container {
    margin-top: 0;
    padding: 0;
    background: transparent;
}

.va-detail-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    margin-bottom: 14px;
}

.va-detail-card:last-child {
    margin-bottom: 0;
}

.va-detail-card-h {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 12px;
}

.va-detail-dl {
    margin: 0;
}

.va-detail-row {
    display: grid;
    grid-template-columns: 42% 1fr;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.va-detail-row:last-child {
    border-bottom: 0;
}

.va-detail-row dt {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #94a3b8;
    margin: 0;
}

.va-detail-row dd {
    margin: 0;
    font-size: 13.5px;
    font-weight: 650;
    color: #0f172a;
    word-break: break-word;
}

.va-prose {
    font-size: 14px;
    line-height: 1.55;
    color: #334155;
    white-space: pre-wrap;
}

.va-refus-box {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.va-origin-card {
    width: 100%;
    text-align: left;
    border: 1px solid #fde68a;
    background: #fffbeb;
    border-radius: 12px;
    padding: 12px 14px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font: inherit;
    color: inherit;
}

.va-origin-card:hover {
    background: #fef3c7;
}

.va-origin-card strong {
    font-size: 14px;
    color: #78350f;
}

.va-origin-go {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 700;
    color: #b45309;
}

.va-justif-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    background: #fef3c7;
    color: #92400e;
    vertical-align: middle;
}

.va-justif-badge.is-required {
    background: #fee2e2;
    color: #b91c1c;
}

.va-justif-file {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    max-width: 100%;
}

.va-justif-file .fa-file-pdf {
    color: #b91c1c;
}

.va-justif-file:hover {
    background: #fff7ed;
    border-color: #fdba74;
    color: #9a3412;
    text-decoration: none;
}

.va-justif-file.is-compact {
    margin-top: 10px;
    width: 100%;
    box-sizing: border-box;
}

.va-justif-missing {
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    font-size: 12.5px;
    font-weight: 600;
}

.va-justif-missing.is-danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.va-timeline {
    position: relative;
    padding-left: 4px;
}

.va-tl-item {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    position: relative;
}

.va-tl-ico {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #fff;
    flex: 0 0 auto;
    background: #94a3b8;
}

.va-tl-item.tone-ok .va-tl-ico { background: #16a34a; }
.va-tl-item.tone-warn .va-tl-ico { background: #d97706; }
.va-tl-item.tone-danger .va-tl-ico { background: #dc2626; }
.va-tl-item.tone-info .va-tl-ico { background: #0284c7; }
.va-tl-item.tone-neutral .va-tl-ico { background: #64748b; }

.va-tl-msg {
    font-size: 13.5px;
    font-weight: 600;
    color: #334155;
    line-height: 1.4;
}

.va-tl-date {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 2px;
}

@media (max-width: 1100px) {
    .va-split-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 960px) {
    .va-detail-grid {
        grid-template-columns: 1fr;
    }

    .va-detail-page .va-hero {
        flex-wrap: wrap;
    }

    .va-hero-date {
        margin-left: 0;
        text-align: left;
        width: 100%;
    }
}

