.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 6vh 8vw;
    background-position: center center;
    background-repeat: no-repeat;
    background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.45)), url('../login-background.jpg');
    background-size: cover;
}
.login-card {
    width: 400px;
    max-width: 460px;
    background: rgba(255, 255, 255, 0.86);
    border-radius: 5px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    padding: 70px 49px;
    backdrop-filter: blur(3px);
}

/* ci-dessous pour l'image */
.login-logo img {
    width: 288px;
}

.login-logo {
/* ci-dessous pour le texte */
    color: #00a0df;
    font-size: 50px;
    font-weight: bold;
}

.login-title {
    color: #0096d6;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 0.5px;
    margin: 4px 0 18px;
}

/* mot de passe oublié */
.login-password {
    display: flex;
    justify-content: center;
}

.tableBackground .login-form #header {
    /* ci-dessous pour le texte 'password oublie' */
    color: #00a0df;
    font-size: 50px;
    font-weight: bold;
}

.tableBackground .login-form .row div form div button {
    background: #00a0df;
    color: #fff;
    border: none;
    width: 100%;
    font-weight: 600;
    padding: 10px;
    border-radius: 6px;
}

.tableBackground .login-form .row div form div button:hover {
    background: #008dc2;
    color: #fff;
}

/* pour 'password oublie', login et autres pages avec label-input sk_username */
label:has(+ #sk_username):before {
    display: inline-block;
    content: "";
    background-image: url('data:image/svg+xml,<svg class="bi bi-person" width="1em" height="1em" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M13 14s1 0 1-1-1-4-6-4-6 3-6 4 1 1 1 1h10zm-9.995-.944v-.002.002zM3.022 13h9.956a.274.274 0 00.014-.002l.008-.002c-.001-.246-.154-.986-.832-1.664C11.516 10.68 10.289 10 8 10c-2.29 0-3.516.68-4.168 1.332-.678.678-.83 1.418-.832 1.664a1.05 1.05 0 00.022.004zm9.974.056v-.002.002zM8 7a2 2 0 100-4 2 2 0 000 4zm3-2a3 3 0 11-6 0 3 3 0 016 0z" clip-rule="evenodd"/></svg>');
    background-repeat: no-repeat;
    -webkit-background-size: 1.5rem 1.5rem;
    background-size: 1.5rem 1.5rem;
    background-position: 0 0.4rem;
    width: 1.75rem;
    height: 1.75rem;
}

.tableBackground {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 400px;
    max-width: 460px;
    background: rgba(255, 255, 255, 0.86);
    border-radius: 5px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    padding: 70px 49px;
    backdrop-filter: blur(3px);
}

#page:has(div div .tableBackground) {
    min-height: 100vh;
    padding: 6vh 8vw;
    background-position: center center;
    background-repeat: no-repeat;
    background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.45)), url('../login-background.jpg');
    background-size: cover;
}

@media (max-width: 992px) {
    #page:has(div div .tableBackground) {
        justify-content: center;
        padding: 5vh 5vw;
    }
    .tableBackground {
        max-width: 520px;
    }
}

.input-group-text {
    background: #eef3f6;
    border-color: #d7dee5;
    color: #6c737a;
    min-width: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.form-control {
    border-color: #d7dee5;
    min-height: 46px;
}
.form-control:focus {
    border-color: #00a0df;
    box-shadow: 0 0 0 0.2rem rgba(0, 160, 223, 0.25);
}
.btn-login {
    background: #00a0df;
    color: #fff;
    border: none;
    width: 100%;
    font-weight: 600;
    padding: 10px;
    border-radius: 6px;
}
.btn-login:hover {
    background: #008dc2;
    color: #fff;
}
.login-footer a {
    color: #008dc2;
    font-weight: 500;
}
.login-footer a:hover {
    text-decoration: none;
}
@media (max-width: 992px) {
    .login-page {
        justify-content: center;
        padding: 5vh 5vw;
    }
    .login-card {
        max-width: 520px;
    }
}

label:has(+ input:required):after,
label:has(+div + label textarea:required):after,
label:has(+ div input:required):after,
label:has(+div +input:required):after,
label:has(+ select:required):after,
label:has(+div select:required):after,
label:has(+textarea:required):after
{
    content: ' *';
    color: #dc2626;
    font-weight: 700;
}

#label-password:before {
    display: inline-block;
    content: "";
    background-image: url('data:image/svg+xml,<svg class="bi bi-lock" width="1em" height="1em" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M11.5 8h-7a1 1 0 00-1 1v5a1 1 0 001 1h7a1 1 0 001-1V9a1 1 0 00-1-1zm-7-1a2 2 0 00-2 2v5a2 2 0 002 2h7a2 2 0 002-2V9a2 2 0 00-2-2h-7zm0-3a3.5 3.5 0 117 0v3h-1V4a2.5 2.5 0 00-5 0v3h-1V4z" clip-rule="evenodd"/></svg>');
    background-repeat: no-repeat;
    -webkit-background-size: 1.5rem 1.5rem;
    background-size: 1.5rem 1.5rem;
    background-position: 0 0.25rem;
    width: 1.75rem;
    height: 1.75rem;
}

.under-title {
    font-size: 12px;
    color:black;
    text-align: right;
    padding-right: 30px;
}

.wrapper {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

#sidebar,
#sidebar.active {
    display: flex;
    align-items: center;
    gap: 18px;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    min-width: 0;
    max-width: none;
    padding: 12px 28px;
    min-height: 68px;
    background: #0f172a;
    color: #e2e8f0;
    border-bottom: 1px solid #1f2937;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(2px);
}

#sidebar > div,
#sidebar > ul {
    position: static;
}

#sidebar > ul {
    width: 100%;
    top: auto;
    padding: 0;
    margin: 0;
}

#sidebar .sidebar-header {
    padding: 0;
    margin: 0;
    margin-right: 12px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    background-color: #00a0df;
    border-radius: 10px;
    height: 40px;
}

#sidebar .sidebar-header span {
    color:white;
    font-weight: bold;
    font-size: 20px;
}

