/* GPerso + AdminLTE (Bootstrap 4) tweaks */
.table.align-middle td,
.table.align-middle th {
    vertical-align: middle;
}

.content-wrapper .container-fluid .table-responsive {
    background: #fff;
    border-radius: 0.25rem;
    box-shadow: 0 0 1px rgba(0, 0, 0, 0.125), 0 1px 3px rgba(0, 0, 0, 0.2);
    padding: 0;
}

.content-wrapper .container-fluid > .table-responsive .table {
    margin-bottom: 0;
}

.text-underline {
    text-decoration: underline;
}

/* Select2 + Bootstrap 4 (large listes, éviter débordement) */
.select2-container--bootstrap4 .select2-selection {
    min-height: calc(2.25rem + 2px);
}

.select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered {
    line-height: calc(2.25rem + 2px - 4px);
}

.content-wrapper select.js-select2.is-invalid ~ .select2-container .select2-selection {
    border-color: #dc3545;
}

/* Modales — même esprit que les cartes / bandeaux (AdminLTE primary) */
.modal .modal-content {
    border: none;
    border-radius: 0.5rem;
    box-shadow:
        0 0.75rem 2rem rgba(0, 0, 0, 0.12),
        0 0 1px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.modal .modal-header {
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: none;
    color: #fff;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.modal .modal-header .modal-title {
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.35;
}

.modal .modal-header .close {
    margin: 0;
    padding: 0.5rem;
    color: #fff;
    text-shadow: none;
    opacity: 0.88;
}

.modal .modal-header .close:hover,
.modal .modal-header .close:focus {
    color: #fff;
    opacity: 1;
    outline: none;
}

.modal .modal-body {
    padding: 1.25rem;
    background: #fff;
}

.modal .modal-footer {
    padding: 0.875rem 1.25rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: #f8f9fa;
}

.modal.gp-modal--info .modal-header {
    background: linear-gradient(135deg, #17a2b8 0%, #117a8b 100%);
}

.modal.gp-modal--success .modal-header {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}

.modal.gp-modal--danger .modal-header {
    background: linear-gradient(135deg, #dc3545 0%, #bd2130 100%);
}

.modal .repartition-hint-modal-accounts {
    max-height: 50vh;
    overflow: auto;
    padding: 0.15rem 0.1rem;
}

/* Agents : import, ajout, édition (bandeau + cartes formulaire) */
.agents-screen-head {
    background: linear-gradient(125deg, #f8f9fc 0%, #ffffff 42%, #f2f4fa 100%);
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 0.5rem;
    padding: 0.9rem 1.1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.045);
    border-left: 4px solid #4e73df;
}

.agents-screen-head-inner {
    gap: 0.65rem 1rem;
}

.agents-screen-head-icon {
    width: 2.65rem;
    height: 2.65rem;
    border-radius: 0.45rem;
    background: linear-gradient(145deg, #e8eeff 0%, #d4e0ff 100%);
    color: #4e73df;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
    box-shadow: 0 1px 5px rgba(78, 115, 223, 0.22);
}

.agents-screen-head-title {
    font-size: 1.28rem;
    font-weight: 700;
    color: #2e2f37;
    letter-spacing: -0.018em;
    line-height: 1.25;
    margin: 0;
}

.agents-screen-head-actions .btn {
    font-weight: 600;
    padding: 0.42rem 0.95rem;
    border-radius: 0.35rem;
    font-size: 0.9rem;
}

.agents-screen-head-actions .btn-primary {
    box-shadow: 0 2px 6px rgba(78, 115, 223, 0.22);
}

@media (max-width: 575.98px) {
    .agents-screen-head-title {
        font-size: 1.1rem;
    }

    .agents-screen-head-icon {
        width: 2.35rem;
        height: 2.35rem;
        font-size: 0.95rem;
    }
}

.agents-screen-intro {
    border-left: 3px solid #4e73df;
    padding: 0.65rem 0.9rem;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, #f0f4ff 0%, #f8f9fc 100%);
    border-radius: 0 0.35rem 0.35rem 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #5a5c69;
}

.agents-form-card {
    border-radius: 0.45rem !important;
    /* overflow visible : évite de rogner le bas du bloc personne (ex. champ Image) lorsque
       la colonne agent est plus haute et que la carte est contrainte en hauteur. */
    overflow: visible;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    margin-bottom: 1rem;
}

.agents-form-card > .card-header {
    background: linear-gradient(90deg, #f0f4ff 0%, #ffffff 55%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-weight: 600;
    color: #2e2f37;
    padding: 0.65rem 1rem;
}

.agents-form-card > .card-header .agents-form-section-icon {
    color: #4e73df;
    width: 1.2rem;
    text-align: center;
}

.agents-form-card .card-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.agents-form-card .card-body {
    padding: 1.25rem 1.35rem;
}

.agents-form-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0.85rem 1.15rem;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fc 100%);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.45rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.agents-form-footer .btn-primary {
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(78, 115, 223, 0.2);
}

.agent-personne-duplicate-prompt {
    background: linear-gradient(180deg, #fffdf5 0%, #fff9e8 100%);
    border-color: rgba(246, 194, 62, 0.45) !important;
}

.agent-personne-duplicate-prompt__identity dt {
    color: #6c757d;
}

.agents-import-file-zone {
    border: 1px dashed rgba(78, 115, 223, 0.45);
    border-radius: 0.4rem;
    padding: 1rem 1.1rem;
    background: rgba(240, 244, 255, 0.5);
}

.agents-import-file-zone .form-control-file {
    padding: 0.35rem 0;
}

.agents-form-card .col-form-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: #5a5c69;
}

.agents-form-layout {
    margin-bottom: 0.25rem;
}

.agents-form-subsection {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #4e73df;
    margin: 0 0 0.65rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid rgba(78, 115, 223, 0.2);
}

.agents-form-subsection-spaced {
    margin-top: 1.15rem;
}

.agents-form-field-label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: #5a5c69;
    margin-bottom: 0.5rem;
}

.agents-form-inline-options {
    min-height: 2.1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.75rem;
}

.agents-form-panel {
    padding: 0.15rem 0 0;
}

.agents-form-panel--spaced {
    margin-top: 1.1rem;
    padding-top: 1.1rem;
    border-top: 1px dashed rgba(78, 115, 223, 0.22);
}

.agents-form-field-box {
    padding: 0.45rem 0.65rem;
    border-radius: 0.35rem;
    background: #f8f9fc;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.agents-form-etat-hint {
    font-size: 0.875rem;
    line-height: 1.45;
    margin-bottom: 1rem !important;
}

.agents-form-domaine-row .btn {
    align-self: stretch;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.agents-form-card .form-control,
.agents-form-card .select2-container--bootstrap4 .select2-selection {
    border-radius: 0.35rem;
}

.agents-form-card .form-control:focus {
    border-color: #4e73df;
    box-shadow: 0 0 0 0.15rem rgba(78, 115, 223, 0.18);
}

.app-main-footer {
    padding: 0.65rem 1rem;
    background: #f8f9fc;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.app-main-footer-inner {
    gap: 0.35rem 1rem;
}

.app-footer-copyright {
    font-size: 0.8rem;
}

.app-footer-brand-version {
    font-size: 0.8rem;
}

@media (min-width: 992px) {
    .agents-form-layout .agents-form-card {
        margin-bottom: 0;
    }
}

/* ——— Médiathèque agents (/mediasAgents) ——— */
.medias-library-head {
    background: linear-gradient(125deg, #f8f9fc 0%, #ffffff 42%, #f2f4fa 100%);
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 0.5rem;
    padding: 1rem 1.15rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.045);
    border-left: 4px solid #36b9cc;
}

.medias-library-head-inner {
    gap: 0.75rem 1rem;
}

.medias-library-head-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.45rem;
    background: linear-gradient(145deg, #e3f8fa 0%, #c5eef3 100%);
    color: #36b9cc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
    box-shadow: 0 1px 5px rgba(54, 185, 204, 0.28);
}

.medias-library-head-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #2e2f37;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 0;
}

.medias-library-head-sub {
    font-size: 0.9rem;
    color: #5a5c69;
    margin-top: 0.35rem;
}

.medias-library-head-actions .btn {
    font-weight: 600;
    border-radius: 0.35rem;
}

.medias-library-filters {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    border-radius: 0.65rem;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06) !important;
    position: relative;
    z-index: 2;
}

.medias-library-filters-header {
    background: linear-gradient(120deg, #1e3a52 0%, #2d4a63 55%, #3d5a73 100%);
    color: #fff;
    border: none;
}

.medias-library-filters-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 0.35rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.medias-library-filters-title {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin: 0;
    color: #fff;
    line-height: 1.2;
}

.medias-library-filters-hint {
    font-size: 0.72rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.25;
}

.medias-library-filters-body {
    padding: 0.5rem 0.65rem 0.55rem;
}

.medias-library-filter-field {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.4rem;
    padding: 0.4rem 0.5rem 0.45rem;
    height: 100%;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.medias-library-filter-field:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

.medias-library-filter-field label {
    letter-spacing: 0.04em;
    font-size: 0.625rem;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.medias-library-filter-form .medias-library-filter-date {
    border-radius: 0.35rem;
    border-color: #ced4da;
}

.medias-library-filter-form .medias-library-filter-date:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.15rem rgba(0, 123, 255, 0.12);
}

/* Flatpickr (champs date filtres médiathèque) : même gabarit que form-control-sm */
#mediasLibraryFilters .flatpickr-alt-input {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    min-height: calc(1.5em + 0.5rem + 2px);
    border-radius: 0.35rem;
    border: 1px solid #ced4da;
}

/* Colonne « agent » plus étroite en desktop : le select reste lisible sans empiéter sur les boutons */
@media (min-width: 992px) {
    .medias-library-filters .medias-library-filter-agent .select2-selection__rendered {
        max-width: 11.5rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* Select2 dans la médiathèque : pleine largeur du champ */
.medias-library-filters .select2-container {
    width: 100% !important;
}

.medias-library-filters .select2-container--bootstrap4 .select2-selection {
    min-height: calc(1.5em + 0.5rem + 2px);
    font-size: 0.875rem;
    border-radius: 0.3rem;
    border-color: #ced4da;
    padding-top: 0.1rem;
    padding-bottom: 0.1rem;
}

.medias-library-filters .select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered {
    line-height: calc(1.5em + 0.25rem);
    padding-left: 0.5rem;
    padding-right: 1.25rem;
}

.medias-library-filters .select2-container--bootstrap4.select2-container--focus .select2-selection {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.15rem rgba(0, 123, 255, 0.12);
}

.medias-library-filters .select2-dropdown {
    z-index: 1060;
    border-color: #ced4da;
    border-radius: 0.35rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.medias-library-filters-actions .btn {
    font-weight: 600;
    border-radius: 0.4rem;
}

.medias-library-filters-actions .btn-primary {
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.25);
}

.medias-library-grid {
    margin-left: -0.35rem;
    margin-right: -0.35rem;
}

.medias-library-grid > .col {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

.medias-library-card {
    border-radius: 0.45rem !important;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.medias-library-card:hover {
    box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-2px);
}

.medias-library-card-preview {
    height: 6.75rem;
    background: linear-gradient(180deg, #eef2f7 0%, #e2e8f0 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.medias-library-card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.medias-library-card-preview--icon {
    font-size: 2.1rem;
}

.medias-library-card-preview--placeholder {
    font-size: 1.65rem;
    opacity: 0.45;
}

.medias-library-card-desc {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 0;
}

.medias-library-card-actions {
    border-color: rgba(0, 0, 0, 0.06) !important;
}

.medias-library-empty {
    background: #fafbfc;
    border: 1px dashed rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
}

.medias-library-empty-icon {
    font-size: 3rem;
    color: #c5c9d4;
}

.medias-library-form-card {
    border-radius: 0.45rem !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    margin-bottom: 1rem;
}

.medias-library-form-card > .card-header {
    background: linear-gradient(90deg, #e8f7f9 0%, #ffffff 55%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-weight: 600;
    color: #2e2f37;
    padding: 0.65rem 1rem;
}

/* Formulaire médias agent — éditeur riche + option photo de profil */
.medias-agent-description-panel__head {
    background: linear-gradient(90deg, #e8f4fc 0%, #ffffff 72%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.medias-agent-description-panel .note-editor.note-frame {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.35rem;
    overflow: hidden;
    background: #fff;
}

.medias-agent-description-panel .note-toolbar {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 0.35rem 0.5rem;
    background: #fafbfc;
}

.medias-agent-description-panel .note-editing-area,
.medias-agent-description-panel .note-editable {
    background: #fff;
}

.medias-agent-rich-text {
    word-break: break-word;
}

.medias-agent-rich-text p:last-child {
    margin-bottom: 0;
}

.medias-agent-rich-text ul,
.medias-agent-rich-text ol {
    margin-bottom: 0.35rem;
    padding-left: 1.15rem;
}

.medias-agent-profile-option {
    cursor: pointer;
    transition: box-shadow 0.18s ease, transform 0.12s ease;
}

.medias-agent-profile-option:hover {
    box-shadow: 0 0.4rem 1.1rem rgba(0, 123, 255, 0.14) !important;
}

.medias-agent-profile-option__accent {
    width: 5px;
    flex-shrink: 0;
    background: #dee2e6;
    transition: background 0.2s ease;
}

.medias-agent-profile-option__input:focus ~ .medias-agent-profile-option__accent,
.medias-agent-profile-option__input:focus ~ .medias-agent-profile-option__body {
    box-shadow: 0 0 0 0.15rem rgba(0, 123, 255, 0.22);
}

.medias-agent-profile-option__input:checked ~ .medias-agent-profile-option__accent {
    background: linear-gradient(180deg, #2b8cff 0%, #007bff 45%, #0056b3 100%);
}

.medias-agent-profile-option__input:checked ~ .medias-agent-profile-option__body {
    border-color: rgba(0, 123, 255, 0.35) !important;
    background: linear-gradient(135deg, #f3f9ff 0%, #ffffff 55%) !important;
}

.medias-agent-profile-option__icon {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.35rem;
    color: #6c757d;
    background: #f1f3f5;
    transition: color 0.2s ease, background 0.2s ease;
}

.medias-agent-profile-option__input:checked ~ .medias-agent-profile-option__body .medias-agent-profile-option__icon {
    color: #007bff;
    background: rgba(0, 123, 255, 0.12);
}

@media (max-width: 575.98px) {
    .medias-library-head-title {
        font-size: 1.1rem;
    }

    .medias-library-head-icon {
        width: 2.35rem;
        height: 2.35rem;
        font-size: 0.95rem;
    }
}

/* Tableau de bord (/) */
.home-dashboard-page .home-dashboard-hero {
    background: linear-gradient(135deg, #eef5ff 0%, #ffffff 52%, #f4f9fc 100%);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.home-dashboard-hero-icon {
    width: 3.25rem;
    height: 3.25rem;
    background: linear-gradient(145deg, #007bff 0%, #0056b3 100%);
    box-shadow: 0 0.3rem 0.85rem rgba(0, 123, 255, 0.35);
}

.home-dashboard-hero-lead {
    line-height: 1.45;
    max-width: 48rem;
}

.dashboard-kpi-card {
    border-radius: 0.5rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    border-top: 4px solid transparent !important;
}

.dashboard-kpi-card:hover {
    box-shadow: 0 0.45rem 1.1rem rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-2px);
}

.dashboard-kpi-card--info {
    border-top-color: #17a2b8 !important;
}

.dashboard-kpi-card--success {
    border-top-color: #28a745 !important;
}

.dashboard-kpi-card--warning {
    border-top-color: #ffc107 !important;
}

.dashboard-kpi-card--primary {
    border-top-color: #007bff !important;
}

.dashboard-kpi-icon {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.1rem;
}

.dashboard-kpi-icon--info {
    background: linear-gradient(145deg, #17a2b8 0%, #117a8b 100%);
}

.dashboard-kpi-icon--success {
    background: linear-gradient(145deg, #28a745 0%, #1e7e34 100%);
}

.dashboard-kpi-icon--warning {
    background: linear-gradient(145deg, #ffda6a 0%, #ffc107 100%);
}

.dashboard-kpi-icon--primary {
    background: linear-gradient(145deg, #007bff 0%, #0056b3 100%);
}

.dashboard-kpi-label {
    letter-spacing: 0.03em;
    font-size: 0.65rem;
}

.dashboard-kpi-value {
    font-size: 1.65rem;
}

.dashboard-kpi-chevron {
    opacity: 0.45;
    font-size: 0.85rem;
}

.home-dashboard-chart-card {
    border-radius: 0.5rem;
    overflow: hidden;
}

.home-dashboard-chart-card-header {
    background: linear-gradient(90deg, #f5f8fc 0%, #ffffff 65%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 0.65rem 1rem;
}

.home-dashboard-chart-card .card-body {
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.home-dashboard-chart-title-icon {
    font-size: 0.95rem;
    opacity: 0.9;
}

.text-purple-dashboard {
    color: #6f42c1;
}

.home-dashboard-search-card.sticky-top {
    top: 1rem;
}

.home-dashboard-search-card-header {
    background: linear-gradient(90deg, #e8f4fc 0%, #ffffff 70%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 0.65rem 1rem;
}

.home-dashboard-search-input-group .form-control:focus {
    box-shadow: none;
    border-color: #ced4da;
}

.home-dashboard-search-input-group .form-control:focus + .input-group-append .input-group-text {
    border-color: #80bdff;
}

.dashboard-search-hit {
    transition: background-color 0.15s ease, border-left-color 0.15s ease;
    border-left: 3px solid transparent;
}

.dashboard-search-hit:hover,
.dashboard-search-hit:focus {
    background-color: #f8fbff;
    border-left-color: #007bff;
}

.home-dashboard-explore-card {
    border-radius: 0.5rem;
    overflow: hidden;
}

.home-dashboard-explore-card-header {
    background: linear-gradient(90deg, #f7f6fb 0%, #ffffff 65%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 0.85rem 1rem;
}

.home-dashboard-explore-header-icon {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
    background: linear-gradient(145deg, #6f42c1 0%, #5a32a3 100%);
    box-shadow: 0 0.2rem 0.55rem rgba(111, 66, 193, 0.35);
}

.home-dashboard-explore-list .list-group-item {
    transition: background-color 0.12s ease, border-left-color 0.12s ease;
    border-left: 3px solid transparent;
}

.home-dashboard-explore-list .list-group-item:hover,
.home-dashboard-explore-list .list-group-item:focus {
    background-color: #fafbff;
    border-left-color: #007bff;
}

/* Utilisateurs système /systemUsers */
.system-users-page .system-users-hero {
    background: linear-gradient(135deg, #f0f4ff 0%, #ffffff 50%, #f5f8fc 100%);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.system-users-hero-icon {
    width: 3rem;
    height: 3rem;
    font-size: 1.15rem;
    background: linear-gradient(145deg, #6f42c1 0%, #5a32a3 100%);
    box-shadow: 0 0.28rem 0.75rem rgba(111, 66, 193, 0.35);
}

.system-users-hero-lead {
    line-height: 1.45;
    max-width: 40rem;
}

/* Liste / formulaires : titre + bouton sur une même barre (md+), pile propre sur mobile */
.system-users-hero-inner {
    row-gap: 0.5rem;
}

.system-users-hero-actions {
    width: 100%;
}

.system-users-btn-hero-primary.btn-block,
.system-users-btn-back.btn-block {
    white-space: normal;
}

@media (min-width: 768px) {
    .system-users-hero-actions {
        width: auto;
        max-width: 100%;
    }

    .system-users-btn-hero-primary.btn-block,
    .system-users-btn-back.btn-block {
        width: auto !important;
        display: inline-block !important;
    }
}

.system-users-list-card {
    border-radius: 0.5rem;
    overflow: hidden;
}

.system-users-table-wrap {
    padding: 1.1rem 1.35rem 1rem;
}

.system-users-table thead th,
.system-users-table tbody td {
    padding: 0.7rem 1rem;
}

.system-users-table-wrap .dataTables_wrapper .dataTables_length,
.system-users-table-wrap .dataTables_wrapper .dataTables_filter {
    margin-bottom: 0.65rem;
}

.system-users-table-wrap .dataTables_wrapper .dataTables_info {
    padding-top: 0.65rem;
    font-size: 0.8rem;
    color: #6c757d;
}

.system-users-table-wrap .dataTables_wrapper .dataTables_paginate {
    padding-top: 0.5rem;
    padding-bottom: 0.35rem;
}

.system-users-col-drag {
    width: 2.5rem;
}

.system-users-drag-handle {
    cursor: grab;
    color: #adb5bd;
    padding: 0.35rem 0.25rem;
    user-select: none;
}

.system-users-drag-handle:hover {
    color: #6f42c1;
}

.system-users-drag-handle:active {
    cursor: grabbing;
}

.system-users-table--reorderable tbody tr.system-users-sortable-ghost {
    opacity: 0.55;
    background: #f0f4ff !important;
}

.system-users-reorder-hint {
    border-left: 3px solid #6f42c1;
    padding-left: 0.65rem;
}

.list-quick-search-wrap {
    max-width: 26rem;
    margin-top: 0.65rem;
}

.list-quick-search-wrap .input-group-text {
    background: #f8f9fc;
    border-color: rgba(0, 0, 0, 0.12);
}

.list-quick-search-active .system-users-drag-handle,
.list-quick-search-active .rubriques-list-drag-handle,
.list-quick-search-active .elements-dossier-agent-drag-handle {
    opacity: 0.35;
    pointer-events: none;
    cursor: not-allowed;
}

.system-users-table thead th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
    color: #5a5c69;
    border-top: none;
    border-bottom-width: 1px;
    background: linear-gradient(180deg, #f8f9fc 0%, #f1f3f9 100%);
    vertical-align: middle;
    white-space: nowrap;
}

.system-users-table tbody td {
    vertical-align: middle;
}

.system-users-table tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.04);
}

.system-users-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
    align-items: center;
}

.system-users-actions .btn {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.22rem 0.5rem;
    border-radius: 0.28rem;
    line-height: 1.25;
}

.system-users-form-page .system-users-form-hero {
    background: linear-gradient(135deg, #f5f3ff 0%, #ffffff 55%, #f8f9fc 100%);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.system-users-hero-icon--form {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.05rem;
    background: linear-gradient(145deg, #5b21b6 0%, #4c1d95 100%);
    box-shadow: 0 0.25rem 0.65rem rgba(91, 33, 182, 0.35);
}

.system-users-form-card,
.system-users-functions-card {
    border-radius: 0.5rem;
    overflow: hidden;
}

.system-users-form-page .system-users-form-card .row.mb-3,
.system-users-stacked-form .row.mb-3 {
    margin-bottom: 0.65rem !important;
}

.system-users-stacked-form .system-users-form-section {
    background: #fff;
}

.system-users-stacked-form .system-users-form-section--muted {
    background: linear-gradient(180deg, #f6f8fc 0%, #fafbfd 35%, #ffffff 100%);
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.system-users-edit-hero-person {
    font-size: 1.05rem;
    line-height: 1.35;
    word-break: break-word;
}

.system-users-edit-column-title {
    letter-spacing: 0.04em;
    font-size: 0.72rem;
}

.system-users-edit-columns .system-users-form-card,
.system-users-edit-columns .system-users-functions-card {
    min-height: 0;
}

.system-users-form-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #3d4051;
}

.system-users-form-section-lead {
    line-height: 1.45;
    max-width: 40rem;
}

.system-users-stacked-hint {
    display: flex;
    align-items: flex-start;
    line-height: 1.5;
    border-radius: 0.4rem !important;
}

.system-users-stacked-hint .fa-info-circle {
    margin-top: 0.12rem;
    flex-shrink: 0;
}

.system-users-stacked-footer {
    gap: 0.5rem;
}

.system-users-functions-card-header {
    background: linear-gradient(90deg, #f0f4ff 0%, #ffffff 70%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    padding: 0.85rem 1rem;
}

.system-users-functions-header-icon {
    width: 2.4rem;
    height: 2.4rem;
    font-size: 0.95rem;
    background: linear-gradient(145deg, #007bff 0%, #0056b3 100%);
    box-shadow: 0 0.2rem 0.5rem rgba(0, 123, 255, 0.3);
}

.system-users-nested-table-wrap {
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 0.35rem;
    overflow: hidden;
}

.system-users-fn-row-num-col {
    width: 2.5rem;
    white-space: nowrap;
    text-transform: none;
    letter-spacing: normal;
}

.system-users-nested-table thead th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 700;
    color: #5a5c69;
    background: #f8f9fc;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.system-users-assign-form {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    border-color: rgba(0, 0, 0, 0.08) !important;
}

/* Tableau de bord — encart stats au-dessus de la recherche agent */
.dashboard-search-sidebar-stats .letter-spacing-tight {
    letter-spacing: 0.04em;
}

.dashboard-search-sidebar-stats-total .display-4 {
    font-size: 2.25rem;
}

.dashboard-search-stat-icon-wrap {
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
}

.dashboard-search-results-wrap {
    max-height: 16rem;
    overflow-y: auto;
    min-height: 0;
}

.dashboard-age-highlight-card {
    transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
    border-left-width: 3px !important;
}

.dashboard-age-highlight-card--oldest {
    border-left-color: #6c757d !important;
}

.dashboard-age-highlight-card--youngest {
    border-left-color: #17a2b8 !important;
}

.dashboard-age-highlight-card:hover,
.dashboard-age-highlight-card:focus {
    box-shadow: 0 0.25rem 0.65rem rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-1px);
    text-decoration: none;
}

.home-pyramid-age-chart {
    width: 100%;
}

.home-dashboard-chart-tabs .nav-link {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    color: #5a5c69;
}

.home-dashboard-chart-tabs .nav-link.active {
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
    color: #fff;
}

.home-age-bracket-kpi {
    background: #fff;
}

.home-age-bracket-kpi__value {
    font-size: 1.65rem;
    line-height: 1.1;
}

.home-age-bracket-kpi--total {
    border-top: 3px solid #6c757d;
}

.home-age-bracket-kpi--male {
    border-top: 3px solid #007bff;
}

.home-age-bracket-kpi--male .home-age-bracket-kpi__value {
    color: #007bff;
}

.home-age-bracket-kpi--female {
    border-top: 3px solid #e83e8c;
}

.home-age-bracket-kpi--female .home-age-bracket-kpi__value {
    color: #e83e8c;
}

.home-age-bracket-table thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.home-age-bracket-col-male {
    color: #007bff;
}

.home-age-bracket-col-female {
    color: #e83e8c;
}

.home-age-bracket-table-footer {
    background: linear-gradient(90deg, #f5f8fc 0%, #ffffff 70%);
}

/* Tableau de bord — liste Agents par grade (colonne recherche) */
.dashboard-search-agents-by-grade {
    margin-top: 0.35rem;
}

.dashboard-search-agents-by-grade__shell {
    border-radius: 0.5rem;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.07);
    box-shadow: 0 0.15rem 0.45rem rgba(0, 0, 0, 0.06);
    border-top: 3px solid #17a2b8;
}

.dashboard-search-agents-by-grade__head {
    padding: 0.55rem 0.75rem 0.5rem;
    background: linear-gradient(90deg, #eef8fb 0%, #ffffff 72%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.dashboard-search-agents-by-grade__head-icon {
    width: 2.125rem;
    height: 2.125rem;
    font-size: 0.9rem;
    background: linear-gradient(145deg, #17a2b8 0%, #117a8b 100%);
    box-shadow: 0 0.2rem 0.5rem rgba(23, 162, 184, 0.35);
}

.dashboard-search-agents-by-grade__meta {
    font-size: 0.68rem;
    line-height: 1.35;
    margin-top: 0.1rem;
    opacity: 0.92;
}

.dashboard-search-agents-by-grade__empty {
    background: linear-gradient(180deg, #fafcfd 0%, #ffffff 100%);
}

.dashboard-search-agents-by-grade__empty-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(23, 162, 184, 0.1);
    font-size: 1rem;
}

.dashboard-search-agents-by-grade__list {
    max-height: min(26rem, 58vh);
    overflow-y: auto;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(23, 162, 184, 0.45) transparent;
}

.dashboard-search-agents-by-grade__list::-webkit-scrollbar {
    width: 6px;
}

.dashboard-search-agents-by-grade__list::-webkit-scrollbar-thumb {
    background: rgba(23, 162, 184, 0.4);
    border-radius: 999px;
}

.dashboard-search-agents-by-grade__list::-webkit-scrollbar-track {
    background: transparent;
}

.dashboard-search-agents-by-grade__row {
    padding: 0.45rem 0.65rem 0.45rem 0.5rem;
    gap: 0.5rem;
    font-size: 0.8125rem;
    line-height: 1.35;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background-color 0.15s ease;
}

.dashboard-search-agents-by-grade__row:last-child {
    border-bottom: none;
}

.dashboard-search-agents-by-grade__row:hover {
    background-color: rgba(23, 162, 184, 0.06);
}

.dashboard-search-agents-by-grade__rank {
    width: 1.35rem;
    text-align: right;
    font-size: 0.65rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    opacity: 0.75;
}

.dashboard-search-agents-by-grade__label {
    font-weight: 500;
    color: #2d3748;
}

.dashboard-search-agents-by-grade__count {
    min-width: 2rem;
    padding: 0.2rem 0.45rem;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #0c5460;
    background: rgba(23, 162, 184, 0.14);
    border-radius: 999px;
    border: 1px solid rgba(23, 162, 184, 0.22);
}

/* Tableau de bord — retraite (colonne synthèse) */
.dashboard-search-retirement {
    margin-top: 0.35rem;
}

.dashboard-search-retirement__shell {
    border-radius: 0.5rem;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.07);
    box-shadow: 0 0.15rem 0.45rem rgba(0, 0, 0, 0.06);
}

.dashboard-search-retirement--at-age .dashboard-search-retirement__shell,
.dashboard-search-retirement--to-retire .dashboard-search-retirement__shell {
    border-top: 3px solid #d4a017;
}

.dashboard-search-retirement--alert .dashboard-search-retirement__shell {
    border-top: 3px solid #fd7e14;
}

.dashboard-search-retirement__head {
    padding: 0.55rem 0.75rem 0.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.dashboard-search-retirement--at-age .dashboard-search-retirement__head,
.dashboard-search-retirement--to-retire .dashboard-search-retirement__head {
    background: linear-gradient(90deg, #fff8e6 0%, #ffffff 72%);
}

.dashboard-search-retirement--alert .dashboard-search-retirement__head {
    background: linear-gradient(90deg, #fff4eb 0%, #ffffff 72%);
}

.dashboard-search-retirement--at-age .dashboard-search-retirement__head-icon,
.dashboard-search-retirement--to-retire .dashboard-search-retirement__head-icon {
    width: 2.125rem;
    height: 2.125rem;
    font-size: 0.9rem;
    background: linear-gradient(145deg, #e6a817 0%, #b8860b 100%);
    box-shadow: 0 0.2rem 0.5rem rgba(212, 160, 23, 0.35);
}

.dashboard-search-retirement--alert .dashboard-search-retirement__head-icon {
    width: 2.125rem;
    height: 2.125rem;
    font-size: 0.9rem;
    background: linear-gradient(145deg, #fd7e14 0%, #e8590c 100%);
    box-shadow: 0 0.2rem 0.5rem rgba(253, 126, 20, 0.35);
}

.dashboard-search-retirement__meta {
    font-size: 0.68rem;
    line-height: 1.35;
    margin-top: 0.1rem;
    opacity: 0.92;
}

.dashboard-search-retirement__empty {
    background: linear-gradient(180deg, #fffdf7 0%, #ffffff 100%);
}

.dashboard-search-retirement--at-age .dashboard-search-retirement__empty-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(212, 160, 23, 0.12);
    font-size: 1rem;
}

.dashboard-search-retirement__list {
    max-height: min(22rem, 48vh);
    overflow-y: auto;
    min-height: 0;
    scrollbar-width: thin;
}

.dashboard-search-retirement--at-age .dashboard-search-retirement__list,
.dashboard-search-retirement--to-retire .dashboard-search-retirement__list {
    scrollbar-color: rgba(212, 160, 23, 0.45) transparent;
}

.dashboard-search-retirement--alert .dashboard-search-retirement__list {
    scrollbar-color: rgba(253, 126, 20, 0.45) transparent;
}

.dashboard-search-retirement__row {
    padding: 0.5rem 0.65rem;
    gap: 0.55rem;
    font-size: 0.8125rem;
    line-height: 1.35;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.dashboard-search-retirement__row:last-child {
    border-bottom: none;
}

.dashboard-search-retirement--at-age .dashboard-search-retirement__row:hover,
.dashboard-search-retirement--at-age .dashboard-search-retirement__row:focus,
.dashboard-search-retirement--to-retire .dashboard-search-retirement__row:hover,
.dashboard-search-retirement--to-retire .dashboard-search-retirement__row:focus {
    background-color: rgba(212, 160, 23, 0.08);
    box-shadow: inset 3px 0 0 #d4a017;
}

.dashboard-search-retirement--alert .dashboard-search-retirement__row:hover,
.dashboard-search-retirement--alert .dashboard-search-retirement__row:focus {
    background-color: rgba(253, 126, 20, 0.08);
    box-shadow: inset 3px 0 0 #fd7e14;
}

.dashboard-search-retirement__avatar {
    width: 2rem;
    height: 2rem;
    font-size: 0.75rem;
    color: #6c757d;
    background: rgba(0, 0, 0, 0.05);
}

.dashboard-search-retirement--at-age .dashboard-search-retirement__avatar,
.dashboard-search-retirement--to-retire .dashboard-search-retirement__avatar {
    color: #856404;
    background: rgba(212, 160, 23, 0.15);
}

.dashboard-search-retirement--alert .dashboard-search-retirement__avatar {
    color: #c35a0a;
    background: rgba(253, 126, 20, 0.12);
}

.dashboard-search-retirement__name {
    color: #2d3748;
    font-size: 0.8125rem;
}

.dashboard-search-retirement__age {
    padding: 0.2rem 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    border-radius: 999px;
    white-space: nowrap;
}

.dashboard-search-retirement--at-age .dashboard-search-retirement__age {
    color: #856404;
    background: rgba(212, 160, 23, 0.16);
    border: 1px solid rgba(212, 160, 23, 0.28);
}

.dashboard-search-retirement--alert .dashboard-search-retirement__age {
    color: #c35a0a;
    background: rgba(253, 126, 20, 0.14);
    border: 1px solid rgba(253, 126, 20, 0.25);
}

.dashboard-search-retirement--to-retire .dashboard-search-retirement__age {
    color: #856404;
    background: rgba(212, 160, 23, 0.16);
    border: 1px solid rgba(212, 160, 23, 0.28);
}

.dashboard-search-retirement__voir-plus {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.45rem;
    white-space: nowrap;
}

/* Page synthèse retraite */
.retraite-overview-page .retraite-overview-hero {
    background: linear-gradient(135deg, #fff8e6 0%, #ffffff 48%, #f8f9fa 100%);
}

.retraite-overview-hero-icon {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(145deg, #e6a817 0%, #b8860b 100%);
    box-shadow: 0 0.35rem 0.85rem rgba(212, 160, 23, 0.35);
}

.retraite-overview-stat--to-retire .retraite-overview-stat__icon {
    width: 3rem;
    height: 3rem;
    background: rgba(212, 160, 23, 0.15);
    color: #856404;
}

.retraite-overview-stat--to-retire .display-4 {
    color: #b8860b;
}

.retraite-overview-stat--alert .retraite-overview-stat__icon {
    width: 3rem;
    height: 3rem;
    background: rgba(253, 126, 20, 0.14);
    color: #c35a0a;
}

.retraite-overview-stat--alert .display-4 {
    color: #e8590c;
}

.retraite-overview-stat--retired .retraite-overview-stat__icon {
    width: 3rem;
    height: 3rem;
    background: rgba(40, 167, 69, 0.14);
    color: #1e7e34;
}

.retraite-overview-stat--retired .display-4 {
    color: #28a745;
}

.retraite-overview-panel__header {
    background: linear-gradient(180deg, #fafafa 0%, #ffffff 100%);
    padding: 1rem 1.15rem;
}

.retraite-overview-panel--to-retire {
    border-top: 3px solid #d4a017;
}

.retraite-overview-panel--alert {
    border-top: 3px solid #fd7e14;
}

.retraite-overview-panel--retired {
    border-top: 3px solid #28a745;
}

.retraite-overview-panel__list {
    max-height: min(32rem, 70vh);
    overflow-y: auto;
}

.retraite-overview-panel__item {
    border-left: none;
    border-right: none;
    transition: background-color 0.15s ease;
}

.retraite-overview-panel__item:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.retraite-overview-panel__avatar {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 0.8rem;
    background: rgba(0, 0, 0, 0.06);
    color: #6c757d;
}

.retraite-overview-panel--to-retire .retraite-overview-panel__age {
    background: rgba(212, 160, 23, 0.16);
    color: #856404;
}

.retraite-overview-panel--alert .retraite-overview-panel__age {
    background: rgba(253, 126, 20, 0.14);
    color: #c35a0a;
}

.retraite-overview-panel--retired .retraite-overview-panel__age {
    background: rgba(40, 167, 69, 0.14);
    color: #1e7e34;
}

.text-orange {
    color: #e8590c !important;
}

/* Hub /conges — accueil gestion des congés */
.conges-hub-page .conges-hub-hero {
    background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 48%, #faf8ff 100%);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.conges-hub-hero-icon {
    width: 4.5rem;
    height: 4.5rem;
    background: linear-gradient(145deg, #17a2b8 0%, #138496 100%);
    box-shadow: 0 0.35rem 1rem rgba(23, 162, 184, 0.35);
}

.conges-hub-hero-intro {
    font-size: 1rem;
    line-height: 1.55;
}

@media (min-width: 768px) {
    .conges-hub-hero-intro {
        font-size: 1.05rem;
    }
}

.conges-hub-card {
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    border-radius: 0.5rem;
}

.conges-hub-card:hover {
    box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-2px);
}

.conges-hub-card--primary {
    border-top: 4px solid #007bff !important;
}

.conges-hub-card--info {
    border-top: 4px solid #17a2b8 !important;
}

.conges-hub-card--warning {
    border-top: 4px solid #ffc107 !important;
}

.conges-hub-card--success {
    border-top: 4px solid #28a745 !important;
}

.conges-hub-card--secondary {
    border-top: 4px solid #6c757d !important;
}

.conges-hub-card--purple {
    border-top: 4px solid #6f42c1 !important;
}

.conges-hub-card-icon--purple {
    background: linear-gradient(145deg, #6f42c1 0%, #5a32a3 100%);
}

.btn-purple-placeholder {
    background: linear-gradient(145deg, #6f42c1 0%, #5a32a3 100%);
    border: none;
}

.btn-purple-placeholder:hover {
    color: #fff;
    filter: brightness(1.06);
}

.btn-purple-placeholder:focus {
    color: #fff;
    box-shadow: 0 0 0 0.2rem rgba(111, 66, 193, 0.45);
}

.conges-pecule-placeholder-card {
    border: 1px solid rgba(111, 66, 193, 0.15);
    background: linear-gradient(180deg, #faf9ff 0%, #ffffff 40%);
}

/* Planification congés — plan groupe (/planificationCongess/plan-groupe), présentation compacte */
.bulk-plan-intro-compact {
    font-size: 0.8125rem;
    line-height: 1.45;
    max-width: 52rem;
}

@media (min-width: 992px) {
    .bulk-plan-form .bulk-plan-split > .col-lg-6:first-child {
        border-right: 1px solid rgba(0, 0, 0, 0.08);
    }

    .bulk-plan-form .bulk-plan-split > .col-lg-6:first-child.border-bottom {
        border-bottom: none !important;
    }
}

.bulk-plan-form .bulk-plan-section-title {
    letter-spacing: 0.04em;
    font-size: 0.7rem;
}

/* Réduit l’espace vertical des lignes du fragment inputRow */
.bulk-plan-form .card-body .row.mb-3 {
    margin-bottom: 0.5rem !important;
}

.bulk-plan-form .col-form-label-sm {
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
}

.bulk-plan-month-grid .bulk-plan-month-cell {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.bulk-plan-month-grid .bulk-plan-month-cell:hover {
    box-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.06);
    border-color: rgba(23, 162, 184, 0.35) !important;
}

.bulk-plan-month-grid .custom-control-label {
    line-height: 1.25;
}

.conges-hub-card-icon {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.15rem;
}

.conges-hub-card-icon--primary {
    background: linear-gradient(145deg, #007bff 0%, #0056b3 100%);
}

.conges-hub-card-icon--info {
    background: linear-gradient(145deg, #17a2b8 0%, #117a8b 100%);
}

.conges-hub-card-icon--warning {
    background: linear-gradient(145deg, #ffc107 0%, #e0a800 100%);
}

.conges-hub-card-icon--success {
    background: linear-gradient(145deg, #28a745 0%, #1e7e34 100%);
}

.conges-hub-card-icon--secondary {
    background: linear-gradient(145deg, #6c757d 0%, #545b62 100%);
}

/* Comptes agents — liste et formulaires */
.comptes-page .comptes-hero {
    background: linear-gradient(125deg, #f8fbff 0%, #ffffff 45%, #f0f7ff 100%);
    border: 1px solid rgba(0, 86, 179, 0.1);
}

.comptes-hero-icon {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.1rem;
    background: linear-gradient(145deg, #1a6fd8 0%, #0d4a9c 100%);
    box-shadow: 0 2px 8px rgba(13, 74, 156, 0.25);
}

.comptes-hero-lead {
    max-width: 36rem;
}

.comptes-hero-inner {
    gap: 0.75rem 1rem;
}

.comptes-btn-hero-primary.btn-block,
.comptes-btn-back.btn-block {
    min-width: 10rem;
}

@media (min-width: 768px) {
    .comptes-hero-actions {
        min-width: 11rem;
    }

    .comptes-btn-hero-primary.btn-block,
    .comptes-btn-back.btn-block {
        min-width: 0;
    }
}

.comptes-list-card {
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    border-radius: 0.5rem !important;
    overflow: hidden;
}

.comptes-table-wrap {
    border-radius: 0.5rem;
}

.comptes-table thead th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
    color: #5a5c69;
    border-top: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background: #f8f9fc;
}

.comptes-table tbody td {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    vertical-align: middle;
}

.comptes-table tbody tr:hover {
    background: rgba(26, 111, 216, 0.04);
}

.comptes-col-id {
    width: 4.5rem;
}

.comptes-cell-agent .comptes-agent-link {
    color: inherit;
    text-decoration: none;
}

.comptes-cell-agent .comptes-agent-link:hover {
    color: #1a6fd8;
}

.comptes-actions .btn {
    font-weight: 600;
}

.comptes-form-page .comptes-form-hero {
    background: linear-gradient(125deg, #f8fbff 0%, #ffffff 45%, #f4f8ff 100%);
    border: 1px solid rgba(0, 86, 179, 0.1);
}

.comptes-form-hero-inner {
    gap: 0.75rem 1rem;
}

.comptes-form-hero-icon {
    width: 2.65rem;
    height: 2.65rem;
    font-size: 1rem;
    background: linear-gradient(145deg, #1a6fd8 0%, #0d4a9c 100%);
    box-shadow: 0 2px 8px rgba(13, 74, 156, 0.22);
}

.comptes-form-hero-icon--edit {
    background: linear-gradient(145deg, #6f42c1 0%, #4e2a84 100%);
    box-shadow: 0 2px 8px rgba(79, 42, 132, 0.22);
}

.comptes-form-card {
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    border-radius: 0.5rem !important;
    overflow: hidden;
}

.comptes-form-card-body {
    padding: 1rem 1.15rem 1.1rem;
}

.comptes-form-section-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: #3a3b45;
    margin-bottom: 0.55rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid rgba(26, 111, 216, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.comptes-form-hint {
    line-height: 1.4;
}

.comptes-form-card .row.mb-3 {
    margin-bottom: 0.55rem !important;
}

.comptes-form-footer {
    padding: 0.75rem 1.15rem;
}

.comptes-form-footer--edit {
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

@media (min-width: 576px) {
    .comptes-form-footer--edit .comptes-form-footer-submit {
        min-width: 11rem;
    }
}

/* Référentiel « Paramètres » : grades, fonctions, types contrat/congés, services, états agent, syndicats, devises, modes de paiement */
.settings-ref-page .settings-ref-hero {
    background: linear-gradient(125deg, #f6f8fc 0%, #ffffff 48%, #eef2f9 100%);
    border: 1px solid rgba(52, 73, 94, 0.12);
}

.settings-ref-hero-icon {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.1rem;
    border-radius: 0.5rem;
    background: linear-gradient(145deg, #5a6c7d 0%, #34495e 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(52, 73, 94, 0.22);
}

.settings-ref-hero-lead {
    max-width: 40rem;
}

.settings-ref-hero-inner {
    gap: 0.75rem 1rem;
}

.settings-ref-btn-hero.btn-block {
    min-width: 10rem;
}

@media (min-width: 768px) {
    .settings-ref-hero-actions {
        min-width: 11rem;
    }

    .settings-ref-btn-hero.btn-block {
        min-width: 0;
    }
}

.settings-ref-list-card {
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    border-radius: 0.5rem !important;
    overflow: hidden;
}

.settings-ref-table thead th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
    color: #5a5c69;
    border-top: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background: #f8f9fc;
}

.settings-ref-table tbody td {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    vertical-align: middle;
}

.settings-ref-table tbody tr:hover {
    background: rgba(52, 73, 94, 0.045);
}

.settings-ref-col-id {
    width: 4.5rem;
}

.settings-ref-actions .btn {
    font-weight: 600;
}

/* .text-white est en !important : au survol, .btn-outline-light gardait le texte blanc sur fond #f8f9fa (illisible). */
.btn.btn-outline-light.text-white:hover,
.btn.btn-outline-light.text-white:focus,
.btn.btn-outline-light.text-white:active {
    color: #1f2d3d !important;
}

.settings-ref-form-page .settings-ref-form-hero {
    background: linear-gradient(125deg, #f6f8fc 0%, #ffffff 48%, #f3f5fa 100%);
    border: 1px solid rgba(52, 73, 94, 0.12);
}

.settings-ref-form-hero-inner {
    gap: 0.75rem 1rem;
}

.settings-ref-form-hero-icon {
    width: 2.65rem;
    height: 2.65rem;
    font-size: 1rem;
    border-radius: 0.5rem;
    background: linear-gradient(145deg, #5a6c7d 0%, #34495e 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(52, 73, 94, 0.2);
}

.settings-ref-form-hero-icon--edit {
    background: linear-gradient(145deg, #6f42c1 0%, #4e2a84 100%);
    box-shadow: 0 2px 8px rgba(79, 42, 132, 0.22);
}

.settings-ref-form-card {
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    border-radius: 0.5rem !important;
    overflow: hidden;
}

.settings-ref-form-card-body {
    padding: 1rem 1.15rem 1.1rem;
}

.settings-ref-form-section-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: #3a3b45;
    margin-bottom: 0.55rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid rgba(52, 73, 94, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.settings-ref-form-card .row.mb-3 {
    margin-bottom: 0.55rem !important;
}

.settings-ref-form-footer {
    padding: 0.75rem 1.15rem;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

@media (min-width: 576px) {
    .settings-ref-form-footer .settings-ref-form-submit {
        min-width: 11rem;
    }
}

/* Contrats (/contrantss) : accent visuel + liste */
.contrants-ref-page .settings-ref-hero-icon {
    background: linear-gradient(145deg, #1c7c6e 0%, #135d52 100%);
    box-shadow: 0 2px 8px rgba(19, 93, 82, 0.25);
}

.contrants-ref-page .settings-ref-form-hero-icon:not(.settings-ref-form-hero-icon--edit) {
    background: linear-gradient(145deg, #1c7c6e 0%, #135d52 100%);
    box-shadow: 0 2px 8px rgba(19, 93, 82, 0.22);
}

/* Éléments de dossier agent (/elementsDossierAgents) */
.elements-dossier-agent-page .settings-ref-hero {
    background: linear-gradient(125deg, #f4f7ff 0%, #ffffff 52%, #eef3fb 100%);
}

.elements-dossier-agent-page .settings-ref-hero-icon,
.elements-dossier-agent-page .settings-ref-form-hero-icon:not(.settings-ref-form-hero-icon--edit) {
    background: linear-gradient(145deg, #2f6fed 0%, #1e4fa8 100%);
    box-shadow: 0 2px 8px rgba(30, 79, 168, 0.24);
}

.elements-dossier-agent-info-card {
    border: 1px solid rgba(47, 111, 237, 0.14) !important;
    background: linear-gradient(135deg, #f8fbff 0%, #ffffff 100%);
}

.elements-dossier-agent-info-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #1e4fa8;
    background: rgba(47, 111, 237, 0.12);
}

.elements-dossier-agent-stat-badge {
    font-weight: 600;
    font-size: 0.78rem;
    padding: 0.35rem 0.65rem;
}

.elements-dossier-agent-order-badge {
    min-width: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.elements-dossier-agent-row--inactive {
    opacity: 0.72;
}

.elements-dossier-agent-row--inactive .font-weight-medium {
    color: #6c757d;
}

.elements-dossier-agent-reorder-hint {
    border-left: 3px solid #2f6fed;
    padding: 0.4rem 0.75rem;
    background: rgba(47, 111, 237, 0.06);
    border-radius: 0 0.25rem 0.25rem 0;
    color: #4a5568;
}

.elements-dossier-agent-col-drag {
    width: 2.5rem;
}

.elements-dossier-agent-drag-handle {
    cursor: grab;
    color: #adb5bd;
    transition: color 0.15s ease, background 0.15s ease;
    border-radius: 0.25rem;
}

.elements-dossier-agent-drag-handle:hover {
    color: #2f6fed;
    background: rgba(47, 111, 237, 0.1);
}

.elements-dossier-agent-drag-handle:active {
    cursor: grabbing;
}

.elements-dossier-agent-sort-table tbody tr.elements-dossier-agent-sortable-ghost {
    background: rgba(47, 111, 237, 0.12) !important;
}

.contrants-empty-icon {
    width: 3.25rem;
    height: 3.25rem;
    font-size: 1.35rem;
    color: #94a3b8;
    background: #f1f5f9;
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.contrants-list-desc {
    max-width: 14rem;
    vertical-align: bottom;
}

@media (min-width: 1200px) {
    .contrants-list-desc {
        max-width: 18rem;
    }
}

/* Congés : planification, demandes, exécution (cohérence visuelle module congés) */
.conges-flow-page .conges-flow-hero {
    background: linear-gradient(125deg, #f0fbfd 0%, #ffffff 48%, #e8f6fa 100%);
    border: 1px solid rgba(23, 162, 184, 0.18);
}

.conges-flow-hero-inner {
    gap: 0.75rem 1rem;
}

.conges-flow-hero-icon {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.1rem;
    border-radius: 0.5rem;
    background: linear-gradient(145deg, #17a2b8 0%, #117a8b 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(17, 122, 139, 0.28);
}

.conges-flow-hero-lead {
    max-width: 42rem;
}

.conges-flow-hero-actions .btn + .btn {
    margin-top: 0.35rem;
}

.planif-conges-calendar-filters-card {
    border: 1px solid rgba(23, 162, 184, 0.2) !important;
    overflow: hidden;
}

.planif-conges-calendar-filters {
    background: linear-gradient(125deg, #f0fbfd 0%, #ffffff 55%, #f4fafc 100%);
}

.planif-conges-calendar-filters-title {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #117a8b;
}

.planif-conges-calendar-filters-hint {
    max-width: 22rem;
    text-align: right;
}

.planif-conges-calendar-filter-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #495057;
}

.planif-conges-calendar-filter-label-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 0.35rem;
    background: rgba(23, 162, 184, 0.12);
    color: #117a8b;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.planif-conges-calendar-filter-field .select2-container--bootstrap4 .select2-selection {
    min-height: 2.375rem;
    border-color: #ced4da;
}

.planif-conges-calendar-filter-field .select2-container--bootstrap4 .select2-selection--single {
    padding-top: 0.2rem;
}

.planif-conges-calendar-filter-actions .btn-info {
    background: linear-gradient(145deg, #17a2b8 0%, #138496 100%);
    border: none;
    box-shadow: 0 2px 6px rgba(17, 122, 139, 0.25);
}

.planif-conges-calendar-filter-actions .btn-info:hover {
    background: linear-gradient(145deg, #138496 0%, #117a8b 100%);
}

.planif-conges-calendar-filter-reset {
    color: #6c757d;
    text-decoration: none;
}

.planif-conges-calendar-filter-reset:hover {
    color: #117a8b;
    text-decoration: none;
}

.planif-conges-calendar-filters-legend {
    border-top: 1px solid rgba(23, 162, 184, 0.15);
    background: rgba(255, 255, 255, 0.55);
}

.planif-conges-calendar-filters-legend-title {
    font-weight: 600;
}

.planif-conges-calendar-page .planif-conges-calendar-card {
    min-height: 32rem;
}

.planif-conges-calendar {
    min-height: 28rem;
}

.planif-conges-calendar-legend-swatch {
    display: inline-block;
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 0.15rem;
    margin-right: 0.35rem;
    vertical-align: middle;
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.planif-conges-calendar-page .fc .fc-toolbar-title {
    font-size: 1.15rem;
    font-weight: 600;
}

.planif-conges-calendar-page .fc .fc-button {
    font-size: 0.85rem;
}

@media (min-width: 768px) {
    .conges-flow-hero-actions .btn + .btn {
        margin-top: 0;
        margin-left: 0.35rem;
    }
}

.conges-flow-form-page .conges-flow-form-hero {
    background: linear-gradient(125deg, #f0fbfd 0%, #ffffff 48%, #f2fafb 100%);
    border: 1px solid rgba(23, 162, 184, 0.18);
}

.conges-flow-form-hero-inner {
    gap: 0.75rem 1rem;
}

.conges-flow-form-hero-icon {
    width: 2.65rem;
    height: 2.65rem;
    font-size: 1rem;
    border-radius: 0.5rem;
    background: linear-gradient(145deg, #17a2b8 0%, #117a8b 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(17, 122, 139, 0.25);
}

.conges-flow-form-page .settings-ref-form-hero-icon.settings-ref-form-hero-icon--edit {
    background: linear-gradient(145deg, #138496 0%, #0c5460 100%);
    box-shadow: 0 2px 8px rgba(12, 84, 96, 0.25);
}

/* Banques : vignette logo (URL stockée en base) */
.bank-logo-thumb {
    max-height: 2.25rem;
    max-width: 4.5rem;
    width: auto;
    height: auto;
    object-fit: contain;
    vertical-align: middle;
}

.bank-logo-preview {
    max-height: 5rem;
    max-width: 12rem;
    object-fit: contain;
}

/* -------------------------------------------------------------------------- */
/* Page de connexion (hors layout AdminLTE)                                   */
/* -------------------------------------------------------------------------- */

.auth-login-page {
    min-height: 100vh;
    margin: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem 1.5rem;
    font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #fff;
    background-color: #0d2137;
    background-image:
        radial-gradient(ellipse 120% 80% at 50% -20%, rgba(56, 130, 246, 0.35), transparent 55%),
        radial-gradient(ellipse 80% 60% at 100% 100%, rgba(23, 162, 184, 0.22), transparent 50%),
        radial-gradient(ellipse 70% 50% at 0% 80%, rgba(99, 102, 241, 0.15), transparent 45%),
        linear-gradient(165deg, #0f2744 0%, #0d2137 45%, #0a1929 100%);
}

.auth-login-page::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 1;
    z-index: 0;
}

.auth-login-lang {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 20;
}

.auth-login-lang-btn {
    border-radius: 999px !important;
    padding: 0.35rem 0.85rem !important;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    background: rgba(255, 255, 255, 0.12) !important;
    color: #fff !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.auth-login-lang-btn:hover,
.auth-login-lang-btn:focus {
    background: rgba(255, 255, 255, 0.22) !important;
    color: #fff !important;
}

.auth-login-lang .dropdown-menu {
    min-width: 11rem;
    border-radius: 0.65rem;
    padding: 0.35rem 0;
}

.auth-login-main {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 26rem;
}

.auth-login-panel {
    width: 100%;
}

.auth-login-brand {
    margin-bottom: 1.75rem;
}

.auth-login-brand-logo-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4.25rem;
    height: 4.25rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    margin-bottom: 1rem;
}

.auth-login-brand-logo {
    max-height: 2.35rem;
    max-width: 2.35rem;
    width: auto;
    height: auto;
    object-fit: contain;
}

.auth-login-brand-title {
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.auth-login-brand-tagline {
    margin-top: 0.35rem;
    font-size: 0.9rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.72);
    max-width: 18rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.4;
}

.auth-login-card {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.06) inset !important;
}

.auth-login-card-body {
    padding: 1.75rem 1.65rem 1.6rem;
}

@media (min-width: 576px) {
    .auth-login-card-body {
        padding: 2rem 1.85rem 1.75rem;
    }
}

.auth-login-card-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a2d42;
    margin-bottom: 0.35rem;
}

.auth-login-card-intro {
    font-size: 0.925rem;
    color: #5a6570;
    margin-bottom: 1.35rem;
    line-height: 1.45;
}

.auth-login-alert {
    font-size: 0.9rem;
    border-radius: 0.5rem !important;
}

.auth-login-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #495057;
    margin-bottom: 0.35rem;
}

.auth-login-input-icon {
    border-color: #dee2e6;
    background: #f1f3f5;
    min-width: 2.75rem;
    justify-content: center;
}

.auth-login-page .auth-login-input {
    border-color: #dee2e6;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

.auth-login-page .auth-login-input:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.12);
}

.auth-login-submit {
    font-weight: 600;
    font-size: 1rem;
    border-radius: 0.5rem !important;
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.32);
    transition: box-shadow 0.2s ease, transform 0.2s ease, background-color 0.15s ease;
}

.auth-login-submit:hover {
    box-shadow: 0 8px 26px rgba(0, 123, 255, 0.42);
    transform: translateY(-1px);
}

.auth-login-submit:active {
    transform: translateY(0);
}

.auth-login-footer {
    margin-top: 1.75rem;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.55);
}

.auth-login-footer-brand {
    color: #fff;
}

@media (prefers-reduced-motion: reduce) {
    .auth-login-submit {
        transition: none;
    }

    .auth-login-submit:hover {
        transform: none;
    }
}

/* -------------------------------------------------------------------------- */
/* Menu haut (navbar principale)                                             */
/* -------------------------------------------------------------------------- */

.app-main-header {
    min-height: 3.35rem;
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 4px 18px rgba(0, 0, 0, 0.04);
    background: linear-gradient(to bottom, #ffffff 0%, #f8fafc 100%) !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.app-main-header .navbar-nav .nav-item {
    display: flex;
    align-items: center;
}

.app-navbar-nav-right {
    gap: 0.35rem 0.55rem;
}

.app-navbar-link {
    border-radius: 0.4rem;
    padding-left: 0.65rem !important;
    padding-right: 0.65rem !important;
    font-weight: 500;
    color: #334155 !important;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.app-navbar-link:hover,
.app-navbar-link:focus {
    background-color: rgba(0, 123, 255, 0.08) !important;
    color: #0d47a1 !important;
}

.app-navbar-link:focus-visible {
    outline: 2px solid rgba(0, 123, 255, 0.45);
    outline-offset: 2px;
}

.app-navbar-link--icon {
    font-size: 1.05rem;
    padding-left: 0.55rem !important;
    padding-right: 0.55rem !important;
    color: #475569 !important;
}

.app-navbar-label {
    font-weight: 500;
    color: #334155;
}

.app-navbar-flag {
    font-size: 1.15rem;
    line-height: 1;
}

.app-navbar-dropdown {
    min-width: 13.5rem;
    border: none !important;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
    border-radius: 0.55rem !important;
    padding: 0.4rem 0;
    margin-top: 0.4rem;
}

.app-navbar-dropdown--scroll {
    max-height: min(70vh, 26rem);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.app-navbar-dropdown--scroll::-webkit-scrollbar {
    width: 6px;
}

.app-navbar-dropdown--scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.app-navbar-dropdown-item {
    border-radius: 0.35rem !important;
    margin: 0.1rem 0.4rem;
    padding: 0.5rem 0.65rem !important;
    font-weight: 500;
    color: #1e293b !important;
}

.app-navbar-dropdown-item:hover,
.app-navbar-dropdown-item:focus {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
}

.app-navbar-dropdown-icon {
    color: #64748b;
    width: 1.25rem;
    text-align: center;
}

.app-navbar-dropdown-item:hover .app-navbar-dropdown-icon {
    color: #0d6efd;
}

.app-navbar-user {
    display: inline-flex;
    align-items: center;
    max-width: min(14rem, 28vw);
    padding: 0.28rem 0.75rem 0.28rem 0.55rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155 !important;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.app-navbar-user-icon {
    font-size: 1.1rem;
    color: #64748b;
    flex-shrink: 0;
}

a.app-navbar-user--link {
    color: #334155 !important;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

a.app-navbar-user--link:hover,
a.app-navbar-user--link:focus {
    color: #1e293b !important;
    background: #e8f5ef;
    border-color: #a7e3c8;
    box-shadow: 0 1px 4px rgba(28, 200, 138, 0.15);
    text-decoration: none;
}

.app-navbar-logout {
    font-weight: 600;
    color: #475569 !important;
    border: 1px solid #cbd5e1;
    background: #fff;
    border-radius: 0.4rem !important;
    padding: 0.35rem 0.85rem !important;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.app-navbar-logout:hover {
    background: #fef2f2 !important;
    border-color: #fecaca !important;
    color: #b91c1c !important;
    box-shadow: 0 2px 8px rgba(185, 28, 28, 0.08);
}

.app-navbar-logout:focus-visible {
    outline: 2px solid rgba(220, 38, 38, 0.35);
    outline-offset: 2px;
}

@media (max-width: 991.98px) {
    .app-navbar-nav-right {
        padding-top: 0.25rem;
    }
}

/* -------------------------------------------------------------------------- */
/* Menu latéral (sidebar AdminLTE)                                           */
/* -------------------------------------------------------------------------- */

.app-sidebar.sidebar-dark-primary {
    background: linear-gradient(
        165deg,
        #1f3f5e 0%,
        #1a3550 32%,
        #16324a 58%,
        #122a40 100%
    ) !important;
    box-shadow: 2px 0 24px rgba(0, 20, 40, 0.35) !important;
    border-right: 1px solid rgba(120, 180, 230, 0.12);
}

.app-sidebar .app-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 3.85rem;
    padding: 0.85rem 1rem 0.5rem;
    margin-bottom: 0.55rem;
    border-bottom: none;
    background: linear-gradient(
        180deg,
        rgba(100, 175, 245, 0.16) 0%,
        rgba(70, 140, 210, 0.08) 45%,
        transparent 100%
    );
    transition: background 0.22s ease, box-shadow 0.22s ease;
    text-decoration: none !important;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.06);
    border-radius: 0 0 0.5rem 0.5rem;
}

.app-sidebar .app-sidebar-brand:hover,
.app-sidebar .app-sidebar-brand:focus {
    background: linear-gradient(
        180deg,
        rgba(120, 195, 255, 0.22) 0%,
        rgba(80, 150, 220, 0.12) 50%,
        rgba(255, 255, 255, 0.04) 100%
    );
    color: #fff !important;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.1);
}

/* Pastille porte-logo : harmonisée avec la teinte « primary » froide de la barre */
.app-sidebar .app-sidebar-brand-mark {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.85rem;
    height: 2.85rem;
    padding: 0.3rem;
    border-radius: 0.55rem;
    background: linear-gradient(
        155deg,
        rgba(150, 210, 255, 0.35) 0%,
        rgba(80, 150, 215, 0.22) 42%,
        rgba(25, 70, 120, 0.35) 100%
    );
    border: 1px solid rgba(160, 210, 255, 0.38);
    box-shadow:
        0 2px 10px rgba(0, 25, 55, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.app-sidebar .app-sidebar-brand:hover .app-sidebar-brand-mark,
.app-sidebar .app-sidebar-brand:focus .app-sidebar-brand-mark {
    border-color: rgba(190, 230, 255, 0.55);
    box-shadow:
        0 3px 14px rgba(0, 35, 70, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.app-sidebar .app-sidebar-brand-logo {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0.3rem;
    opacity: 0.98;
}

.app-sidebar .app-sidebar-brand-text {
    flex: 1;
    min-width: 0;
    font-weight: 700 !important;
    font-size: 1.08rem;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: #f2f8ff !important;
    text-shadow: 0 1px 3px rgba(0, 15, 35, 0.45);
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    margin-left: 0;
}

/* Sidebar repliée (AdminLTE) : logo centré, zone marque compacte */
body.sidebar-collapse .app-sidebar .app-sidebar-brand {
    justify-content: center;
    padding-left: 0.45rem;
    padding-right: 0.45rem;
    gap: 0;
    border-radius: 0;
}

body.sidebar-collapse .app-sidebar .app-sidebar-brand-mark {
    width: 2.65rem;
    height: 2.65rem;
}

.app-sidebar .app-sidebar-scroll {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

.app-sidebar .app-sidebar-scroll::-webkit-scrollbar {
    width: 7px;
}

.app-sidebar .app-sidebar-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.22);
    border-radius: 4px;
}

.app-sidebar .app-sidebar-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.32);
}

.app-sidebar .app-sidebar-nav-wrap {
    padding-left: 0.15rem;
    padding-right: 0.15rem;
    padding-top: 1.15rem;
}

.app-sidebar .app-sidebar-nav > .nav-item {
    margin-bottom: 0.1rem;
}

.app-sidebar .app-sidebar-nav > .nav-item > .nav-link {
    border-radius: 0.45rem;
    margin: 0.1rem 0.35rem;
    padding: 0.55rem 0.65rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.88) !important;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.app-sidebar .app-sidebar-nav > .nav-item > .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
}

.app-sidebar .app-sidebar-nav > .nav-item > .nav-link:focus-visible {
    outline: 2px solid rgba(100, 180, 255, 0.65);
    outline-offset: 2px;
}

.app-sidebar .app-sidebar-nav > .nav-item > .nav-link.active,
.app-sidebar .app-sidebar-nav > .nav-item.menu-open > .nav-link {
    background-color: rgba(255, 255, 255, 0.12) !important;
    color: #fff !important;
    box-shadow: inset 3px 0 0 #5eb0ff;
}

.app-sidebar .app-sidebar-nav > .nav-item > .nav-link .nav-icon {
    opacity: 0.92;
    margin-right: 0.55rem;
}

.app-sidebar .app-sidebar-nav > .nav-item > .nav-link .right {
    opacity: 0.75;
}

.app-sidebar .nav-treeview {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0.45rem;
    margin: 0.15rem 0.4rem 0.55rem;
    padding: 0.35rem 0 0.45rem;
}

.app-sidebar .nav-treeview > .nav-item > .nav-link {
    border-radius: 0.35rem;
    margin: 0.08rem 0.35rem;
    padding: 0.42rem 0.55rem 0.42rem 0.5rem;
    font-size: 0.9rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.82) !important;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.app-sidebar .nav-treeview > .nav-item > .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.07) !important;
    color: #fff !important;
}

.app-sidebar .nav-treeview > .nav-item > .nav-link.active {
    background-color: rgba(94, 176, 255, 0.18) !important;
    color: #fff !important;
    font-weight: 600;
    box-shadow: none;
}

.app-sidebar .nav-treeview > .nav-item > .nav-link:focus-visible {
    outline: 2px solid rgba(100, 180, 255, 0.55);
    outline-offset: 1px;
}

.app-sidebar .nav-treeview .nav-icon {
    font-size: 0.55rem;
    opacity: 0.9;
}

.app-sidebar .nav-sidebar .nav-link p {
    line-height: 1.35;
    margin: 0;
}

@media (prefers-reduced-motion: reduce) {
    .app-sidebar .app-sidebar-nav > .nav-item > .nav-link,
    .app-sidebar .nav-treeview > .nav-item > .nav-link,
    .app-sidebar .app-sidebar-brand {
        transition: none;
    }
}

/* Backup page — compact restore strip */
.system-backup-restore-card {
    border-left: 4px solid #e0a800;
    background: linear-gradient(180deg, #fffdf6 0%, #ffffff 42%);
}

.system-backup-page .system-backup-restore-icon {
    width: 1.75rem;
    height: 1.75rem;
    margin-top: 0.1rem;
    background: linear-gradient(145deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 0.15rem 0.45rem rgba(217, 119, 6, 0.35);
}

.system-backup-page .system-backup-restore-icon-fa {
    font-size: 0.75rem;
}

.system-backup-restore-warning {
    font-size: 0.8rem;
    line-height: 1.35;
}

.system-backup-page .system-backup-restore-form .border-top {
    border-color: rgba(224, 168, 0, 0.35) !important;
}

.system-backup-restore-hint {
    font-size: 0.72rem;
    line-height: 1.3;
}

/* Phrase + bouton : même hauteur que Select2 (voir .select2-container--bootstrap4 .select2-selection en tête de fichier) */
.system-backup-page .system-backup-restore-form {
    --restore-inline-ctrl-h: calc(2.25rem + 2px);
}

.system-backup-page .system-backup-restore-form #confirmPhrase.form-control-sm {
    height: var(--restore-inline-ctrl-h);
    min-height: var(--restore-inline-ctrl-h);
    box-sizing: border-box;
}

.system-backup-page .system-backup-restore-form button[type="submit"].btn.btn-sm.btn-danger {
    height: var(--restore-inline-ctrl-h);
    min-height: var(--restore-inline-ctrl-h);
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.25;
}

/* Configuration système /systemConfigs */
.system-config-page {
    --sysconfig-general: #4e73df;
    --sysconfig-mail: #36b9cc;
    --sysconfig-paie: #1cc88a;
    scroll-behavior: smooth;
}

.system-config-hero {
    background: linear-gradient(135deg, #f0f4ff 0%, #ffffff 45%, #f3faf6 100%);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.system-config-hero-icon {
    width: 3rem;
    height: 3rem;
    font-size: 1.15rem;
    background: linear-gradient(145deg, #4e73df 0%, #224abe 100%);
    box-shadow: 0 0.28rem 0.75rem rgba(78, 115, 223, 0.35);
}

.system-config-hero-lead {
    max-width: 42rem;
    line-height: 1.45;
}

.system-config-hero-inner {
    row-gap: 0.75rem;
}

.system-config-nav-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    margin: 0.15rem 0.35rem 0.15rem 0;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none !important;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
    color: #495057;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.system-config-nav-pill:hover,
.system-config-nav-pill:focus {
    text-decoration: none;
    color: #212529;
    background: #f8f9fc;
}

.system-config-nav-pill--general:hover,
.system-config-nav-pill--general:focus { border-color: rgba(78, 115, 223, 0.45); color: var(--sysconfig-general); }
.system-config-nav-pill--mail:hover,
.system-config-nav-pill--mail:focus { border-color: rgba(54, 185, 204, 0.45); color: #2c9faf; }
.system-config-nav-pill--paie:hover,
.system-config-nav-pill--paie:focus { border-color: rgba(28, 200, 138, 0.45); color: #169b6b; }

.system-config-side-nav {
    border-radius: 0.5rem;
    overflow: hidden;
}

.system-config-side-nav .card-header {
    padding: 0.65rem 1rem;
}

.system-config-side-nav .letter-spacing-sm {
    letter-spacing: 0.06em;
    font-size: 0.68rem;
}

.system-config-side-link {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.75rem 1rem;
    border: none !important;
}

.system-config-side-icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.system-config-side-link--general .system-config-side-icon {
    background: rgba(78, 115, 223, 0.12);
    color: var(--sysconfig-general);
}

.system-config-side-link--mail .system-config-side-icon {
    background: rgba(54, 185, 204, 0.14);
    color: #2c9faf;
}

.system-config-side-link--paie .system-config-side-icon {
    background: rgba(28, 200, 138, 0.14);
    color: #169b6b;
}

.system-config-side-link.active,
.system-config-side-link:hover {
    background: #f8f9fc;
}

.system-config-side-link--general.active { border-left: 3px solid var(--sysconfig-general) !important; }
.system-config-side-link--mail.active { border-left: 3px solid var(--sysconfig-mail) !important; }
.system-config-side-link--paie.active { border-left: 3px solid var(--sysconfig-paie) !important; }

.system-config-category {
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
    scroll-margin-top: 5.5rem;
}

.system-config-category-accent {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.system-config-category--general .system-config-category-accent { background: var(--sysconfig-general); }
.system-config-category--mail .system-config-category-accent { background: var(--sysconfig-mail); }
.system-config-category--paie .system-config-category-accent { background: var(--sysconfig-paie); }

.system-config-category-header {
    padding: 1.1rem 1.25rem 0.75rem 1.35rem;
}

.system-config-category-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.system-config-category--general .system-config-category-icon {
    background: rgba(78, 115, 223, 0.12);
    color: var(--sysconfig-general);
}

.system-config-category--mail .system-config-category-icon {
    background: rgba(54, 185, 204, 0.14);
    color: #2c9faf;
}

.system-config-category--paie .system-config-category-icon {
    background: rgba(28, 200, 138, 0.14);
    color: #169b6b;
}

.system-config-category-badge {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.12rem 0.45rem;
    border-radius: 0.2rem;
    background: #f1f3f5;
    color: #6c757d;
}

.system-config-category--general .system-config-category-badge {
    background: rgba(78, 115, 223, 0.1);
    color: var(--sysconfig-general);
}

.system-config-category--mail .system-config-category-badge {
    background: rgba(54, 185, 204, 0.12);
    color: #2c9faf;
}

.system-config-category--paie .system-config-category-badge {
    background: rgba(28, 200, 138, 0.12);
    color: #169b6b;
}

.system-config-field-group {
    padding: 1rem 1.1rem;
    margin-bottom: 1rem;
    background: #fafbfc;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 0.45rem;
}

.system-config-field-group-title {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #5a5c69;
    margin-bottom: 0.85rem;
}

.system-config-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #5a5c69;
    margin-bottom: 0.35rem;
}

.system-config-media-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 5rem;
    margin-bottom: 0.65rem;
    padding: 0.65rem;
    background: #fff;
    border: 1px dashed rgba(0, 0, 0, 0.1);
    border-radius: 0.35rem;
}

.system-config-media-preview img {
    max-height: 4.5rem;
    max-width: 100%;
    object-fit: contain;
}

.system-config-toggle-card {
    padding: 0.75rem 0.9rem;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 0.35rem;
}

.system-config-form-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 0.5rem;
    margin-top: 0.25rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

@media (max-width: 991.98px) {
    .system-config-side-nav {
        position: static !important;
    }

    .system-config-layout aside {
        order: -1;
    }

    .system-config-side-nav .list-group {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 0.5rem;
    }

    .system-config-side-link {
        flex: 1 1 auto;
        min-width: 8rem;
        border-radius: 0.35rem !important;
        margin: 0.15rem;
    }

    .system-config-side-link.active {
        border-left: none !important;
        box-shadow: inset 0 0 0 2px rgba(78, 115, 223, 0.35);
    }
}
