/* Structure générale et navigation */

.app-body {
    min-height: 100vh;
    background: #f5f7fb;
    color: #111a33;
}

.app-navbar {
    background: #fff;
    border-bottom: 1px solid #ccd5e5;
    box-shadow: 0 1px 0 rgba(31, 51, 127, 0.06);
}

.app-navbar-brand {
    color: #111a33;
    font-size: 1.25rem;
    font-weight: 700;
}

.app-navbar-brand:hover,
.app-navbar-brand:focus {
    color: #111a33;
}

.app-navbar-nav {
    gap: 0.25rem;
    margin-left: 2rem;
}

.app-nav-link {
    padding: 0.65rem 1rem !important;
    border-radius: 999px;
    color: #43516a;
    font-weight: 600;
}

.app-nav-link:hover,
.app-nav-link:focus-visible {
    color: #2443bb;
    background: #f2f4fa;
}

.app-nav-link.active {
    color: #2443bb !important;
    background: #e8edff;
}

.app-profile-button {
    padding: 0.35rem 0.75rem 0.35rem 0.4rem;
    border: 1px solid #e1e6ef;
    border-radius: 999px;
    background: #f8fafd;
}

.app-profile-button:hover,
.app-profile-button:focus-visible,
.app-profile-button.show {
    border-color: #cbd5e5;
    background: #fff;
}

.app-profile-avatar {
    width: 2.5rem;
    height: 2.5rem;
    background: #1f337f;
}

.app-navbar-toggler {
    border-color: #d8dfeb;
}


/* Listes principales */

.app-list-page {
    padding-top: 0.75rem;
    padding-bottom: 2rem;
}

.app-action-button {
    min-height: 3.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding-inline: 1.25rem;
    border-radius: 0.875rem;
    font-weight: 700;
}

.app-action-icon,
.app-search-icon,
.app-row-link svg {
    width: 1.15rem;
    height: 1.15rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.app-list-card {
    border: 1px solid #dde3ee;
    border-radius: 1.25rem;
    box-shadow: 0 0.8rem 2rem rgba(31, 51, 127, 0.08);
}

.app-filter-context {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 1.25rem;
    border-bottom: 1px solid #dbe4f3;
    color: #31415f;
    background: #f2f6fc;
    font-size: 0.9rem;
}

.app-filter-context strong {
    color: #1f337f;
}

.app-filter-context a {
    color: #2443bb;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.app-filter-context a:hover,
.app-filter-context a:focus-visible {
    color: #172f9f;
    text-decoration: underline;
}

.app-list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.35rem 1.5rem;
}

.app-list-search-form {
    flex: 1 1 32rem;
    max-width: 40rem;
}

.app-list-search-group .input-group-text,
.app-list-search-group .form-control,
.app-list-search-group .btn {
    min-height: 3rem;
}

.app-list-search-group .input-group-text {
    border-right: 0;
    border-radius: 0.875rem 0 0 0.875rem;
    background: #f8fafd;
    color: #66758f;
}

.app-list-search-group .form-control {
    border-left: 0;
    background: #f8fafd;
}

.app-list-search-group .form-control:focus {
    border-color: var(--bs-border-color);
    box-shadow: none;
}

.app-list-search-group .btn:last-child {
    border-radius: 0 0.875rem 0.875rem 0;
}

.app-list-filter {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.app-list-filter-label {
    color: #66758f;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.app-list-filter-options {
    display: flex;
    align-items: center;
    padding: 0.25rem;
    border-radius: 999px;
    background: #f0f2f7;
}

.app-list-filter-option {
    padding: 0.55rem 0.85rem;
    border: 1px solid transparent;
    border-radius: 999px;
    color: #4a5870;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.app-list-filter-option:hover,
.app-list-filter-option:focus-visible {
    color: #2443bb;
}

.app-list-filter-option.active {
    border-color: #dde3ee;
    color: #2443bb;
    background: #fff;
    box-shadow: 0 0.2rem 0.5rem rgba(17, 26, 51, 0.08);
}

.app-list-table {
    min-width: 70rem;
}

.app-list-table.vehicle-coupling-table {
    min-width: 45rem;
}

.vehicle-coupling-current-table tbody td {
    padding-block: 1rem;
}

.app-list-table thead th {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #d6deea;
    color: #4f5f78;
    background: #eef2f7;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.035em;
    text-transform: uppercase;
    white-space: nowrap;
}

.app-list-table tbody td {
    padding: 1.25rem;
    border-bottom-color: #e7ebf2;
}

.app-list-table .app-list-action-cell {
    width: 7.5rem;
    min-width: 7.5rem;
    padding-right: 1.5rem;
    padding-left: 1.5rem;
    text-align: center;
}

.webfleet-import-table {
    min-width: 52rem;
}

.vehicle-detail-table {
    min-width: 42rem;
}

.vehicle-workshop-table {
    min-width: 64rem;
}

.vehicle-workshop-table thead th {
    padding: 0.85rem 0.6rem;
    font-size: 0.72rem;
    white-space: normal;
}

.vehicle-workshop-table tbody td {
    padding: 1rem 0.6rem;
}

.vehicle-registration-link {
    display: inline-block;
    padding: 0.35rem 0.65rem;
    border-radius: 0.65rem;
    color: #2443bb;
    background: #e8edff;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.vehicle-registration-link:hover,
.vehicle-registration-link:focus-visible {
    color: #172f9f;
    background: #dce4ff;
}

.vehicle-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
}

.vehicle-status-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: currentColor;
}

.vehicle-status-active {
    color: #137a48;
    background: #ddf8e8;
}

.vehicle-status-inactive {
    color: #566176;
    background: #edf0f5;
}

.vehicle-status-broken_down {
    color: #b4232f;
    background: #fde4e7;
}

.vehicle-status-in_workshop {
    color: #8a5a00;
    background: #fff0c2;
}

.app-row-link {
    display: inline-flex;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #66758f;
    text-decoration: none;
}

.app-row-link:hover,
.app-row-link:focus-visible {
    color: #2443bb;
    background: #e8edff;
}

.app-clickable-row {
    cursor: pointer;
}

.app-list-footer {
    padding: 1rem 1.5rem;
    color: #66758f;
    background: #f8fafd;
}

.app-list-subfilters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 1.5rem 1.25rem;
    border-bottom: 1px solid #e7ebf2;
}

.event-list-table {
    min-width: 76rem;
}

.event-summary-cell {
    min-width: 16rem;
    max-width: 28rem;
}

.event-priority-badge,
.event-status-badge,
.workshop-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
}