#sidebar .sidebar-header a {
    display: inline-flex;
    align-items: center;
}

#sidebar .logo-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    min-width: 54px;
    min-height: 54px;
    border-radius: 12px;
}

#sidebar .logo-box img {
    height: 34px;
    width: auto;
    display: block;
}

#sidebar .sidebar-header img {
    height: 48px;
    width: auto;
}

#sidebar .sidebar-header h3 {
    margin: 0;
    line-height: 1;
    display: block;
}

#sidebar .sidebar-header p {
    display: none;
}

#sidebar .top-menu {
    width: 100%;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
}

#sidebar .top-menu li {
    list-style: none;
    margin: 0;
    padding: 0;
}

#sidebar .top-menu__links {
    display: flex;
    flex: 1;
    justify-content: center;
    gap: 6px;
    padding: 6px;
    border-radius: 12px;
    background: #111827;
    border: 1px solid #1f2937;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

#sidebar .top-menu__links a {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #cbd5e1;
    background: none;
    text-decoration: none;
    border-radius: 10px;
    position: relative;
    transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

#sidebar .top-menu__links a::after {
    content: '';
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 4px;
    height: 2px;
    border-radius: 999px;
    background: transparent;
    transition: background 0.2s ease;
}

#sidebar .top-menu__links a:hover {
    color: #f8fafc;
    background: #1f2937;
}

#sidebar .top-menu__links a.active {
    color: #ffffff;
    background: #10b981;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

#sidebar .top-menu__actions .profile-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    background: #f59e0b;
    color: #0f172a;
    border-radius: 10px;
    font-size: 0.9rem;
    text-decoration: none;
    box-shadow: 0 6px 14px rgba(245, 158, 11, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

#sidebar .top-menu__actions .profile-btn:hover {
    background: #d97706;
    transform: translateY(-1px);
    box-shadow: 0 12px 20px rgba(217, 119, 6, 0.4);
}

#sidebar .top-menu__actions .logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    min-width: 42px;
    min-height: 38px;
    border-radius: 10px;
    border: 1px solid #334155;
    background: transparent;
    color: #e2e8f0;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

#sidebar .top-menu__actions .logout-btn:hover {
    color: #ffffff;
    border-color: #475569;
    background: #1f2937;
}

@media (max-width: 900px) {
    #sidebar {
        position: relative;
    }

    #sidebar .top-menu {
        flex-direction: column;
        align-items: flex-start;
    }

    #sidebar .top-menu__links {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 10px 12px;
        padding: 6px;
        background: #111827;
        border: 1px solid #1f2937;
        box-shadow: none;
    }

    #sidebar .top-menu__actions {
        width: 100%;
        display: flex;
        justify-content: flex-start;
    }
}

/* Declarations page */
body {
    overflow: auto;
}

.decl-page {
    /*max-width: 1240px;*/
    margin: 0 auto;
    padding: 24px 20px 40px;
    box-sizing: border-box;
    height: calc(100vh - 50px);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.fact-page {
    /*max-width: 1240px;*/
    margin: 0 auto;
    padding: 24px 20px 400px;
    box-sizing: border-box;
    height: calc(100vh - 50px);
    display: flex;
    flex-direction: column;
    min-height: 0;
    grid-template-columns: repeat(1, minmax(0, 1fr) minmax(0, 2fr))!important;
    gap: 18px;
}



.decl-page__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.fact-page__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.prest-detail-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.facture-actions {
    margin-left: auto;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.facture-actions .prest-btn {
    gap: 6px;
}

.btn-icon {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    opacity: 0.8;
}

.btn-icon path {
    stroke-width: 1.6;
}

.facture-actions .prest-btn--primary .btn-icon {
    opacity: 0.95;
}

.facture-pdf-btn {
    border-color: #0b74b8;
    background: #0b74b8;
    color: #ffffff;
}

.facture-pdf-btn:hover {
    border-color: #095c91;
    background: #095c91;
    color: #ffffff;
}

.facture-download-link {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.facture-history-toggle {
    padding: 8px 10px;
    font-size: 0.85rem;
}

.facture-history-toggle .btn-icon {
    width: 14px;
    height: 14px;
    opacity: 0.85;
}

.facture-history-panel {
    max-width: 780px;
    width: min(92vw, 780px);
}

.facture-history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.facture-history-item {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 14px;
    background: #f8fafc;
}

.facture-history-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 10px;
}

.facture-history-date {
    font-weight: 600;
    color: #0f172a;
}

.facture-history-action {
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(14, 116, 144, 0.1);
    color: #0e7490;
    font-weight: 600;
}

.facture-history-changes {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.facture-history-change {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    color: #0f172a;
}

.facture-history-field {
    min-width: 140px;
    font-weight: 600;
    color: #1f2937;
}

.facture-history-old {
    color: #6b7280;
}

.facture-history-arrow {
    color: #94a3b8;
}

.facture-history-new {
    color: #0f172a;
    font-weight: 600;
}

.facture-history-empty {
    font-size: 13px;
    color: #6b7280;
}

.decl-page__title h1 {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.decl-page__title p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
    max-width: 660px;
}

.budget-page .decl-page__title h1,
.budget-detail-page .decl-page__title h1, .decl-th__title {
    color: #0b74b8;
}

.declarations-page .decl-page__title h1,
.prestataires-page .decl-page__title h1,
.prestataire-detail-page .decl-page__title h1,
.factures-page .decl-page__title h1 {
    color: #0b74b8;
}

.decl-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

.decl-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
    font-size: 13px;
}

.decl-pill--count {
    padding: 0;
    border: none;
    background: transparent;
}

.decl-pill__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: #0b74b8;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
}

.decl-pill label {
    margin: 0;
    color: #6b7280;
    font-size: 12px;
}

.decl-pill select {
    border: none;
    background: transparent;
    outline: none;
    font-size: 13px;
    color: #111827;
    min-width: 110px;
}

.decl-search {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
    font-size: 13px;
}

.decl-search input {
    border: none;
    outline: none;
    font-size: 13px;
    min-width: 180px;
}

.decl-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
    padding: 16px 18px 10px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
    margin-bottom: 18px;
}

