﻿/* App_Themes/standard/controls.css — contrôles mutualisés (pagers, btn-xs, callout-filtre, etc.) */

.btn.btn-xs,
.btn-group-sm > .btn.btn-xs {
    padding: 5px !important;
    font-size: 12px !important;
    line-height: 1 !important;
    border-radius: 3px !important;
    height: 22px !important;
    min-height: 22px !important;
    max-height: 22px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.btn-theme-neutral.btn-xs,
.btn-group-sm > .btn.btn-theme-neutral.btn-xs {
    font-size: 12px !important;
    line-height: 1 !important;
}

/* form-control-xs / form-select-xs : Bootstrap 5 n'a pas de variante xs (SkinID xs) */
.form-control-xs {
    min-height: calc(1.5em + 0.35rem + 2px);
    padding: 0.125rem 0.375rem;
    font-size: 0.75rem;
    border-radius: var(--bs-border-radius-sm, 0.25rem);
}
.form-select-xs {
    padding-top: 0.125rem;
    padding-bottom: 0.125rem;
    padding-left: 0.375rem;
    font-size: 0.75rem;
    border-radius: var(--bs-border-radius-sm, 0.25rem);
}

input.form-control.txtBoxDate {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%236c757d' d='M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5M1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1rem 1rem;
    padding-right: 2rem;
}

.btn.btn-hover-primary:hover,
.btn.btn-hover-primary:focus,
.btn.btn-hover-primary[aria-expanded="true"] {
    color: #fff;
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}
.btn.btn-hover-success:hover,
.btn.btn-hover-success:focus,
.btn.btn-hover-success[aria-expanded="true"] {
    color: #fff;
    background-color: var(--bs-success);
    border-color: var(--bs-success);
}
.btn.btn-hover-danger:hover,
.btn.btn-hover-danger:focus,
.btn.btn-hover-danger[aria-expanded="true"] {
    color: #fff;
    background-color: var(--bs-danger);
    border-color: var(--bs-danger);
}
.btn.btn-hover-warning:hover,
.btn.btn-hover-warning:focus,
.btn.btn-hover-warning[aria-expanded="true"] {
    color: #000;
    background-color: var(--bs-warning);
    border-color: var(--bs-warning);
}

.gv_pager .form-control-sm,
.gv_pager .form-select-sm,
.gv_pager .input-group-sm > .input-group-text,
.gv_pager .input-group-text-sm,
.bg-light.container-fluid .input-group-sm .form-control-sm,
.bg-light.container-fluid .input-group-sm .form-select-sm,
.bg-light.container-fluid .input-group-sm > .input-group-text,
.bg-light.container-fluid .input-group-text-sm {
    height: 24px;
    min-height: 24px;
    line-height: 24px;
    font-size: 12px;
    padding-top: 2px;
    padding-bottom: 2px;
    border-radius: var(--bs-border-radius-sm, 0.25rem);
}

.gv_pager .input-group-sm,
.bg-light.container-fluid .input-group-sm {
    height: 24px;
    min-height: 24px;
}

.gv_pager .btn-group-sm,
.bg-light.container-fluid .btn-group-sm {
    height: 24px;
}

.filter-bar .btn-sm,
.callout-filtre .btn-sm,
.filter-bar .form-select-sm,
.callout-filtre .form-select-sm {
    font-size: 0.875rem;
    line-height: 1.5;
}

input.form-check-input.cr-form-check-table-cell[type="checkbox"] {
    margin-top: 0;
    vertical-align: middle;
}

/* Skin CheckBox / CheckBoxList (défaut + SkinID Liste) — alignement + accent neutre */
.cr-checks input[type="checkbox"],
span.cr-checks > input[type="checkbox"] {
    vertical-align: middle;
    margin: 0 0.4rem 0 0;
    accent-color: #6c757d;
}
.cr-checks label,
span.cr-checks > label {
    vertical-align: middle;
    margin: 0 1.25rem 0 0;
    font-weight: normal;
    display: inline;
}
table.cr-checks {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.35rem;
}
table.cr-checks td {
    vertical-align: middle;
    padding: 0.15rem 1rem 0.15rem 0;
    white-space: nowrap;
}
table.cr-checks td label {
    margin-right: 0;
}

.callout-filtre,
.filter-bar {
    background-color: #fafafa !important;
    border: 0;
    border-radius: 8px;
    padding: .75rem 1rem;
}

.callout-breadcrumb {
    margin: 0 0 .75rem 0 !important;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    order: -1;
}
.callout-breadcrumb .breadcrumb {
    margin-bottom: 0;
}
.callout-breadcrumb + .row {
    margin-top: 0;
}

.breadcrumb {
    --bs-breadcrumb-divider: "›";
    --bs-breadcrumb-divider-color: #6c757d;
    --bs-breadcrumb-item-active-color: #212529;
    --bs-breadcrumb-bg: transparent;
    background-color: transparent;
    border: 0;
    border-left: 3px solid #ced4da;
    border-radius: 0;
    padding: 0 0 0 .75rem;
    margin: 0;
    font-size: .875rem;
}
.breadcrumb-item.active {
    font-weight: 600;
}
.breadcrumb-item a {
    color: #495057;
    text-decoration: none;
    border-radius: .25rem;
    padding: .1rem .35rem;
    margin: 0 -.15rem;
}
.breadcrumb-item a:hover,
.breadcrumb-item a:focus-visible {
    color: #212529;
    background-color: #f1f3f5;
    text-decoration: none;
}

.cr-maxw-900 {
    max-width: 900px;
}

/* ─── gv-wrapper + gv_light — encadrement et skin GridView ─ */
/* Surcharge /_shared/Styles/controles.css : table th { background #6c757d !important } */

.gv-wrapper {
    background: #ffffff;
    border: 0.5px solid rgba(0, 0, 0, 0.18);
    border-radius: 10px;
    box-shadow: 0 .25rem .75rem rgba(16, 24, 40, .1);
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.5rem;
}

.gv-wrapper .table-responsive {
    max-width: 100%;
    overflow-x: auto;
}

.gv-wrapper.gv-wrapper-scroll {
    max-height: 65vh;
    overflow-y: auto;
}

.gv-wrapper.gv-wrapper-scroll table.gv-light thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}