.event-priority-high {
    color: #b4232f;
    background: #fde4e7;
}

.event-priority-normal {
    color: #2443bb;
    background: #e8edff;
}

.event-priority-low,
.event-status-open {
    color: #566176;
    background: #edf0f5;
}

.event-status-processing {
    color: #2443bb;
    background: #e8edff;
}

.event-status-resolved {
    color: #137a48;
    background: #ddf8e8;
}

.deadline-list-table {
    width: 100%;
    min-width: 0;
}

.deadline-title-cell {
    width: 19%;
}

.deadline-limits-cell {
    width: 17%;
}

.deadline-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
}

.deadline-status-completed {
    color: #137a48;
    background: #ddf8e8;
}

.deadline-status-processing {
    color: #2443bb;
    background: #e8edff;
}

.deadline-status-due-soon {
    color: #8a5a00;
    background: #fff0c2;
}

.deadline-status-expired {
    color: #b4232f;
    background: #fde4e7;
}

.deadline-status-current {
    color: #137a48;
    background: #ddf8e8;
}


/* Gestion des incidents et des échéances */

.maintenance-summary-card,
.maintenance-section-card {
    border: 1px solid #dde3ee;
    border-radius: 1rem;
    box-shadow: 0 0.55rem 1.5rem rgba(31, 51, 127, 0.05);
}

.maintenance-primary-card {
    border-top: 3px solid #27408b;
}

.maintenance-primary-card > .card-body {
    padding: 1.4rem;
}

.maintenance-secondary-card {
    background: #fbfcfe;
}

.maintenance-finalization-card {
    border-left: 4px solid #c8d1df;
}