.fact-page .decl-card {
    border: 1px solid #eef2f7;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.fact-card{
    border: 1px solid #dbe7f5;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.fact-section-partie {
    border: 1px solid #dbe7f5;
    border-radius: 8px;
    padding: 8px 10px;
    background: #ffffff;
}

.text-ligne-detail{
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0f172a!important;
    background: #e2e8f0;
    border: none!important;
    padding: 3px 8px!important;
    border-radius: 999px;
    width: fit-content!important;
    font-weight: 700;
    letter-spacing: 0.01em;
    font-size: 12px;
    line-height: 1.2;
}

.text-ligne-detail::before {
    content: "↘";
    font-size: 12px;
    color: #0f172a;
    line-height: 1;
}

.prestataire-detail-page,
.budget-detail-page,
.declarations-invoice-page {
    height: auto;
    min-height: calc(100vh - 50px);
}

.prestataire-detail-page {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
    row-gap: 16px;
    align-content: start;
}

.prestataire-detail-page > .prest-detail-tabs,
.prestataire-detail-page > .decl-page__header,
.prestataire-detail-page > .prest-section-tabs,
.prestataire-detail-page > .prest-detail-tab-content {
    grid-column: 1 / -1;
}

.prestataire-detail-page .decl-card {
    flex: 0 0 auto;
    margin-bottom: 0;
}

.fact-card-error{
    border: 5px solid orange!important;
}

.prestataire-detail-page .prest-detail-tab-content {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
    row-gap: 16px;
    align-content: start;
}

.prestataire-detail-page .prest-detail-tab-content.is-active {
    display: grid;
}

.prestataire-detail-page .prest-params-form {
    grid-column: 1 / -1;
}

.prestataire-detail-page .prest-profile-form {
    grid-column: 1 / -1;
}

.prestataire-detail-page .prest-detail-card,
.prestataire-detail-page .budget-detail {
    align-self: stretch;
}

.prestataire-detail-page .prest-detail-card--full {
    grid-column: 1 / -1;
}

.prestataire-detail-page .decl-card:not(.prest-detail-card):not(.budget-detail):not(.prest-params-card) {
    grid-column: 1 / -1;
}

.budget-detail-page .decl-card {
    flex: 0 0 auto;
}

.budget-detail__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.budget-detail {
    flex: 0 0 auto;
}

.budget-detail__title h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.budget-detail__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}

.budget-summary {
    margin-bottom: 16px;
}

.budget-detail .budget-summary {
    flex: 0 0 auto;
    overflow: visible;
}

.budget-summary-table th {
    background: #f9fafb;
}

.budget-summary-table thead th {
    background: #f1f6fb;
}

.decl-table-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.error-table-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    color: red;
}

.decl-table-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.decl-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid #15803d;
    background: #16a34a;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.decl-add-btn:hover {
    background: #15803d;
    color: #ffffff;
}

.decl-table-title {
    font-size: 15px;
    font-weight: 600;
}

.fact-table-title2 {
    font-size: 13px;
    font-weight: 600;
    padding-bottom: 10px;
    text-decoration: none;
}

.decl-table-subtitle {
    font-size: 12px;
    color: #6b7280;
}

.decl-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.decl-table thead {
    background: #f9fafb;
}

.fact-page .decl-table thead {
    background: #f6f9fd;
}

.decl-table th,
.decl-table td {
    padding: 9px 6px;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
    white-space: nowrap;
}

.decl-table tfoot td {
    font-weight: 600;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.decl-table th {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
}

.budget-page .decl-table th,
.budget-detail-page .decl-table th {
    color: #0b74b8;
}

.declarations-page .decl-table th,
.prestataires-page .decl-table th,
.prestataire-detail-page .decl-table th {
    color: #0b74b8;
}

.fact-page .decl-table th {
    color: #1f4f8b;
    font-weight: 600;
}

.fact-page .decl-table td {
    color: #0f172a;
    font-weight: 500;
}

.decl-table tbody tr:hover {
    background: #f9fafb;
}

.fact-page .decl-table tbody tr:hover {
    background: #f4f8ff;
}

.fact-page .facture-table tbody tr.is-active {
    background: linear-gradient(90deg, #0f172a 0%, #101b2f 45%, #0b2a4a 100%);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.18);
    transform: translateY(-1px);
}

.fact-page .facture-table tbody tr.is-active th,
.fact-page .facture-table tbody tr.is-active td {
    color: #ffffff;
    text-shadow: 0 1px 0 rgba(15, 23, 42, 0.6);
}

.fact-page .facture-table tbody tr.is-active th:first-child,
.fact-page .facture-table tbody tr.is-active td:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    position: relative;
    overflow: hidden;
}

.fact-page .facture-table tbody tr.is-active th:last-child,
.fact-page .facture-table tbody tr.is-active td:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.fact-page .facture-table tbody tr.is-active th:first-child::before,
.fact-page .facture-table tbody tr.is-active td:first-child::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #60a5fa 0%, #38bdf8 100%);
}

.fact-page .facture-table tbody tr.is-active {
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.decl-table tbody tr[data-perimetre] {
    cursor: pointer;
}

.decl-table tbody tr[data-detail-url] {
    cursor: pointer;
}

.decl-table tbody tr[data-detail] {
    cursor: pointer;
}

.decl-table tbody tr.is-active {
    background: #eef6fb;
}

.decl-table .text-right {
    text-align: right;
}

.decl-empty {
    text-align: center;
    padding: 16px 8px;
    color: #6b7280;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: #dcfce7;
    color: #166534;
}

.status-pill.pending {
    background: #fef9c3;
    color: #854d0e;
}

.status-pill.refused {
    background: #fee2e2;
    color: #aa1515;
}

.status-pill.deleted {
    background: #fee2e2;
    color: red;
}

.status-pill.error {
    background: #fee2e2;
    color: #b91c1c;
}

.status-pill.not-received {
    background: #e0f2fe;
    color: #075985;
}

.status-pill.closed {
    background: #e5e7eb;
    color: #6b7280;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.decl-row-hidden {
    display: none;
}

.decl-card .table-responsive {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
    min-height: 0;
    padding-bottom: 14px;
    box-sizing: border-box;
}

.decl-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f9fafb;
}