.gv-light {
    width: 100%;
    border-collapse: collapse;
    font-family: inherit;
    font-size: 0.8125rem;
    margin: 0;
}

table.gv-light th,
table.gv-light thead th,
table.gv-light th.gv-light-thead {
    background-color: #f8f9fa !important;
    color: #6c757d !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px;
    text-align: left;
    border-bottom: 0.5px solid rgba(0,0,0,0.15) !important;
    white-space: nowrap;
    box-shadow: none !important;
    padding: 0.75rem 0.875rem;
    line-height: 1.25;
    --bs-table-bg-state: transparent !important;
    --bs-table-color-state: #6c757d !important;
}

table.gv-light thead tr:hover th,
table.gv-light th:hover {
    background-color: #f8f9fa !important;
    color: #6c757d !important;
}

/* colonnes triables : lien de tri dans l'en-tête */
table.gv-light th a,
table.gv-light thead th a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #6c757d !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

table.gv-light th a::after,
table.gv-light thead th a::after {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.7em;
    opacity: 0.55;
    content: "\f0dc";
}

table.gv-light th.gv-light-sort-asc a::after,
table.gv-light thead th.gv-light-sort-asc a::after {
    content: "\f0de";
    opacity: 1;
}

table.gv-light th.gv-light-sort-desc a::after,
table.gv-light thead th.gv-light-sort-desc a::after {
    content: "\f0dd";
    opacity: 1;
}

table.gv-light th a:hover,
table.gv-light th a:focus,
table.gv-light thead th a:hover,
table.gv-light thead th a:focus {
    color: #495057 !important;
    text-decoration: none !important;
    background: transparent !important;
}

/* liens dans le corps du tableau (noir gras, sans soulignement) ; les a.btn gardent la graisse Bootstrap */
table.gv-light tbody td a:not(.btn),
table.gv-light .gv-light-row td a:not(.btn) {
    color: #212529 !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}

table.gv-light tbody td a:not(.btn):hover,
table.gv-light tbody td a:not(.btn):focus,
table.gv-light .gv-light-row td a:not(.btn):hover,
table.gv-light .gv-light-row td a:not(.btn):focus {
    color: #212529 !important;
    text-decoration: none !important;
    font-weight: 700 !important;
}

.gv-light-row td {
    color: #212529;
    border-bottom: 0.5px solid rgba(0,0,0,0.07);
    vertical-align: middle;
    background-color: #ffffff;
    transition: background-color 0.1s;
    padding: 0.5rem 0.875rem;
}

.gv-light tbody tr:hover td {
    background-color: #f8f9fa;
}

.gv-light-row-selected td {
    background-color: #e6f1fb !important;
    color: #185fa5;
}

.gv-light tbody tr:last-child td {
    border-bottom: none;
}

.gv-light-pager td {
    padding: 10px 14px;
    color: #6c757d;
    border-top: 0.5px solid rgba(0,0,0,0.07);
    background: #ffffff;
}

.gv-light-pager a,
.gv-light-pager span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    border-radius: 6px;
    border: 0.5px solid rgba(0,0,0,0.12);
    font-size: 0.75rem;
    color: #6c757d;
    text-decoration: none;
    margin: 0 2px;
}

.gv-light-pager span {
    background: #f8f9fa;
    font-weight: 500;
    color: #212529;
}

.gv-light-empty td {
    padding: 24px 14px;
    text-align: center;
    font-size: 0.8125rem;
    color: #adb5bd;
    background: #ffffff;
}

/* Badge statut dossier compact (Postulation.Statut.Badge.Format.Compact) */
.badge-statut-compact {
    font-size: 0.65rem !important;
    font-weight: 500 !important;
    line-height: 1.2;
    padding: 0.12rem 0.4rem !important;
}

/* Statuts terminaux (refus / accepté / abandon) : un cran plus lisible en liste */
.badge-statut-compact.badge-statut-fort {
    font-size: 0.7rem !important;
    font-weight: 600 !important;
    padding: 0.15rem 0.45rem !important;
}

.badge-souhaitable {
    color: #6c757d;
    background-color: transparent;
    border: 1px solid #6c757d;
}

.badge-obligatoire {
    color: #fff;
    background-color: #212529;
    border: 1px solid #212529;
}