.maintenance-section-eyebrow {
    margin-bottom: 0.3rem;
    color: #66758f;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

@media (max-width: 1199.98px) {
    .app-list-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .app-list-search-form {
        flex-basis: auto;
        max-width: none;
    }

    .app-list-filter {
        align-items: flex-start;
        flex-direction: column;
    }

    .app-list-filter-options {
        max-width: 100%;
        overflow-x: auto;
    }

    .app-list-subfilters {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 991.98px) {
    .app-navbar-nav {
        gap: 0.15rem;
        margin: 1rem 0;
    }

    .app-nav-link {
        border-radius: 0.75rem;
    }

    .app-profile-button {
        width: 100%;
        justify-content: flex-start;
        border-radius: 0.75rem;
    }
}

@media (max-width: 575.98px) {
    .app-list-page .display-6 {
        font-size: 2rem;
    }

    .app-list-page .lead {
        font-size: 1rem;
    }

    .app-list-toolbar {
        padding: 1rem;
    }

    .app-list-search-group {
        display: grid;
        grid-template-columns: auto 1fr;
    }

    .app-list-search-group .input-group-text {
        border-bottom-left-radius: 0;
    }

    .app-list-search-group .form-control {
        width: 100%;
        min-width: 0;
        border-top-right-radius: 0.875rem !important;
    }

    .app-list-search-group .btn {
        grid-column: span 2;
        border-radius: 0 0 0.875rem 0.875rem !important;
    }

    .app-list-footer {
        padding-inline: 1rem;
    }

    .app-list-subfilters {
        padding-inline: 1rem;
    }
}


/* Dashboard */

.dashboard-date {
    color: #566176;
    font-weight: 600;
}

.dashboard-fleet-card,
.dashboard-panel {
    overflow: hidden;
    border: 1px solid #dde3ee;
    border-radius: 1.25rem;
    box-shadow: 0 0.8rem 2rem rgba(31, 51, 127, 0.07);
}

.dashboard-fleet-body,
.dashboard-fleet-main,
.dashboard-fleet-stats,
.dashboard-fleet-stat,
.dashboard-panel-header,
.dashboard-week-heading {
    display: flex;
    align-items: center;
}

.dashboard-fleet-body {
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.25rem 1.5rem;
}

.dashboard-fleet-main {
    gap: 2rem;
}

.dashboard-fleet-stats {
    flex-wrap: wrap;
    gap: 1.5rem;
}

.dashboard-fleet-stat {
    gap: 0.45rem;
    color: #28364f;
    font-weight: 600;
}

.dashboard-fleet-stat:hover,
.dashboard-fleet-stat:focus-visible,
.dashboard-card-link:hover,
.dashboard-card-link:focus-visible,
.dashboard-inline-links a:hover,
.dashboard-inline-links a:focus-visible {
    color: #172f9f;
}

.dashboard-status-dot {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
}

.dashboard-status-active {
    background: #1a9b5d;
}

.dashboard-status-danger {
    background: #d93648;
}

.dashboard-status-warning {
    background: #e6a700;
}

.dashboard-card-link {
    gap: 0.35rem;
    color: #2443bb;
    font-weight: 700;
}

.dashboard-fleet-suspended {
    color: #765100;
    margin-left: 0.25rem;
    padding-left: 1.5rem;
    border-left: 1px solid #c6d3e8;
}

.dashboard-panel-header {
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-top: 3px solid #27408b;
    border-bottom: 1px solid #c6d3e8;
    color: #17234d;
    background: #e2eaf7;
}

.dashboard-panel-header h2 {
    color: inherit;
}

.dashboard-item-count {
    display: inline-flex;
    min-width: 2rem;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    font-weight: 700;
}

.dashboard-attention-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.5rem 1rem 1.75rem;
    border-bottom: 1px solid #e7ebf2;
    color: #111a33;
    transition: background-color 0.15s ease;
}

.dashboard-attention-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
    padding: 1rem;
}

.dashboard-attention-grid > .dashboard-attention-row {
    min-width: 0;
    padding: 0.85rem 1rem;
    border: 1px solid #e7ebf2;
    border-radius: 0.75rem;
}

.dashboard-attention-grid > .dashboard-attention-row:last-child {
    border-bottom: 1px solid #e7ebf2;
}

.dashboard-attention-grid .dashboard-item-content,
.dashboard-attention-grid .dashboard-item-title {
    overflow-wrap: anywhere;
}