.facture-line-add {
    margin-top: 14px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.facture-line-form {
    width: 100%;
}

.facture-line-grid {
    display: grid;
    grid-template-columns: minmax(180px, 2fr) minmax(200px, 2fr) minmax(120px, 1fr) minmax(140px, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.facture-line-actions {
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 900px) {
    .facture-line-grid {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
    .facture-line-actions {
        justify-content: flex-start;
    }
}

.declarations-page .decl-table tbody tr[data-decl-row] {
    cursor: pointer;
}

.decl-progress-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
}

.decl-progress-item:last-child {
    border-bottom: none;
}

.decl-progress-item.is-clickable {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.decl-progress-item.is-clickable:hover {
    background: #f2f7ff;
}

.decl-progress-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.decl-progress-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #0f141a;
}

.decl-progress-sub {
    font-size: 11px;
    color: #6b7280;
}

.decl-progress-meta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    color: #6b7280;
}

.decl-progress-date {
    min-width: 80px;
    text-align: right;
}

.decl-progress-status {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: #e5e7eb;
    color: #9ca3af;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.decl-progress-status.is-done {
    background: #dcfce7;
    color: #166534;
}

.decl-progress-status.is-pending {
    background: #fef3c7;
    color: #b45309;
}

.decl-progress-status.is-error {
    background: #fee2e2;
    color: #b91c1c;
}

.decl-progress-status.is-refused {
    background: #fee2e2;
    color: #b91c1c;
}
.declarations-detail-page .decl-card {
    flex: 0 0 auto;
}

.decl-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.decl-detail-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.decl-detail-actions {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.decl-detail-close {
    color: #0b74b8;
    font-size: 12px;
    text-decoration: none;
    font-weight: 600;
}

.decl-detail-close:hover {
    color: #095c91;
    text-decoration: underline;
}

.decl-detail-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 0;
    border-bottom: 1px dashed #e5e7eb;
}

.decl-detail-field--stack {
    align-items: flex-start;
    flex-direction: column;
}

.decl-detail-field--total .decl-detail-label,
.decl-detail-field--total .decl-detail-value {
    font-weight: 700;
}

.decl-detail-label {
    font-size: 11px;
    font-weight: 600;
    color: #0b74b8;
}

.decl-detail-section-title {
    font-size: 12px;
    font-weight: 700;
    color: #0b74b8;
    margin-bottom: 2px;
}

.fact-detail-label {
    color: #0b74b8!important;
}

.decl-detail-value {
    font-size: 12px;
    font-weight: 600;
    color: #0f141a;
    text-align: right;
    white-space: nowrap;
}

.decl-detail-input {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.decl-detail-control {
    width: 140px;
    padding: 6px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 12px;
    text-align: right;
}

.decl-detail-control--stretch {
    width: 100%;
    text-align: left;
}

.decl-detail-unit {
    font-size: 11px;
    color: #6b7280;
}

.decl-detail-textarea {
    width: 100%;
    min-height: 120px;
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 12px;
    color: #0f141a;
    background: #ffffff;
    white-space: pre-wrap;
}

.decl-detail-block-col {
    display: flex;
    flex-direction: column;
}

.decl-detail-block-col .importDetail {
    height: 100%;
    max-height: 350px;
    overflow-y: auto;
    overflow-x: hidden;
}

.decl-detail-block-col .importDetail ul {
    margin-bottom: 0;
}

.decl-detail-block-action-btn {
    align-self: end;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.decl-detail-block-action-btn a,
.decl-detail-block-action-btn button {
    /*color: #0f141a;*/
    color: #0b74b8;
    background: #ffffff;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #d1d5db;
    cursor: pointer;
}
.decl-detail-block-action-btn a:hover,
.decl-detail-block-action-btn button:hover {
    border-color: #9ca3af;
    color: #0f141a;
    background: #f9fafb;
}
.decl-detail-block-action-btn .disabled-link {
    pointer-events: none;
    cursor: not-allowed;
    background-color: #efefef !important;
    color: #b4b4b4 !important;
    border: solid 1px #d1d5db !important;
}

.decl-card .table-responsive.table-decl-line {
    height: 100%;
    max-height: 350px;
    overflow: auto;
}

.decl-subtabs {
    display: flex;
    gap: 18px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 12px;
    padding: 0 4px;
}

.decl-subtab {
    display: inline-flex;
    padding: 8px 2px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-decoration: none;
    border-bottom: 2px solid transparent;
}

.decl-subtab.is-active {
    color: #0b74b8;
    border-color: #0b74b8;
}

.decl-subtab.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.prest-profile-subtabs {
    margin-bottom: 14px;
    gap: 10px;
    border-bottom: none;
}

.prest-profile-subtabs .decl-subtab {
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    color: #64748b;
    font-weight: 600;
    border-bottom: 1px solid #e5e7eb;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.prest-profile-subtabs .decl-subtab:hover {
    color: #0f172a;
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.prest-profile-subtabs .decl-subtab.is-active {
    color: #0b74b8;
    border-color: rgba(11, 116, 184, 0.25);
    background: #eaf2ff;
    box-shadow: inset 0 0 0 1px rgba(11, 116, 184, 0.2);
}

.decl-meta {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: #6b7280;
}

.decl-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: 12px;
}

.decl-detail-actions--topbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px 16px;
}

.decl-detail-actions--topbar .decl-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 12px;
}

.decl-actions--topbar {
    margin-left: 0;
    flex-shrink: 0;
}

.decl-validation-card {
    gap: 18px;
}

.decl-invoice-card {
    gap: 18px;
}

.decl-invoice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.decl-invoice-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: none;
}

.decl-invoice-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.decl-invoice-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.decl-invoice-row .decl-invoice-block {
    min-width: 0;
}

@media (max-width: 900px) {
    .decl-invoice-row {
        grid-template-columns: minmax(0, 1fr);
    }
}

.decl-invoice-text {
    font-size: 12px;
    color: #0f141a;
    padding-bottom: 6px;
    border-bottom: 1px dashed #e5e7eb;
}

.decl-invoice-textarea {
    width: 100%;
    min-height: 120px;
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 12px;
    color: #0f141a;
    background: #ffffff;
    white-space: pre-wrap;
}

.decl-validation-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

.decl-validation-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 560px;
}

.decl-validation-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.decl-validation-choice {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: #0f141a;
}

.decl-validation-choice input {
    margin-right: 6px;
}

.decl-validation-hint {
    font-size: 11px;
    color: #6b7280;
}

.fact-textarea {
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 12px;
    color: #0f141a;
    background: #ffffff;
    resize: none;
}

.fact-textarea-div {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 12px;
    color: #0f141a;
    background: #ffffff;
    resize: none;
}

.fact-textarea-adresse {
    min-height: 110px;
    min-width: 450px;
}

.fact-textarea-non-modifiable {
    min-height: 90px;
    width: 100%;
}

.fact-textarea-modifiable {
    width: 100%;
    min-height: 80px;
}

.fact-modifiable {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-gap: 12px;
    background: #eaf2ff;
    border-radius: 14px;
    padding: 12px;
}

#sectionCreationNonModifiable .table-responsive {
    background: #eaf2ff;
    border-radius: 14px;
    padding: 12px;
}

#sectionCreationNonModifiable .decl-table {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px #dbe7f5;
}

#sectionCreationNonModifiable .decl-table th,
#sectionCreationNonModifiable .decl-table td {
    padding: 10px 12px;
}

.decl-validation-textarea {
    width: 100%;
    min-height: 140px;
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 12px;
    color: #0f141a;
    background: #ffffff;
}

.decl-validation-actions {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-end;
}

/* Prestataires create form */
.prest-form-page {
    max-width: none;
    width: 100%;
    margin: 0 auto;
    padding: 20px 28px 28px;
    box-sizing: border-box;
}

.prest-form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}

.prest-form-title h1 {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.prest-form-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 12px;
    color: #6b7280;
}

.file-assetkey {
    border: 0;
    max-height: 0;
    max-width: 0;
}

.file-assetkey:focus {
    outline: none;
}

.prest-form-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.prest-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
}

.prest-btn--ghost {
    border-color: #d1d5db;
    color: #0f141a;
    background: #ffffff;
}

.prest-btn--ghost:hover {
    border-color: #9ca3af;
    color: #0f141a;
    background: #f9fafb;
}

.prest-btn--primary {
    border-color: #15803d;
    color: #ffffff;
    background: #16a34a;
}

.prest-btn--primary:hover {
    background: #15803d;
    color: #ffffff;
}

.prest-btn--danger {
    border-color: #dc2626;
    color: #ffffff;
    background: #ef4444;
}

.prest-btn--danger:hover {
    background: #dc2626;
    color: #ffffff;
}

.prest-form-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
    padding: 14px;
}

.prest-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.prest-form-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.prest-profile-subtab-content {
    display: none;
}

.prest-profile-subtab-content.is-active {
    display: block;
}

.prest-form-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.prest-form-field label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 4px;
}

.prest-form-field2 label {
    font-size: 11px;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 4px;
}

.number-input {
    width: max(150px);
    padding: 6px 9px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 12px;
    background: #ffffff;
    outline: none;
}

.number-input.fact-number-readonly {
    border: 0;
    background: transparent;
    padding: 0;
    border-radius: 0;
    pointer-events: none;
}

.prest-input {
    width: 100%;
    padding: 6px 9px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 12px;
    background: #ffffff;
    outline: none;
}

.prest-input--textarea {
    resize: vertical;
}

.prest-form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.prest-form-section {
    border: 1px solid #dbe7f3;
    background: #f6f9fc;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.prest-form-section-title {
    font-size: 12px;
    font-weight: 600;
    color: #0b74b8;
}

.prest-form-radio {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #111827;
}

.prest-form-radio input {
    margin-right: 6px;
}

.prest-form-hint {
    margin-top: 6px;
    font-size: 10px;
    color: #6b7280;
}

.prest-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    padding: 6px;
    max-height: 232px;
    overflow-y: auto;
}