@media (min-width: 992px) {
    .dashboard-attention-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.dashboard-attention-group-label {
    padding: 0.65rem 1.5rem;
    border-bottom: 1px solid #e7ebf2;
    color: #43516a;
    background: #f8fafd;
    font-size: 0.9rem;
    font-weight: 700;
}

.dashboard-attention-group-separated {
    margin-top: 0.35rem;
    padding-top: 0.85rem;
    border-top: 1px solid #c6d3e8;
}

.dashboard-attention-danger {
    box-shadow: inset 4px 0 0 #d93648;
}

.dashboard-attention-warning {
    box-shadow: inset 4px 0 0 #e6a700;
}

.dashboard-attention-processing {
    box-shadow: inset 4px 0 0 #536fc5;
}

.dashboard-attention-administrative {
    color: #43516a;
    background: #f8fafd;
}

.dashboard-attention-count {
    display: inline-flex;
    min-width: 2.75rem;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    color: #111a33;
    font-size: 1.1rem;
    font-weight: 800;
    text-align: center;
}

.dashboard-priority-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 0.45rem;
    padding: 0.18rem 0.45rem;
    border-radius: 999px;
    color: #b4232f;
    background: #fde4e7;
    font-size: 0.75rem;
    font-weight: 700;
}

.dashboard-attention-button {
    min-width: 9.5rem;
    font-weight: 700;
}

.dashboard-attention-row:last-child {
    border-bottom: 0;
}

a.dashboard-attention-row:hover,
a.dashboard-attention-row:focus-visible,
.dashboard-compact-row:hover,
.dashboard-compact-row:focus-visible {
    color: #111a33;
    background: #f8fafd;
}

.dashboard-count-warning {
    color: #8a5a00;
    background: #fff0c2;
}

.dashboard-count-processing {
    color: #2443bb;
    background: #e8edff;
}

.dashboard-item-content,
.dashboard-item-title,
.dashboard-item-content small {
    display: block;
}

.dashboard-item-title {
    font-weight: 700;
}

.dashboard-item-content small {
    margin-top: 0.15rem;
    color: #66758f;
}

.dashboard-subactions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.7rem;
}

.dashboard-subaction-link {
    display: inline-flex;
    min-width: 8.75rem;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 0.65rem;
    border: 1px solid #dbe4f3;
    border-radius: 0.5rem;
    color: #2443bb;
    background: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
}

.dashboard-subaction-link:hover,
.dashboard-subaction-link:focus-visible {
    border-color: #b8c7e5;
    color: #19379f;
    background: #f8fafd;
}

.dashboard-chevron {
    color: #66758f;
    font-size: 1.25em;
    font-weight: 700;
    line-height: 1;
}

.dashboard-empty-state {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    color: #43516a;
    text-align: center;
}

.dashboard-empty-icon {
    display: inline-flex;
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #137a48;
    background: #ddf8e8;
    font-weight: 800;
}

.dashboard-week-section {
    background: #fff;
}

.dashboard-upcoming-columns > :last-child {
    border-top: 1px solid #c6d3e8;
}

.dashboard-upcoming-columns .dashboard-week-section {
    height: 100%;
}

@media (min-width: 992px) {
    .dashboard-upcoming-columns > :first-child {
        padding-right: 0.35rem;
    }

    .dashboard-upcoming-columns > :last-child {
        padding-left: 0.35rem;
        border-top: 0;
        border-left: 1px solid #c6d3e8;
    }
}


.dashboard-week-heading {
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid #dbe4f3;
    background: #f8fafd;
}

.dashboard-week-content {
    padding: 0 1.5rem 1.25rem;
}

.dashboard-compact-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #edf0f5;
    color: #111a33;
}

.dashboard-compact-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.dashboard-compact-row:last-of-type {
    border-bottom: 0;
}

.dashboard-compact-empty {
    padding: 1rem 0;
    color: #66758f;
}

.dashboard-source-label {
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    color: #2443bb;
    background: #e8edff;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.dashboard-workshop-table {
    min-width: 70rem;
}

.dashboard-workshop-table thead th {
    padding: 0.9rem 1.25rem;
    color: #66758f;
    background: #f8fafd;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.035em;
    text-transform: uppercase;
    white-space: nowrap;
}

.dashboard-workshop-table tbody td {
    padding: 1rem 1.25rem;
    border-bottom-color: #e7ebf2;
}