.prest-checkbox-item {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 4px 7px;
    border: 1px solid #eef2f7;
    border-radius: 8px;
    background: #f9fafb;
    color: #111827;
    font-size: 11px;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.prest-checkbox-item:hover {
    border-color: #dbe7f3;
    background: #f3f6fb;
}

.prest-checkbox-item.is-selected {
    border-color: #9fd6bf;
    background: #edf9f2;
}

.prest-checkbox-main {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.prest-checkbox-input {
    margin: 0;
}

.prest-checkbox-required {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.prest-detail-tabs {
    display: flex;
    gap: 18px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 12px;
    padding: 0 4px;
}

.prest-detail-tabs a {
    display: inline-flex;
    padding: 8px 2px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-decoration: none;
    border-bottom: 2px solid transparent;
}

.prest-detail-tabs a.active {
    color: #0b74b8;
    border-color: #0b74b8;
}

.prest-section-tabs {
    display: flex;
    gap: 18px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 12px;
    padding: 0 4px;
}

.prest-section-tab {
    display: inline-flex;
    padding: 8px 2px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-decoration: none;
    border: none;
    background: transparent;
    border-bottom: 2px solid transparent;
    cursor: pointer;
}

.prest-section-tab.is-active {
    color: #0b74b8;
    border-color: #0b74b8;
}

.prestataire-detail-page .decl-page__title h1 {
    color: #0b74b8;
}

.prestataire-detail-page .prest-detail-card {
    padding: 12px;
}

.prestataire-detail-page .prest-detail-info {
    width: 100%;
}

.prestataire-detail-page .prest-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.prestataire-detail-page .prest-detail-table th,
.prestataire-detail-page .prest-detail-table td {
    padding: 6px 8px;
    vertical-align: top;
    border-bottom: 1px solid #e7eef6;
}

.prestataire-detail-page .prest-detail-table th {
    color: #6b7280;
    font-size: 10px;
    font-weight: 600;
    text-transform: none;
    width: 18%;
    white-space: nowrap;
}

.prestataire-detail-page .prest-detail-table td {
    color: #0f141a;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.35;
    width: 32%;
    word-break: break-word;
}

.prestataire-detail-page .prest-detail-table tr:last-child th,
.prestataire-detail-page .prest-detail-table tr:last-child td {
    border-bottom: none;
}

.prestataire-detail-page .prest-params-card {
    padding: 12px 14px;
}

.prest-params-card--main {
    grid-column: 1 / -1;
}

.prest-params-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fbfdff;
}

.prest-params-group + .prest-params-group {
    margin-top: 0;
}

.prest-params-group:first-child {
    padding-top: 12px;
}

.prest-params-group:last-child {
    padding-bottom: 12px;
}

.prest-params-group-title {
    font-size: 12px;
    font-weight: 600;
    color: #0b74b8;
}

.prest-params-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
}

.prest-params-field label {
    margin: 0;
    color: #111827;
    font-weight: 500;
    flex: 1 1 auto;
}

.fact-params-control {
    display: flex;
    align-items: center;
    gap: 6px;
}

.prest-params-control {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.prest-params-control .prest-input {
    width: 120px;
    text-align: right;
    font-size: 12px;
}

.prest-params-control .prest-input[type="date"] {
    width: 150px;
}

.prest-params-unit {
    font-size: 11px;
    color: #6b7280;
}

.prest-params-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 12px 16px;
}

.prest-params-group--calc {
    order: 1;
}

.prest-params-group--contract {
    order: 1;
    grid-column: 1 / -1;
}

.prest-params-group--ops {
    order: 2;
}

.prest-params-group--comm {
    order: 3;
}

.prest-params-group--control {
    order: 4;
}

.prest-params-group--declaratif {
    order: 5;
    grid-column: 1 / -1;
}


.prest-params-group--n1 {
    order: 2;
}

.prest-params-group--prev {
    order: 3;
}

.prest-params-group--montant {
    order: 4;
}

.prest-params-group--ajuste {
    order: 5;
}

.prest-params-group--annexe {
    order: 6;
}

.prest-params-group--reel {
    order: 7;
    grid-column: 1 / -1;
}

.prest-params-note {
    margin-bottom: 10px;
    padding: 8px 10px;
    border: 1px dashed #dbe7f3;
    border-radius: 8px;
    background: #f6f9fc;
    font-size: 11px;
    color: #4b5563;
}

.prest-params-subtitle {
    font-size: 11px;
    color: #6b7280;
    margin: -2px 0 4px;
}

.prest-params-subsection {
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.prest-params-subsection-title {
    font-size: 12px;
    font-weight: 600;
    color: #0b74b8;
}

.prest-params-field--stack {
    flex-direction: column;
    align-items: flex-start;
}

.prest-params-control--full {
    display: flex;
    width: 100%;
}

.prest-params-control--full .prest-input {
    width: 100%;
    text-align: left;
}

.prest-params-radio {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    font-size: 12px;
}

.prest-params-radio label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    color: #111827;
    font-weight: 500;
}

.prest-params-radio input {
    margin: 0;
}

/* Parametres panel redesign (matching reference structure) */
.prest-params-card--main .prest-params-note {
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    background: linear-gradient(180deg, #f7f9fc 0%, #f2f5fa 100%);
    color: #49556b;
}

.prest-params-card--main .prest-params-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr);
    grid-template-areas: "contract comm";
    gap: 14px;
    align-items: start;
}

.prest-params-card--main .prest-params-group--contract,
.prest-params-card--main .prest-params-group--ops,
.prest-params-card--main .prest-params-group--comm {
    order: initial;
    grid-column: auto;
}

.prest-params-card--main .prest-params-group--contract {
    grid-area: contract;
}

.prest-params-card--main .prest-params-group--ops {
    grid-area: auto;
}

.prest-params-card--main .prest-params-group--comm {
    grid-area: comm;
}

.prest-params-card--main .prest-params-group {
    border: 1px solid #d6deea;
    background: #f9fbfe;
    border-radius: 12px;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
    padding: 10px 12px;
    gap: 5px;
}

.prest-params-card--main .prest-params-group-title {
    margin: -10px -12px 6px;
    padding: 7px 10px;
    border-bottom: 1px solid #dce3ee;
    border-radius: 12px 12px 0 0;
    background: linear-gradient(180deg, #eef3f9 0%, #e7edf6 100%);
    color: #1f3654;
    display: flex;
    align-items: center;
    gap: 8px;
}

.prest-params-card--main .prest-params-group-title::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #2b7fc0;
}

.prest-params-card--main .prest-params-group-meta {
    margin-bottom: 4px;
    font-size: 10px;
    color: #6a7486;
}

.prest-params-card--main .prest-params-control .prest-input {
    width: 138px;
    border-color: #d4dbe6;
    background: #ffffff;
}

.prest-params-card--main .prest-params-control--full .prest-input {
    width: 100%;
}

.prest-params-card--main .prest-params-field {
    display: grid;
    grid-template-columns: minmax(170px, 1fr) minmax(170px, 340px);
    align-items: center;
    gap: 8px 10px;
    font-size: 11px;
}

.prest-params-card--main .prest-params-field label {
    font-size: 11px;
    font-weight: 600;
    text-align: left;
    justify-content: flex-start;
    flex: 0 0 auto;
}

.prest-params-card--main .prest-params-field--inline {
    grid-template-columns: minmax(170px, 1fr) minmax(240px, 420px);
}

.prest-params-card--main .prest-params-field--stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.prest-params-card--main .prest-params-field--stack > label {
    width: 100%;
    text-align: left;
}

.prest-params-card--main .prest-params-field--stack .prest-params-control--full {
    width: 100%;
    max-width: none;
}

.prest-params-card--main .prest-params-field:not(.prest-params-field--stack) .prest-params-control {
    width: 100%;
    justify-content: flex-end;
}

.prest-params-card--main .prest-params-field:not(.prest-params-field--stack) .prest-params-control--full {
    width: 100%;
    max-width: 340px;
}

.prest-params-card--main .prest-params-field:not(.prest-params-field--stack) .prest-params-control--full .prest-input {
    width: 100%;
}

.prest-params-card--main .prest-params-field .prest-input--textarea {
    min-height: 42px;
}

.prest-params-card--main .prest-params-radio {
    gap: 6px 10px;
    font-size: 11px;
}

.prest-params-card--main .prest-params-radio--yesno {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
    min-width: 86px;
}

.prest-params-card--main .prest-params-field--inline .prest-params-inline {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
}

.prest-params-card--main .prest-params-field--inline .prest-params-inline .prest-params-control {
    width: auto;
    flex: 0 0 auto;
    justify-content: flex-end;
}

.prest-params-card--main .prest-params-subsection {
    margin-top: 10px;
    padding: 0;
    border: 1px solid #dde4ef;
    border-radius: 10px;
    background: #ffffff;
    overflow: hidden;
}

.prest-params-card--main .prest-params-subsection-title {
    margin: 0;
    padding: 7px 9px;
    border-bottom: 1px solid #e5eaf2;
    background: #f3f6fb;
    color: #274261;
    display: flex;
    align-items: center;
    gap: 8px;
}

.prest-params-card--main .prest-params-subsection-title::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #3b8cc9;
}

.prest-params-card--main .prest-params-subsection .prest-params-field {
    padding: 0 9px;
}

.prest-params-card--main .prest-params-subsection .prest-params-field:first-of-type {
    padding-top: 8px;
}

.prest-params-card--main .prest-params-subsection .prest-params-field:last-of-type {
    padding-bottom: 8px;
}

@media (max-width: 1280px) {
    .prest-params-card--main .prest-params-layout {
        grid-template-columns: 1fr;
        grid-template-areas:
            "contract"
            "comm";
    }

    .prest-params-card--main .prest-params-field,
    .prest-params-card--main .prest-params-field--inline {
        grid-template-columns: minmax(150px, 1fr) minmax(180px, 1fr);
    }
}

@media (max-width: 900px) {
    .prest-params-card--main .prest-params-field,
    .prest-params-card--main .prest-params-field--inline {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .prest-params-card--main .prest-params-field:not(.prest-params-field--stack) .prest-params-control,
    .prest-params-card--main .prest-params-field:not(.prest-params-field--stack) .prest-params-control--full {
        max-width: none;
        justify-content: flex-start;
    }

    .prest-params-card--main .prest-params-control .prest-input {
        width: 100%;
    }

    .prest-params-card--main .prest-params-radio--yesno {
        flex-wrap: wrap;
    }
}

.prest-budget-card {
    gap: 12px;
}

.prest-budget-form {
    grid-column: 1 / -1;
}

.prest-budget-envelope,
.prest-budget-section {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 14px;
    background: #fbfdff;
}

.prest-budget-section-title {
    font-size: 12px;
    font-weight: 600;
    color: #0b74b8;
    margin-bottom: 8px;
}

.prest-budget-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.prest-budget-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0 4px;
    font-size: 11px;
    font-weight: 700;
    color: #0b74b8;
    border-top: 1px solid #e5e7eb;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.prest-budget-group:first-of-type {
    border-top: none;
    padding-top: 0;
}

.prest-budget-group-title {
    font-size: 11px;
    font-weight: 700;
}

.prest-budget-group-meta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: #111827;
    text-transform: none;
    font-weight: 600;
}

.prest-budget-group-total,
.prest-budget-group-percent {
    white-space: nowrap;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    padding: 4px 8px;
    border-radius: 10px;
    background: #eef6ff;
    border: 1px solid #cfe3ff;
}

.prest-budget-row {
    display: grid;
    grid-template-columns: minmax(140px, 1.2fr) 140px 160px 140px;
    gap: 8px 12px;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px dashed #e7eef6;
}

.prest-budget-row--active {
    background: #f2f7ff;
    border-bottom-color: #d6e6fb;
    border-radius: 6px;
    padding: 6px 8px;
}

.prest-budget-row--head {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    padding-top: 0;
    border-bottom: 1px solid #e5e7eb;
}

.prest-budget-row:last-child {
    border-bottom: none;
}

.prest-budget-name {
    font-size: 12px;
    font-weight: 600;
    color: #0f141a;
    padding-left: 8px;
}

.prest-budget-action {
    padding: 6px 10px;
    font-size: 11px;
}

.prest-btn.prest-budget-action {
    border-color: #1e5aa8;
    background: #1e5aa8;
    color: #ffffff;
}

.prest-btn.prest-budget-action:hover {
    border-color: #174a8a;
    background: #174a8a;
    color: #ffffff;
}

.prest-budget-empty {
    font-size: 12px;
    color: #6b7280;
    padding: 6px 0;
}

.prest-budget-summary {
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.prest-budget-summary-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
}

.prest-budget-summary-label {
    color: #6b7280;
    font-weight: 600;
}

.prest-budget-summary-value {
    text-align: right;
}