.dashboard-workshop-action-cell {
    width: 4rem;
    text-align: center;
}

.dashboard-workshop-status {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

.dashboard-workshop-entry,
.dashboard-workshop-missing {
    color: #8a5a00;
    background: #fff0c2;
}

.dashboard-workshop-exit,
.dashboard-workshop-current {
    color: #2443bb;
    background: #e8edff;
}

.dashboard-workshop-planned {
    color: #566176;
    background: #edf0f5;
}

.dashboard-workshop-empty {
    min-height: 0;
}

@media (max-width: 991.98px) {
    .dashboard-fleet-body,
    .dashboard-fleet-main {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 575.98px) {
    .dashboard-page .display-6 {
        font-size: 2rem;
    }

    .dashboard-fleet-body,
    .dashboard-panel-header,
    .dashboard-week-heading,
    .dashboard-week-content {
        padding-inline: 1rem;
    }

    .dashboard-fleet-stats {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.75rem;
    }

    .dashboard-fleet-suspended {
        width: 100%;
        margin-left: 0;
        padding-top: 0.75rem;
        padding-left: 0;
        border-top: 1px solid #c6d3e8;
        border-left: 0;
    }

    .dashboard-attention-row {
        grid-template-columns: minmax(0, 1fr);
        padding-inline: 1rem;
    }

    .dashboard-attention-row > .dashboard-attention-count,
    .dashboard-attention-row > form {
        justify-self: start;
    }

    .dashboard-week-heading {
        align-items: flex-start;
    }

    .app-filter-context {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* Mise en évidence de la ligne ciblée depuis le dashboard */

.table tbody tr:target {
    scroll-margin-top: 1rem;
}

.table tbody tr:target > * {
    background-color: var(--bs-warning-bg-subtle);
    --bs-table-bg-state: var(--bs-warning-bg-subtle);
}

.table tbody tr:target > *:first-child {
    border-left: 5px solid var(--bs-warning);
}


/* Liens du planning et de la zone « À traiter » */

a.planning-action-link,
a.dashboard-action-link {
    color: var(--bs-body-color);
    border-radius: 0.375rem;
    transition:
        color 0.15s ease,
        background-color 0.15s ease,
        box-shadow 0.15s ease;
}

a.planning-action-link:hover,
a.planning-action-link:focus-visible,
a.dashboard-action-link:hover,
a.dashboard-action-link:focus-visible {
    color: var(--bs-primary);
    background-color: rgba(var(--bs-primary-rgb), 0.05);
    box-shadow: inset 3px 0 0 var(--bs-primary);
}


/* Liens des statuts de la flotte */

a.fleet-status-link {
    color: var(--bs-body-color);
    transition: color 0.15s ease;
}

a.fleet-status-link:hover,
a.fleet-status-link:focus-visible {
    color: var(--bs-primary);
}


/* Préparation et rendu papier des incidents */

.incident-print-options,
.incident-print-document {
    border: 1px solid #dde3ee;
    border-radius: 1rem;
    box-shadow: 0 0.8rem 2rem rgba(31, 51, 127, 0.08);
}

.incident-print-choice-list {
    display: grid;
    gap: 0.65rem;
}

.incident-print-statuses {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.incident-print-choice {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 2.75rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid #dbe2ed;
    border-radius: 0.75rem;
    background: #f8fafd;
    cursor: pointer;
}

.incident-print-choice:has(input:checked) {
    border-color: #9eb0ee;
    color: #2443bb;
    background: #eef2ff;
}

.incident-print-choice input {
    width: 1.05rem;
    height: 1.05rem;
    accent-color: #2443bb;
}

.incident-print-document {
    margin-bottom: 1.5rem;
    padding: 2rem;
    background: #fff;
}

.incident-print-document-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #27408b;
}

.incident-print-document-header h2 {
    margin: 0.2rem 0 0;
    color: #111a33;
    font-size: 1.5rem;
}

.incident-print-company {
    color: #27408b;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.incident-print-generated,
.incident-print-status-summary {
    color: #566176;
    font-size: 0.85rem;
}

.incident-print-generated {
    white-space: nowrap;
}

.incident-print-vehicle-selection {
    padding-top: 1.25rem;
    border-top: 1px solid #e2e7f0;
}

.incident-print-vehicle-choices {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
}

.incident-print-vehicle-choice {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.8rem;
    border: 1px solid #d9dee8;
    border-radius: 0.65rem;
    cursor: pointer;
}

.incident-print-vehicle-choice:has(input:checked) {
    border-color: #9eb0ee;
    background: #f1f4ff;
}

.incident-print-vehicle-choice[hidden] {
    display: none;
}

.incident-print-vehicle-choice input {
    flex: 0 0 auto;
    width: 1.05rem;
    height: 1.05rem;
    margin-top: 0.15rem;
    accent-color: #2443bb;
}

.incident-print-vehicle-choice span,
.incident-print-vehicle-choice small {
    display: block;
}

.incident-print-vehicle-choice small {
    margin-top: 0.15rem;
    color: #66758f;
}

.incident-print-vehicle-title {
    margin: 1.25rem 0;
    padding: 1.15rem;
    border-radius: 0.75rem;
    background: #f3f6fb;
    text-align: center;
}

.incident-print-vehicle-title h1 {
    display: block;
    margin: 0;
    color: #111a33;
    font-size: 3.25rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.08em;
}

.incident-print-vehicle-title div {
    margin-top: 0.2rem;
    color: #566176;
}

.incident-print-general-group + .incident-print-general-group {
    margin-top: 1.5rem;
}

.incident-print-general-group-empty {
    border: 1px solid #8995aa;
    border-top: 0;
}

.incident-print-general-vehicle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border: 2px solid #27408b;
    background: #cbd7f0;
}

.incident-print-general-vehicle div,
.incident-print-general-vehicle span {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.incident-print-general-vehicle strong {
    color: #111a33;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.incident-print-general-vehicle span {
    color: #566176;
    font-size: 0.85rem;
}

.incident-print-general-group .incident-print-table {
    margin-top: 0;
}

.incident-print-repeated-vehicle-row {
    display: none;
}

.incident-print-empty-state {
    margin-top: 1.25rem;
    padding: 1.25rem;
    border: 1px dashed #b9c3d4;
    border-radius: 0.65rem;
    color: #43516a;
    background: #fafbfc;
    font-weight: 600;
    text-align: center;
}

.incident-print-empty-state-general {
    margin-top: 0;
    border: 0;
    border-radius: 0;
    background: #f5f7fb;
    text-align: left;
}

.incident-print-table {
    width: 100%;
    margin-top: 1.25rem;
    border-collapse: collapse;
}

.incident-print-table th,
.incident-print-table td {
    padding: 0.75rem;
    border: 1px solid #d9dee8;
    vertical-align: top;
    text-align: left;
}

.incident-print-table th {
    color: #43516a;
    background: #eef2f8;
    font-size: 0.75rem;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.incident-print-table th:first-child,
.incident-print-table td:first-child {
    white-space: nowrap;
}

.incident-print-description {
    margin-top: 0.2rem;
    color: #4f596b;
    font-size: 0.9rem;
    line-height: 1.35;
}

.incident-print-document-footer {
    margin-top: 1rem;
    color: #66758f;
    font-size: 0.8rem;
    text-align: right;
}

@media (max-width: 767.98px) {
    .incident-print-statuses,
    .incident-print-vehicle-choices {
        grid-template-columns: 1fr;
    }

    .incident-print-document-header,
    .incident-print-general-vehicle div {
        flex-direction: column;
    }

    .incident-print-general-vehicle {
        display: grid;
        grid-template-columns: 1fr auto;
    }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
    .incident-print-vehicle-choices {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 12mm;
    }

    body,
    .app-body {
        background: #fff !important;
        color: #000 !important;
    }

    .app-navbar,
    .incident-print-screen-only {
        display: none !important;
    }

    main.container {
        max-width: none;
        padding: 0 !important;
    }

    .incident-print-document {
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .incident-print-document + .incident-print-document {
        break-before: page;
        page-break-before: always;
    }

    .incident-print-document-header,
    .incident-print-general-vehicle,
    .incident-print-table thead,
    .incident-print-table tr {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .incident-print-general-vehicle {
        break-after: avoid;
        page-break-after: avoid;
    }

    .incident-print-table thead {
        display: table-header-group;
    }

    .incident-print-repeated-vehicle-row {
        display: table-row !important;
    }

    .incident-print-vehicle-title-with-table,
    .incident-print-general-group-with-table > .incident-print-general-vehicle {
        display: none !important;
    }

    .incident-print-repeated-vehicle-cell {
        padding: 0 !important;
        border: 0 !important;
        text-transform: none !important;
    }

    .incident-print-repeated-vehicle-sheet {
        padding: 5mm;
        border: 2px solid #27375f;
        background: #f3f6fb !important;
        text-align: center;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .incident-print-repeated-vehicle-sheet strong,
    .incident-print-repeated-vehicle-sheet span {
        display: block;
    }

    .incident-print-repeated-vehicle-sheet strong {
        color: #111a33;
        font-size: 30pt;
        font-weight: 800;
        line-height: 1;
        letter-spacing: 0.08em;
    }

    .incident-print-repeated-vehicle-sheet span {
        margin-top: 2mm;
        color: #566176;
        font-size: 11pt;
        font-weight: 400;
    }

    .incident-print-repeated-vehicle-general {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 4mm;
        padding: 3mm 4mm;
        border: 2px solid #27375f;
        background: #cbd7f0 !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .incident-print-repeated-vehicle-general div {
        display: flex;
        align-items: baseline;
        gap: 3mm;
    }

    .incident-print-repeated-vehicle-general strong {
        color: #111a33;
        font-size: 16pt;
        font-weight: 800;
        letter-spacing: 0.05em;
    }

    .incident-print-repeated-vehicle-general span {
        color: #566176;
        font-size: 9pt;
        font-weight: 400;
    }

    .incident-print-table th {
        background: #eef2f8 !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .incident-print-vehicle-title {
        margin: 7mm 0 6mm;
        padding: 5mm;
        border: 2px solid #27375f;
        border-radius: 0;
        background: #f3f6fb !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .incident-print-vehicle-title h1 {
        font-size: 30pt !important;
        line-height: 1 !important;
    }

    .incident-print-vehicle-title div {
        margin-top: 2mm;
        font-size: 11pt;
    }

    .incident-print-general-vehicle {
        display: grid !important;
        grid-template-columns: 1fr auto;
        padding: 3mm 4mm;
        border: 2px solid #27375f;
        background: #cbd7f0 !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .incident-print-general-vehicle div {
        flex-direction: row !important;
    }

    .incident-print-general-vehicle strong {
        font-size: 16pt !important;
    }

    .incident-print-general-group + .incident-print-general-group {
        margin-top: 5mm;
    }

    .incident-print-general-group {
        break-inside: avoid-page;
        page-break-inside: avoid;
    }

    .incident-print-general-group-empty {
        border-color: #526078;
    }

    .incident-print-empty-state-general {
        padding: 4mm;
        border: 0;
        background: #f5f7fb !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}

.status-badge {
    padding: 0.35rem 0.65rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.action-table-menu {
    min-width: 11rem;
}

.action-table-menu .dropdown-item {
    transition: background-color 0.15s ease;
}

.action-table-edit {
    color: var(--bs-primary);
}

.action-table-edit:hover,
.action-table-edit:focus {
    color: var(--bs-primary);
    background-color: rgba(var(--bs-primary-rgb), 0.1);
}

.action-table-delete {
    color: var(--bs-danger);
}

.action-table-delete:hover,
.action-table-delete:focus {
    color: var(--bs-danger);
    background-color: rgba(var(--bs-danger-rgb), 0.1);
}

.action-table > tbody > tr:hover > *,
.action-table > tbody > tr:focus-within > * {
    --bs-table-bg-state: #eaf3ff;
}


/* Erreurs de validation des formulaires Django */

.errorlist {
    margin: 0.35rem 0 0;
    padding: 0;
    color: var(--bs-danger);
    font-size: 0.875rem;
    font-weight: 600;
    list-style: none;
}

.form-control:has(+ .errorlist),
.form-select:has(+ .errorlist) {
    border-color: var(--bs-danger);
}

.form-control:has(+ .errorlist):focus,
.form-select:has(+ .errorlist):focus {
    border-color: var(--bs-danger);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-danger-rgb), 0.25);
}

/* Les rappels restent secondaires et ne font pas grandir les lignes du tableau. */
.app-reminder-note {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    overflow-wrap: anywhere;
}