.prest-budget-summary-value--main {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.prest-budget-summary-value--diff {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}

.prest-budget-summary.is-over .prest-budget-summary-value--main,
.prest-budget-summary.is-over .prest-budget-summary-value--diff {
    color: #b91c1c;
}

.prest-budget-alert {
    display: none;
    padding: 6px 10px;
    border-radius: 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.prest-budget-alert.is-visible {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.prest-params-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.prest-input--readonly,
.prest-input[readonly],
.prest-input[disabled] {
    width: 100%;
    padding: 6px 9px;
    font-size: 12px!important;
    outline: none;
    text-align: left;
    min-height: 30px;
    color: black;
    background: white;

}

.prest-params-field--inline {
    align-items: flex-start;
}

.prest-params-inline {
    display: flex;
    align-items: center;
    gap: 12px;
}

.prest-params-inline .prest-form-radio {
    margin: 0;
}

.prest-real-grid {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px 12px;
    align-items: center;
}

.prest-real-head {
    font-size: 11px;
    font-weight: 600;
    color: #0b74b8;
}

.prest-real-label {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
}

.prest-real-grid .prest-params-control {
    width: 100%;
    justify-content: flex-end;
}

.prest-real-grid .prest-input {
    width: 100%;
    text-align: right;
}

/* Modal */
#skModalConfirmation .modal-footer button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
}
#skModalConfirmation .modal-footer #skModalConfirmationYes {
    border-color: #15803d;
    color: #ffffff;
    background: #16a34a;
}
#skModalConfirmation .modal-footer #skModalConfirmationNo {
    border-color: #d1d5db;
    color: #0f141a;
    background: #ffffff;
}

@media (max-width: 980px) {
    .prestataire-detail-page .prest-detail-table th,
    .prestataire-detail-page .prest-detail-table td {
        padding: 6px;
    }

    .prestataire-detail-page .prest-detail-table th {
        width: 22%;
    }

    .prestataire-detail-page .prest-detail-table td {
        width: 28%;
    }
}

@media (max-width: 640px) {
    .prest-detail-tabs,
    .prest-section-tabs {
        flex-wrap: wrap;
        gap: 10px 16px;
    }

    .prestataire-detail-page .prest-detail-table,
    .prestataire-detail-page .prest-detail-table tbody,
    .prestataire-detail-page .prest-detail-table tr,
    .prestataire-detail-page .prest-detail-table th,
    .prestataire-detail-page .prest-detail-table td {
        display: block;
        width: 100%;
    }

    .prestataire-detail-page .prest-detail-table tr {
        padding: 6px 0;
        border-bottom: 1px solid #e7eef6;
    }

    .prestataire-detail-page .prest-detail-table th {
        padding: 4px 0 2px;
        white-space: normal;
    }

    .prestataire-detail-page .prest-detail-table td {
        padding: 0 0 6px;
    }

    .prest-params-field {
        flex-direction: column;
        align-items: flex-start;
    }

    .prest-params-control {
        width: 100%;
        justify-content: flex-start;
    }

    .prest-params-control .prest-input {
        width: 100%;
        text-align: left;
    }

    .prest-params-inline {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }

    .prest-params-split {
        grid-template-columns: 1fr;
    }

    .prest-budget-row {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .prest-budget-row--head {
        display: none;
    }

    .prest-budget-summary-row {
        grid-template-columns: 1fr;
        text-align: left;
    }
}

@media (max-width: 1200px) {
    .prestataire-detail-page {
        grid-template-columns: 1fr;
    }

    .prestataire-detail-page .prest-detail-tab-content {
        grid-template-columns: 1fr;
    }

    .prest-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .prest-params-split {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .prest-budget-row {
        grid-template-columns: minmax(140px, 1fr) 110px 140px 130px;
    }
}

@media (max-width: 960px) {
    .decl-page__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .fact-page__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .decl-filters {
        justify-content: flex-start;
    }

    .decl-search input {
        min-width: 140px;
    }

    .prest-form-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .prest-form-grid,
    .prest-form-row {
        grid-template-columns: 1fr;
    }

    .decl-detail-grid {
        grid-template-columns: 1fr;
    }

    .decl-invoice-grid {
        grid-template-columns: 1fr;
    }

    .decl-detail-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .decl-detail-actions--topbar {
        width: 100%;
        justify-content: flex-start;
    }

    .decl-detail-actions--topbar .decl-meta {
        width: 100%;
    }

    .decl-actions {
        margin-left: 0;
    }

    .decl-validation-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 640px) {
    .decl-pill,
    .decl-search {
        width: 100%;
    }

    .decl-pill select {
        width: 100%;
    }

    .decl-progress-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .decl-progress-meta {
        width: 100%;
        justify-content: space-between;
    }
}

.decl-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.decl-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 20, 40, 0.45);
    backdrop-filter: blur(2px);
}
.decl-modal__panel {
    position: relative;
    width: min(520px, calc(100% - 32px));
    margin: 96px auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.2);
    padding: 22px 24px 20px;
}
.decl-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.decl-modal__title {
    font-size: 18px;
    font-weight: 600;
    color: #0b2b5a;
}
.decl-modal__close {
    border: 1px solid #d8e2f3;
    background: #f7f9fd;
    color: #234;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    cursor: pointer;
    line-height: 26px;
    font-size: 16px;
    padding: 0;
}
.decl-modal__body {
    display: grid;
    gap: 14px;
}
.decl-modal__field {
    display: grid;
    gap: 6px;
}
.decl-modal__field label {
    font-size: 13px;
    color: #334;
}
.decl-modal__field select {
    height: 38px;
    border-radius: 10px;
    border: 1px solid #d8e2f3;
    padding: 0 10px;
    background: #fff;
}
.decl-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 6px;
}
@media (max-width: 600px) {
    .decl-modal__panel {
        margin: 64px auto;
    }
}

/* Profil */

.field__item {
    min-width: 35%;
    min-height: 29.6px;
    padding: 0.25rem 1rem;
    border-radius: 1rem;
    background: #DBDBD4;
    width: fit-content;
    margin: 0.25rem 0;
}

/* Facture */

#factTable tfoot td {
    font-weight: 600;
}

#factTable tfoot .fact-total-row {
    position: sticky;
    bottom: 0;
    box-shadow: 0 15px 0 #fff;
}

#input-factureLabel {
    width: 70% !important;
    text-align: left;
}

#declarationsInvoiceEmitter {
    text-align: left;
}

.presta_name {
    color : rgb(0, 160, 223)
}
