.bs-shell {
    display:flex;
    min-height:100vh;
    padding-top:64px;
    background:#f5f7fb;
    color:#182b49
}

.bs-sidebar {
    width:250px;
    background:#182b49;
    color:#fff;
    padding:1.25rem;
    transition:width .2s
}

.bs-sidebar a {
    display:block;
    color:#fff;
    text-decoration:none;
    padding:.7rem .8rem;
    border-radius:6px
}

.bs-sidebar a:hover {
    background:#29466d
}

.bs-main {
    flex:1;
    padding:2rem;
    min-width:0
}

.bs-sidebar-toggle {
    float:right
}

.bs-topbar {
    position:fixed;
    z-index:1000;
    top:0;
    left:0;
    right:0;
    height:64px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    background:#fff;
    border-bottom:1px solid #d9e1ec;
    box-shadow:0 2px 8px #182b4914;
    padding:.8rem 1.5rem
}

.bs-brand {
    font-weight:700;
    color:#182b49;
    text-decoration:none
}

.bs-topbar-actions {
    display:flex;
    align-items:center;
    gap:1rem
}

.bs-topbar-actions a {
    color:#176b56;
    text-decoration:none;
    display:inline-flex;
    align-items:center;
    gap:.35rem
}

.bs-topbar-actions a:hover {
    color:#0d4d3d
}

.bs-topbar-icon {
    font-size:1.1rem;
    line-height:1
}

.bs-user-menu {
    font-weight:700
}

.bs-language {
    display:inline-flex;
    align-items:center;
    gap:.35rem
}

.bs-language select {
    border:1px solid #b8c7da;
    border-radius:5px;
    padding:.25rem
}

.bs-table {
    width:100%;
    border-collapse:collapse;
    background:#fff
}

.bs-table th,.bs-table td {
    padding:.75rem 1rem;
    border-bottom:1px solid #d9e1ec;
    text-align:left
}

.bs-table th {
    background:#edf2f8
}

.bs-table th button {
    all:inherit;
    cursor:pointer;
    font-weight:700
}

.bs-table th button::after {
    content:' ↕';
    color:#68809f
}

.bs-actions {
    display:flex;
    gap:.4rem;
    align-items:center
}

.bs-inline-form {
    display:inline
}

.bs-actions .icon-button {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    text-decoration:none
}

.bs-sidebar.is-collapsed {
    width:3.5rem;
    overflow:hidden
}

.bs-sidebar.is-collapsed .bs-nav-label,.bs-sidebar.is-collapsed h2 {
    display:none
}

.bs-sidebar.is-collapsed a {
    white-space:nowrap
}

.bs-toolbar {
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:1rem
}

.bs-table-wrap {
    overflow-x:auto
}

.bs-client-cards {
    display:none
}

.bs-client-card {
    background:#fff;
    border:1px solid #d9e1ec;
    border-radius:8px;
    padding:1rem;
    margin-bottom:.75rem
}

.bs-client-card dt {
    font-size:.8rem;
    color:#60748f
}

.bs-client-card dd {
    margin:0 0 .6rem
}

.bs-settings {
    max-width:900px;
    margin:0 auto
}

.bs-settings-card {
    background:#fff;
    border:1px solid #d9e1ec;
    border-radius:12px;
    padding:1.5rem;
    box-shadow:0 4px 16px #182b4910
}

.bs-form-grid {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:1rem
}

.bs-field {
    display:flex;
    flex-direction:column;
    gap:.35rem
}

.bs-field input,.bs-field select,.bs-field textarea {
    border:1px solid #b8c7da;
    border-radius:6px;
    padding:.65rem;
    font:inherit
}

.bs-section-title {
    border-bottom:1px solid #d9e1ec;
    padding-bottom:.6rem;
    margin-top:0
}

.bs-options {
    border:0;
    border-top:1px solid #d9e1ec;
    margin:1.5rem 0;
    padding:1rem 0
}

.bs-switch-row {
    display:flex;
    align-items:center;
    gap:.75rem;
    margin:.8rem 0
}

.bs-switch {
    appearance:none;
    width:46px;
    height:26px;
    border-radius:13px;
    background:#d9e1ec;
    position:relative;
    cursor:pointer
}

.bs-switch::after {
    content:'';
    position:absolute;
    width:22px;
    height:22px;
    top:2px;
    left:2px;
    border-radius:50%;
    background:#fff;
    transition:.2s
}

.bs-switch:checked {
    background:#2764e8
}

.bs-switch:checked::after {
    left:22px
}

.bs-switch-label {
    color:#176b56;
    font-weight:700
}

@media (max-width:700px) {
    .bs-sidebar {
        width:4rem;
        padding:.75rem
    }
    .bs-sidebar h2,.bs-sidebar .bs-nav-label {
        display:none
    }
    .bs-main {
        padding:1rem .75rem;
        overflow-x:hidden
    }
    .bs-topbar {
        padding:.7rem .8rem
    }
    .bs-topbar-actions {
        gap:.5rem;
        font-size:.85rem
    }
    .bs-topbar-actions>a:first-child {
        display:none
    }
    .bs-table-wrap {
        display:none
    }
    .bs-client-cards {
        display:block
    }
    .bs-toolbar h1 {
        font-size:1.7rem
    }
    .bs-form-grid {
        grid-template-columns:1fr
    }
    .bs-settings {
        margin:0
    }
}

.bs-toolbar .button {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:42px;
    padding-inline:16px;
    border:1px solid #2764e8;
    border-radius:6px;
    background:#2764e8;
    color:#fff;
    font-weight:600;
    text-decoration:none
}

.bs-actions a:first-child {
    font-size:0
}

.bs-actions a:first-child::after {
    content:'👁';
    font-size:1rem
}

.bs-actions button {
    font-size:0
}

.bs-actions button::after {
    content:'🗑';
    font-size:1rem
}

.bs-table {
    table-layout:fixed
}

.bs-table th:last-child,.bs-table td:last-child {
    width:130px
}

.bs-table {
    font-size:.92rem
}

.bs-table th:nth-child(4),.bs-table td:nth-child(4) {
    width:22%
}

.bs-table th:nth-child(5),.bs-table td:nth-child(5) {
    width:16%
}

.bs-settings-card form>.button {
    margin-top:1.25rem
}

.bs-settings-card form~a {
    display:inline-block;
    margin-top:1rem
}

.bs-table td {
    overflow-wrap:anywhere
}

.bs-table th:nth-child(1),.bs-table td:nth-child(1) {
    width:18%
}

.bs-table th:nth-child(2),.bs-table td:nth-child(2) {
    width:16%
}

.atlas-table__sort-icon {
    width:1rem;
    height:1rem;
    stroke:currentColor;
    fill:none;
    stroke-width:1.5
}

.atlas-icon-button {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:0;
    background:transparent;
    color:#2764e8;
    font-size:1.2rem;
    text-decoration:none;
    padding:.3rem;
    cursor:pointer
}

.atlas-icon-button--edit {
    color:#2764e8
}

.atlas-icon-button--delete {
    color:#d9212c
}

.bs-client-card .bs-actions {
    margin-top:1rem
}

.bs-actions a:first-child::after,.bs-actions button::after {
    content:none
}

.atlas-icon-button svg {
    width:1.25rem;
    height:1.25rem;
    fill:none;
    stroke:currentColor;
    stroke-width:1.8;
    stroke-linecap:round;
    stroke-linejoin:round
}

.bs-table th:nth-child(3),.bs-table td:nth-child(3) {
    width:15%
}

.bs-table th:nth-child(4),.bs-table td:nth-child(4) {
    width:23%
}

.bs-table th:nth-child(5),.bs-table td:nth-child(5) {
    width:16%
}

.bs-table th:last-child,.bs-table td:last-child {
    width:145px
}

.bs-actions {
    white-space:nowrap
}

.bs-inline-form {
    display:inline-flex;
    margin:0
}

.atlas-button {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:42px;
    padding:.65rem 1.1rem;
    border:1px solid transparent;
    border-radius:6px;
    font:600 1rem/1.2 inherit;
    text-decoration:none;
    cursor:pointer
}

.atlas-button--sm {
    height: 32px;
    min-height: 32px;
    padding: 0 12px;
    font-size: 0.875rem;
    border-radius: 6px;
}

.atlas-button--primary {
    background:#2764e8;
    color:#fff;
    border-color:#2764e8
}

.atlas-button--secondary {
    background:#fff;
    color:#172b4d;
    border-color:#b8c7dc
}

.atlas-button--danger {
    background:#df252b;
    color:#fff;
    border-color:#df252b
}

.bs-table th button::after {
    content:none
}

.bs-toolbar .atlas-button {
    min-height:38px;
    padding:.45rem .8rem;
    font-size:.9rem
}

.bs-settings-card form .button {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:42px;
    padding:.65rem 1.1rem;
    border:1px solid #2764e8;
    border-radius:6px;
    background:#2764e8;
    color:#fff;
    font:600 1rem/1.2 inherit;
    cursor:pointer;
    margin-top:1.25rem
}

.bs-settings-card>a {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:42px;
    padding:.65rem 1.1rem;
    border:1px solid #b8c7dc;
    border-radius:6px;
    background:#fff;
    color:#182b49;
    text-decoration:none;
    margin-top:1rem
}

.bs-settings-card dl {
    display:grid;
    grid-template-columns:minmax(9rem,12rem) 1fr;
    gap:.75rem 1.5rem;
    margin:0 0 1rem
}

.bs-settings-card dt {
    font-weight:600;
    color:#40536e
}

.bs-settings-card dd {
    margin:0;
    color:#182b49
}

.bs-settings-card>a.atlas-button {
    font:600 1rem/1.2 inherit;
    color:#172b4d;
    background:#fff;
    border-color:#b8c7dc
}

.bs-settings-card>a.atlas-button {
    box-sizing:border-box;
    min-height:62px;
    height:62px;
    padding:.75rem 1.5rem;
    margin-top:1rem;
    border-radius:8px;
    font-size:1rem;
    line-height:1.2
}

.bs-settings-card>.atlas-toolbar__end {
    display:flex;
    justify-content:flex-end;
    align-items:center;
    gap:.75rem;
    margin-top:1.25rem
}

.bs-settings-card>.atlas-toolbar__end .button,.bs-settings-card>.atlas-toolbar__end .atlas-button {
    margin-top:0
}

.bs-settings-card>.atlas-toolbar__end .atlas-button {
    height:62px;
    min-height:62px;
    box-sizing:border-box;
    padding:.75rem 1.5rem
}

.bs-settings-card>.atlas-toolbar__end .atlas-button--sm {
    height:38px;
    min-height:38px;
    padding:.45rem .8rem;
    font-size:.875rem;
    border-radius:6px
}

.quote-status {
    font-weight:600
}

.quote-status--attente {
    color:#8a5a00
}

.quote-status--approuve {
    color:#168044
}

.quote-status--rejet {
    color:#c62828
}

.quote-status--facture {
    color:#2764e8
}

.quote-status--supprime {
    color:#64748b
}

.bs-actions .atlas-icon-button svg {
    width:1.25rem;
    height:1.25rem;
    fill:none;
    stroke:currentColor;
    stroke-width:1.8;
    stroke-linecap:round;
    stroke-linejoin:round
}

.invoice-paid-icon {
    color:#168044;
    cursor:default
}

.atlas-icon-button.is-disabled {
    color:#cbd5e1!important;
    opacity:.55;
    pointer-events:none;
    cursor:not-allowed
}

.bs-table .atlas-table__sort {
    display:inline-flex!important;
    align-items:center;
    gap:.35rem;
    vertical-align:middle
}

.bs-table .atlas-table__sort-icon {
    display:block!important;
    width:1rem!important;
    height:1rem!important;
    flex:0 0 1rem
}

.atlas-modal {
    background:rgba(24,43,73,.45)!important
}

.atlas-modal__dialog {
    width:min(30rem,calc(100vw - 2rem));
    padding:1.5rem!important;
    border:1px solid #d9e1ec;
    border-radius:10px;
    background:#fff;
    box-shadow:0 12px 36px rgba(24,43,73,.25)
}

.atlas-modal__dialog h2 {
    margin:0 0 .75rem;
    font-size:1.35rem;
    line-height:1.25;
    color:#182b49
}

.atlas-modal__dialog p {
    margin:0;
    color:#40536e;
    font-size:1rem
}

.atlas-modal__actions {
    display:flex;
    justify-content:flex-end;
    gap:.75rem;
    margin-top:1.5rem
}

.atlas-modal__actions .atlas-button {
    min-height:38px;
    padding:.5rem .9rem
}

.bs-quote-details {
    margin-top:2rem;
    border-top:1px solid #d5deea;
    padding-top:1.25rem
}

.bs-quote-details h2 {
    font-size:1.35rem;
    margin:0 0 1rem;
    color:#172e52
}

.bs-quote-line {
    display:grid;
    grid-template-columns:minmax(0,1fr) 2.25rem;
    gap:.85rem 1rem;
    align-items:end;
    margin-bottom:1.25rem;
    padding:1rem;
    border:1px solid #d5deea;
    border-radius:10px;
    background:#fff
}

.bs-quote-line__description {
    grid-column:1 / -1
}

.bs-quote-line__description textarea {
    min-height:68px
}

.bs-quote-line__numbers {
    display:grid;
    grid-template-columns:repeat(7,minmax(0,1fr));
    gap:.75rem;
    align-items:end
}

.bs-quote-line[data-vat-enabled="0"] .bs-quote-line__numbers {
    grid-template-columns:repeat(5,minmax(0,1fr))
}

.bs-quote-line__numbers .bs-field {
    min-width:0;
    margin:0
}

.bs-quote-line__numbers input,
.bs-quote-line__numbers select {
    width:100%;
    min-height:42px;
    box-sizing:border-box
}

.bs-quote-line .remove-quote-line {
    align-self:end;
    margin-bottom:.35rem;
    width:2rem;
    height:2rem
}

@media (max-width:900px) {
    .bs-quote-line__numbers,
    .bs-quote-line[data-vat-enabled="0"] .bs-quote-line__numbers {
        grid-template-columns:repeat(2,minmax(0,1fr))
    }
}

@media (max-width:700px) {
    .bs-quote-line {
        grid-template-columns:minmax(0,1fr) 2.25rem
    }
    .bs-quote-line__numbers {
        grid-template-columns:1fr !important
    }
}

.bs-settings-card>.atlas-toolbar__end .atlas-button {
    width:160px;
    height:42px;
    min-height:42px;
    padding:.55rem .8rem
}

.bs-table {
    table-layout:fixed;
    min-width:1100px
}

.bs-table th:nth-child(1),.bs-table td:nth-child(1) {
    width:19%
}

.bs-table th:nth-child(2),.bs-table td:nth-child(2) {
    width:14%
}

.bs-table th:nth-child(3),.bs-table td:nth-child(3) {
    width:16%
}

.bs-table th:nth-child(4),.bs-table td:nth-child(4) {
    width:15%
}

.bs-table th:nth-child(5),.bs-table td:nth-child(5) {
    width:15%
}

.bs-table th:nth-child(6),.bs-table td:nth-child(6) {
    width:11%
}

.bs-table th:nth-child(7),.bs-table td:nth-child(7) {
    width:190px
}

.bs-table .bs-actions {
    white-space:nowrap;
    overflow:visible
}

.bs-table .atlas-icon-button svg {
    width:1.25rem;
    height:1.25rem;
    fill:none;
    stroke:currentColor;
    stroke-width:1.8;
    stroke-linecap:round;
    stroke-linejoin:round
}

.bs-quote-search {
    max-width:34rem;
    margin:0 0 1.25rem
}

.bs-quote-search input {
    width:100%;
    box-sizing:border-box
}

.bs-quote-cards {
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
    gap:1rem
}

.bs-quote-card[hidden] {
    display:none !important
}

.bs-quote-card {
    background:#fff;
    border:1px solid #d9e1ec;
    border-radius:10px;
    padding:1.1rem;
    box-shadow:0 3px 12px #182b4912
}

.bs-quote-card__header {
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:1rem;
    border-bottom:1px solid #e2e8f0;
    padding-bottom:.8rem
}

.bs-quote-card h2 {
    margin:0;
    color:#182b49;
    font-size:1.1rem
}

.bs-quote-card p {
    margin:.25rem 0 0;
    color:#52657f
}

.bs-quote-card__details {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:.75rem;
    margin:1rem 0
}

.bs-quote-card__details div {
    min-width:0
}

.bs-quote-card__details dt {
    font-size:.78rem;
    color:#60748f
}

.bs-quote-card__details dd {
    margin:.2rem 0 0;
    color:#182b49;
    font-weight:600
}

.bs-quote-card .bs-actions {
    justify-content:flex-end
}

.bs-quote-table-fallback {
    display:none
}

.bs-quote-card .bs-actions a:first-child {
    font-size:1rem
}

.bs-quote-card .bs-actions .atlas-icon-button {
    width:2rem;
    height:2rem
}

.bs-filter-field {
    display:flex;
    flex-direction:column;
    gap:.35rem
}

.bs-filter-field>label {
    font-size:.85rem;
    color:#40536e
}

.bs-filter-range input {
    width:9rem;
    box-sizing:border-box
}

.bs-quote-search {
    align-items:flex-end
}

.atlas-field__input {
    width:9rem;
    box-sizing:border-box;
    border:1px solid #b8c7da;
    border-radius:6px;
    background:#fff;
    color:#182b49;
    padding:.65rem .75rem;
    font:inherit;
    line-height:1.2
}

.atlas-field__input:focus {
    outline:2px solid #2764e8;
    outline-offset:1px
}

.atlas-field>label {
    font-size:.85rem;
    color:#40536e
}

.atlas-button:disabled {
    opacity:.55;
    cursor:not-allowed;
    filter:grayscale(.15)
}

.atlas-button.atlas-button--primary:disabled {
    background:#f1f4f8;
    border-color:#dce4ee;
    color:#9aaac0;
    opacity:1;
    box-shadow:none
}

.bs-toolbar .atlas-button.atlas-button--sm {
    min-height:38px;
    height:38px;
    padding:.45rem .8rem;
    font-size:.875rem
}

.bs-settings-card>.atlas-toolbar__end .atlas-button.atlas-button--sm {
    width:auto!important;
    height:38px!important;
    min-height:38px!important;
    padding:.45rem .8rem!important;
    font-size:.875rem!important;
    border-radius:6px!important
}

.bs-settings-card>.atlas-toolbar__end .atlas-button.atlas-button--sm {
    display:inline-flex!important;
    flex:0 0 auto!important;
    max-width:max-content!important;
    box-sizing:border-box!important
}

.bs-settings-card>.atlas-toolbar__end .atlas-button.atlas-button--sm {
    width:140px!important
}

.quote-form-actions {
    align-items:center
}

.quote-form-actions>a.atlas-button.atlas-button--sm,.quote-form-actions>button.atlas-button.atlas-button--sm {
    width:140px!important;
    height:38px!important;
    min-height:38px!important;
    max-height:38px!important;
    box-sizing:border-box!important;
    margin:0!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important
}

.bs-quote-details .atlas-button.atlas-button--sm {
    height:38px;
    min-height:38px;
    padding:.45rem .8rem;
    font-size:.875rem
}

.bs-quote-details .atlas-button.atlas-button--sm {
    margin-top:.5rem
}

.quote-form-actions {
    margin-top:1.25rem!important
}

.invoice-total ~ .quote-form-actions {
    display:flex!important;
    align-items:center!important;
    flex-wrap:wrap!important;
    gap:.75rem!important
}

.invoice-total ~ .quote-form-actions > a.atlas-button, .invoice-total ~ .quote-form-actions > form {
    flex:0 0 auto!important;
    margin:0!important
}

.invoice-total ~ .quote-form-actions > form {
    display:inline-flex!important;
    align-items:center!important
}

.invoice-total ~ .quote-form-actions > form > button.atlas-button {
    margin:0!important
}

.invoice-total ~ .quote-form-actions > a:nth-of-type(2) {
    background:#2764e8!important;
    border-color:#2764e8!important;
    color:#fff!important
}

.invoice-total ~ .quote-form-actions > form:nth-of-type(1) > button.atlas-button {
    background:#c97712!important;
    border-color:#c97712!important;
    color:#fff!important
}

.invoice-total ~ .quote-form-actions > form:nth-of-type(2) > button.atlas-button {
    background:#168044!important;
    border-color:#168044!important;
    color:#fff!important
}

.invoice-confirm-modal {
    position:fixed!important;
    inset:0!important;
    z-index:100000!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    padding:1rem!important;
    background:rgba(24,43,73,.45)!important
}

.invoice-confirm-modal .atlas-modal__dialog {
    margin:auto!important
}

.invoice-refund-card {
    max-width:760px
}

.invoice-refund-card form {
    display:grid;
    gap:1.25rem
}

.invoice-refund-card .bs-field {
    display:grid;
    gap:.5rem
}

.invoice-refund-card textarea {
    box-sizing:border-box;
    width:100%;
    resize:vertical
}

.invoice-refund-card .quote-form-actions {
    display:flex;
    gap:.75rem;
    align-items:center;
    justify-content:flex-end
}

.invoice-refund-info-modal {
    position:fixed!important;
    inset:0!important;
    z-index:100000!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    padding:1rem!important;
    background:rgba(24,43,73,.45)!important
}

.invoice-refund-info-modal .atlas-modal__dialog {
    margin:auto!important
}

.invoice-refund-info-modal p {
    line-height:1.55;
    margin:.8rem 0;
    color:#40536e
}

.bs-refund-info {
    color:#2764e8!important
}

.bs-invoice-cards {
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
    gap:1rem
}

.bs-invoice-cards+.bs-table-wrap {
    display:none
}

.bs-invoice-card {
    background:#fff;
    border:1px solid #d9e1ec;
    border-radius:10px;
    padding:1.1rem;
    box-shadow:0 3px 12px #182b4912
}

.bs-invoice-card__header {
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:1rem;
    border-bottom:1px solid #e2e8f0;
    padding-bottom:.8rem
}

.bs-invoice-card h2 {
    margin:0;
    color:#182b49;
    font-size:1.1rem
}

.bs-invoice-card p {
    margin:.25rem 0 0;
    color:#52657f
}

.bs-invoice-card dl {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:.75rem;
    margin:1rem 0
}

.bs-invoice-card dt {
    font-size:.78rem;
    color:#60748f
}

.bs-invoice-card dd {
    margin:.2rem 0 0;
    color:#182b49;
    font-weight:600
}

.bs-invoice-card .bs-actions {
    justify-content:flex-end
}

/* Navigation fixe et en-tête compact */
.bs-shell {
    padding-top:52px
}

.bs-topbar {
    height:52px;
    padding:.45rem 1.25rem
}

.bs-sidebar {
    position:fixed;
    top:52px;
    bottom:0;
    left:0;
    height:calc(100vh - 52px);
    overflow-y:auto;
    overflow-x:hidden
}

.bs-main {
    margin-left:250px
}

@media (max-width:700px) {
    .bs-sidebar {
        top:52px;
        height:calc(100vh - 52px)
    }
    .bs-main {
        margin-left:4rem
    }
}

.payment-term-form {
    grid-template-columns:7rem minmax(0,1fr)
}

.payment-terms-table th:first-child,.payment-terms-table td:first-child {
    width:4rem
}

.payment-terms-table th:last-child,.payment-terms-table td:last-child {
    width:auto
}

.bs-main {
    padding-left:2.5rem;
    padding-right:2.5rem
}

.payment-term-form input[readonly] {
    background:#eef1f5;
    color:#64748b;
    cursor:not-allowed
}

.payment-term-form+.atlas-button {
    margin-top:1rem
}

.payment-terms-table {
    width:100%;
    min-width:0!important;
    table-layout:fixed
}

.payment-terms-table th:first-child,.payment-terms-table td:first-child {
    width:5rem
}

.payment-terms-table th:nth-child(2),.payment-terms-table td:nth-child(2) {
    width:auto;
    white-space:normal;
    overflow-wrap:break-word;
    word-break:normal
}

.payment-terms-table th:last-child,.payment-terms-table td:last-child {
    width:7rem;
    white-space:nowrap
}

.payment-terms-table-wrap {
    overflow-x:hidden
}

.currency-form {
    grid-template-columns:minmax(0,1.4fr) minmax(8rem,.7fr)
}

.currency-form+.atlas-button {
    margin-top:1rem
}

.currency-table {
    width:100%;
    min-width:0!important;
    table-layout:fixed
}

.currency-table th:first-child,.currency-table td:first-child {
    width:48%
}

.currency-table th:nth-child(2),.currency-table td:nth-child(2) {
    width:18%
}

.currency-table th:last-child,.currency-table td:last-child {
    width:34%
}

.stats-converter {
    display:grid;
    grid-template-columns:1fr 1fr auto;
    gap:1rem;
    align-items:end;
    margin-bottom:2rem
}

.stats-table {
    min-width:0!important;
    table-layout:fixed
}

.stats-table th,.stats-table td {
    overflow-wrap:anywhere
}

.stats-subtotal {
    font-weight:700;
    background:#edf2f8
}

.bs-table input {
    box-sizing:border-box;
    width:100%;
    min-height:38px;
    padding:.55rem .7rem;
    border:1px solid #b8c7da;
    border-radius:6px;
    background:#fff;
    color:#182b49;
    font:inherit;
    transition:border-color .15s,box-shadow .15s
}

.bs-table input:focus {
    outline:0;
    border-color:#2764e8;
    box-shadow:0 0 0 3px rgba(39,100,232,.15)
}

@media(max-width:700px) {
    .stats-converter {
        grid-template-columns:1fr
    }
}

.exchange-rates-card {
    padding-top:2.5rem
}

.exchange-rates-card form {
    display:flex;
    flex-direction:column;
    gap:1.25rem
}

.exchange-rates-card .quote-form-actions {
    order:-1;
    margin-bottom:.5rem
}

.exchange-rates-table {
    margin-top:.5rem
}

.exchange-rates-table .exchange-rate-input {
    box-sizing:border-box;
    width:100%;
    min-height:38px;
    padding:.55rem .7rem;
    border:1px solid #b8c7da;
    border-radius:6px;
    background:#fff;
    color:#182b49;
    font:inherit;
    box-shadow:inset 0 1px 2px rgba(24,43,73,.06)
}

.exchange-rates-table .exchange-rate-input:focus {
    outline:0;
    border-color:#2764e8;
    box-shadow:0 0 0 3px rgba(39,100,232,.15)
}

.stats-converter .stats-source-currency {
    grid-column:1;
    grid-row:2
}

.stats-converter label:nth-of-type(4) {
    grid-column:2;
    grid-row:2
}

.stats-converter>button {
    grid-column:3;
    grid-row:2
}

.stats-converter>button:last-of-type {
    grid-row:3
}

@media(max-width:700px) {
    .stats-converter .stats-source-currency,.stats-converter label:nth-of-type(4),.stats-converter>button {
        grid-column:auto;
        grid-row:auto
    }
    .stats-converter>button:last-of-type {
        grid-row:auto
    }
}

.exchange-rates-table .exchange-rate-input {
    appearance:none!important;
    -webkit-appearance:none!important;
    box-sizing:border-box!important;
    width:100%!important;
    min-height:42px!important;
    padding:.65rem .8rem!important;
    border:1px solid #b8c7da!important;
    border-radius:6px!important;
    background:#fff!important;
    color:#182b49!important;
    font:inherit!important;
    line-height:1.2!important;
    box-shadow:none!important
}

.exchange-rates-table .exchange-rate-input:focus {
    outline:0!important;
    border-color:#2764e8!important;
    box-shadow:0 0 0 3px rgba(39,100,232,.15)!important
}

.exchange-rates-card {
    padding-top:3rem!important
}

.exchange-rates-card .quote-form-actions {
    margin-bottom:1rem!important
}

.bs-about-trigger {
    display:block;
    width:100%;
    margin-top:1rem;
    padding:.7rem .8rem;
    border:0;
    border-radius:6px;
    background:transparent;
    color:#fff;
    text-align:left;
    font:inherit;
    cursor:pointer
}

.bs-about-trigger:hover {
    background:#29466d
}

.bs-about-modal {
    display:flex;
    align-items:center;
    justify-content:center
}

.bs-about-modal[hidden] {
    display:none
}

.bs-about-dialog {
    position:relative;
    width:min(680px,calc(100vw - 2rem));
    padding:2rem!important;
    border-radius:14px!important
}

.bs-about-close {
    position:absolute;
    top:.7rem;
    right:.9rem;
    border:0;
    background:transparent;
    color:#60748f;
    font-size:1.7rem;
    line-height:1;
    cursor:pointer
}

.bs-about-brand {
    display:flex;
    align-items:center;
    gap:.9rem;
    border-bottom:1px solid #d9e1ec;
    padding-bottom:1rem
}

.bs-about-mark {
    display:grid;
    place-items:center;
    width:48px;
    height:48px;
    border-radius:12px;
    background:#2764e8;
    color:#fff;
    font-size:1.6rem;
    font-weight:800
}

.bs-about-brand h2 {
    margin:0;
    color:#182b49
}

.bs-about-brand p {
    margin:.2rem 0 0;
    color:#60748f
}

.bs-about-version {
    display:flex;
    align-items:center;
    gap:.7rem;
    margin:1.25rem 0
}

.bs-about-version span {
    padding:.3rem .55rem;
    border-radius:5px;
    background:#176b56;
    color:#fff;
    font-weight:800
}

.bs-about-version small {
    margin-left:auto;
    color:#60748f
}

.bs-about-description {
    color:#40536e;
    line-height:1.6
}

.bs-about-features {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:.65rem;
    margin:1.25rem 0;
    color:#182b49
}

.bs-about-footer {
    display:flex;
    align-items:center;
    justify-content:space-between;
    border-top:1px solid #d9e1ec;
    padding-top:1rem;
    color:#60748f;
    font-size:.9rem
}

.bs-topbar-user-name {
    position:absolute;
    left:50%;
    transform:translateX(-50%);
    font-weight:700;
    color:#182b49;
    white-space:nowrap
}

.bs-auth-page {
    min-height:100vh;
    display:grid;
    place-items:center;
    background:#f5f7fb
}

.bs-auth-card {
    width:min(420px,calc(100vw - 2rem));
    padding:2rem;
    background:#fff;
    border:1px solid #d9e1ec;
    border-radius:14px;
    box-shadow:0 8px 28px rgba(24,43,73,.12)
}

.bs-auth-card .bs-about-mark {
    margin:0 auto 1rem
}

.bs-auth-card h1 {
    text-align:center;
    color:#182b49
}

.bs-auth-subtitle {
    text-align:center;
    color:#60748f
}

.bs-auth-form {
    display:grid;
    gap:1rem
}

.bs-auth-form .atlas-button {
    width:100%
}

.bs-auth-forgot {
    text-align:center;
    color:#2764e8;
    text-decoration:none
}

.bs-auth-error {
    padding:.7rem;
    border-radius:6px;
    background:#fde8e8;
    color:#a61b1b
}

.bs-auth-success {
    padding:.7rem;
    border-radius:6px;
    background:#e8f7ef;
    color:#176b56;
    line-height:1.45
}

.bs-about-modal {
    position:fixed!important;
    inset:0!important;
    z-index:3000!important;
    width:100vw!important;
    height:100vh!important
}

.bs-about-modal .bs-about-dialog {
    z-index:3001!important;
    display:block!important;
    visibility:visible!important;
    opacity:1!important
}

.bs-about-modal[hidden] {
    display:none!important
}

.bs-about-modal:not([hidden]) {
    display:flex!important;
    position:fixed!important;
    inset:0!important;
    z-index:99999!important
}

.bs-about-dialog {
    margin:auto!important;
    visibility:visible!important;
    opacity:1!important
}

.bs-admin-context label {
    display:flex;
    align-items:center;
    gap:.35rem;
    color:#40536e;
    font-size:.85rem
}

.bs-admin-context select {
    border:1px solid #b8c7da;
    border-radius:6px;
    padding:.35rem .5rem;
    background:#fff;
    color:#182b49
}

/* La navigation de compte reste toujours dans la zone droite de la barre. */
.bs-topbar {
    display:grid!important;
    grid-template-columns:auto minmax(0,1fr) auto!important;
    column-gap:1.25rem
}

.bs-topbar-identity {
    grid-column:2;
    justify-self:center;
    align-self:center;
    display:flex;
    align-items:baseline;
    justify-content:center;
    gap:.3em;
    min-width:0;
    max-width:100%;
    position:relative;
    z-index:2;
    color:#274e84;
    font-size:clamp(.9rem,2.1vw,1.45rem);
    line-height:1.15;
    white-space:normal;
    text-align:center
}

.bs-topbar-identity strong {
    font-weight:700
}

.bs-topbar-identity span {
    font-size:.82em;
    font-weight:500
}

.bs-topbar-actions {
    grid-column:3;
    justify-self:end;
    margin-left:auto;
    white-space:nowrap
}

.bs-topbar-user-name {
    position:static!important;
    left:auto!important;
    transform:none!important;
    grid-column:2;
    justify-self:center;
    align-self:center;
    min-width:0;
    max-width:100%;
    overflow:visible;
    text-align:center;
    font-size:clamp(.9rem,2.1vw,1.45rem);
    font-weight:700;
    color:#274e84;
    white-space:normal;
    line-height:1.1
}

.bs-topbar>.bs-admin-context {
    grid-column:1;
    min-width:0
}

@media(max-width:700px) {
    .bs-topbar {
        column-gap:.5rem;
        padding-left:.65rem;
        padding-right:.65rem
    }
    .bs-topbar-identity {
        font-size:clamp(.72rem,2.8vw,.95rem);
        gap:.2em
    }
    .bs-topbar-actions {
        gap:.45rem;
        font-size:.85rem
    }
    .bs-admin-context label {
        font-size:.72rem
    }
    .bs-admin-context select {
        max-width:9rem
    }
}

@media(max-width:700px) {
    .bs-topbar-actions>a:first-child {
        display:inline-flex
    }
}

.reminder-type-modal {
    position:fixed;
    inset:0;
    z-index:100000;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:1rem;
    background:rgba(24,43,73,.45)
}

.reminder-type-modal[hidden] {
    display:none
}

.reminder-type-dialog {
    position:relative;
    width:min(520px,100%);
    padding:2rem;
    background:#fff;
    border-radius:14px;
    box-shadow:0 20px 60px rgba(24,43,73,.25)
}

.reminder-type-dialog h2 {
    margin-top:0;
    color:#182b49
}

.reminder-type-dialog p {
    color:#60748f
}

.reminder-type-close {
    position:absolute;
    top:.65rem;
    right:.85rem;
    border:0;
    background:transparent;
    color:#60748f;
    font-size:1.7rem;
    cursor:pointer
}

.reminder-type-options {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:.75rem;
    margin-top:1.25rem
}

.reminder-type-options button {
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    gap:.25rem;
    padding:1rem;
    border:1px solid #d6e0ee;
    border-radius:10px;
    background:#f7f9fc;
    color:#182b49;
    text-align:left;
    cursor:pointer;
    font:inherit
}

.reminder-type-options button:hover {
    border-color:#2764e8;
    background:#eef4ff
}

.reminder-type-options button.is-suggested {
    border-color:#2764e8;
    background:#eef4ff;
    box-shadow:0 0 0 2px rgba(39,100,232,.12)
}

.reminder-type-options strong {
    color:#2764e8
}

.reminder-type-options span {
    font-size:.9rem;
    color:#60748f
}

.reminder-type-help {
    margin-bottom:0;
    font-size:.9rem
}

@media(max-width:520px) {
    .reminder-type-options {
        grid-template-columns:1fr
    }
}

.quote-form-actions {
    display:flex;
    flex-wrap:wrap;
    gap:.75rem;
    align-items:center
}

.quote-form-actions>a.atlas-button.atlas-button--sm,.quote-form-actions>button.atlas-button.atlas-button--sm {
    flex:0 1 auto;
    width:auto!important;
    min-width:140px
}

.client-form-actions {
    justify-content:flex-start;
    margin-top:1.25rem!important;
    align-items:stretch!important
}

.client-form-actions .atlas-button {
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    box-sizing:border-box!important;
    min-width:140px!important;
    height:38px!important;
    min-height:38px!important;
    margin:0!important;
    line-height:1.2!important;
    text-decoration:none!important
}

.bs-template-list {
    display:grid;
    gap:.75rem;
    margin-top:1.25rem
}

.bs-template-row {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:1rem;
    padding:1rem 1.15rem;
    border:1px solid #d6e0ee;
    border-radius:10px;
    background:#f7f9fc
}

.bs-template-row>div {
    display:grid;
    gap:.25rem
}

.bs-template-row strong {
    color:#2764e8
}

.bs-template-row span {
    font-weight:700;
    color:#182b49
}

.bs-template-row small {
    color:#60748f
}

.bs-template-row .atlas-icon-button {
    flex:none
}

.quote-form-actions>a.atlas-button.atlas-button--sm,.quote-form-actions>button.atlas-button.atlas-button--sm {
    flex:0 1 auto;
    min-width:140px
}

/* Inscription : mêmes contrôles et actions que les formulaires Atlas. */
.bs-auth-form .bs-field {
    gap:.45rem
}

.bs-auth-form .bs-field>span {
    font-size:.875rem;
    font-weight:600;
    color:#40536e
}

.bs-auth-form .atlas-field__input {
    width:100%;
    min-height:var(--atlas-input-height,42px);
    box-sizing:border-box;
    margin:0;
    border:1px solid var(--atlas-input-border,#b8c7da);
    border-radius:var(--atlas-input-radius,6px);
    background:var(--atlas-input-background,#fff);
    color:var(--atlas-input-text,#182b49);
    padding:.65rem .75rem;
    font:inherit;
    line-height:1.2
}

.bs-auth-form .atlas-field__input:focus {
    outline:2px solid #2764e8;
    outline-offset:1px
}

.bs-auth-form .atlas-button {
    margin-top:.35rem
}

.bs-auth-form>a.atlas-button--secondary {
    width:100%;
    box-sizing:border-box
}

.bs-logo-preview-label {
    display:block;
    margin-top:12px;
    font-size:.9rem;
    color:var(--atlas-color-text-muted,#64748b)
}

.bs-logo-preview {
    display:block;
    max-width:220px;
    max-height:90px;
    object-fit:contain;
    margin-top:8px;
    padding:10px;
    background:#fff;
    border:1px solid #d6e0ee;
    border-radius:12px;
    box-shadow:0 2px 8px rgba(24,48,82,.08)
}

/* Import du logo : composant Atlas */
.bs-settings .bs-field:has(input[type="file"]) {
    margin-top:1.5rem;
    padding:1rem 1.1rem;
    background:#f7f9fc;
    border:1px solid #d6e0ee;
    border-radius:12px;
    gap:.65rem
}

.bs-settings input[type="file"].atlas-field__input {
    min-height:46px;
    padding:.35rem .45rem;
    background:#fff;
    border:1px solid #b8c7da;
    border-radius:8px;
    color:#40536e
}

.bs-settings input[type="file"]::file-selector-button {
    margin-right:.75rem;
    padding:.55rem .85rem;
    border:0;
    border-radius:6px;
    background:#2764e8;
    color:#fff;
    font:600 .9rem inherit;
    cursor:pointer
}

.bs-settings input[type="file"]::file-selector-button:hover {
    background:#1f54c5
}

.bs-logo-preview-label {
    margin-top:.35rem;
    font-weight:600;
    color:#40536e
}

.bs-logo-preview {
    max-width:240px;
    max-height:110px;
    margin-top:.15rem;
    border-radius:10px
}

.bs-mail-modal {
    position:fixed!important;
    inset:0!important;
    z-index:100000!important;
    display:flex!important;
    align-items:center;
    justify-content:center;
    background:rgba(24,43,73,.45)
}

.bs-mail-modal[hidden] {
    display:none!important
}

.bs-mail-dialog {
    width:min(860px,calc(100vw - 2rem));
    max-height:calc(100vh - 2rem);
    overflow:auto;
    padding:2rem!important;
    border-radius:14px!important;
    background:#fff;
    box-shadow:0 20px 60px rgba(24,43,73,.24)
}

.bs-mail-dialog h2 {
    margin:0 0 1.25rem;
    color:#182b49
}

.bs-mail-dialog .bs-field {
    display:grid;
    gap:.4rem;
    margin-bottom:1rem
}

.bs-mail-dialog textarea {
    width:100%;
    min-height:260px;
    box-sizing:border-box;
    resize:vertical;
    line-height:1.45
}

.bs-mail-dialog .atlas-modal__actions {
    display:flex;
    justify-content:flex-end;
    gap:.75rem;
    margin-top:1.25rem;
    flex-wrap:wrap
}

.reminder-type-trigger--missing {
    color:#d9212c!important
}

.reminder-type-trigger--missing svg {
    stroke:#d9212c!important
}

@media(max-width:640px) {
    .bs-mail-dialog {
        width:calc(100vw - 1rem);
        padding:1.25rem!important
    }
    .bs-mail-dialog textarea {
        min-height:220px
    }
}

.bs-client-search {
    margin:0 0 1.5rem;
    display:flex;
    align-items:center;
    gap:.75rem;
    flex-wrap:wrap
}

.bs-client-search .atlas-search {
    max-width:620px;
    width:100%;
    flex:1 1 360px
}

.bs-client-filter {
    display:flex;
    align-items:center;
    flex:0 1 240px;
    min-width:220px
}

.bs-client-filter .atlas-field__input {
    width:100%;
    min-height:42px;
    box-sizing:border-box
}

.sr-only {
    position:absolute;
    width:1px;
    height:1px;
    padding:0;
    margin:-1px;
    overflow:hidden;
    clip:rect(0,0,0,0);
    white-space:nowrap;
    border:0
}

.bs-client-cards {
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
    gap:1rem;
    margin-top:1.25rem
}

.bs-client-card {
    padding:1.25rem;
    background:#fff;
    border:1px solid #d6e0ee;
    border-radius:14px;
    box-shadow:0 5px 16px rgba(24,43,73,.08)
}


.bs-client-card dl {
    display:grid;
    grid-template-columns:auto 1fr;
    gap:.5rem .9rem;
    margin:0 0 1rem
}

.bs-client-card dt {
    font-size:.8rem;
    font-weight:700;
    color:#60748f
}

.bs-client-card dd {
    margin:0;
    color:#182b49;
    overflow-wrap:anywhere
}

.bs-client-card .bs-actions {
    justify-content:flex-end
}

.bs-client-card[hidden],.bs-table tbody tr[hidden] {
    display:none
}

@media(max-width:700px) {
    .bs-table-wrap {
        display:none
    }
    .bs-client-cards {
        grid-template-columns:1fr
    }
}

@media(min-width:701px) {
    .bs-client-cards {
        display:none
    }
}

/* Cadrage du sélecteur de fichier logo */
.bs-settings .bs-field:has(input[type="file"]) {
    overflow:hidden
}

.bs-settings input[type="file"].atlas-field__input {
    display:block;
    width:100%;
    max-width:100%;
    box-sizing:border-box;
    overflow:hidden
}

.bs-settings input[type="file"]::file-selector-button {
    box-sizing:border-box;
    max-width:calc(100% - .5rem);
    white-space:nowrap
}

/* Les clients utilisent les Cards sur toutes les tailles d’écran. */
.bs-main:has(.bs-client-cards) .bs-table-wrap {
    display:none
}

.bs-main:has(.bs-client-cards) .bs-client-cards {
    display:grid
}

.bs-client-warning {
    position:fixed!important;
    inset:0!important;
    z-index:100000!important;
    display:flex!important;
    align-items:center;
    justify-content:center;
    background:rgba(24,43,73,.45)
}

.bs-client-warning[hidden] {
    display:none!important
}

.bs-client-warning .atlas-modal__dialog {
    width:min(460px,calc(100vw - 2rem));
    padding:1.5rem;
    border-radius:14px;
    background:#fff
}

.bs-client-warning h2 {
    color:#182b49
}

.bs-client-warning .atlas-modal__actions {
    display:flex;
    justify-content:flex-end;
    margin-top:1.25rem
}

.atlas-phone-field {
    position:relative;
    display:flex;
    align-items:stretch;
    max-width:28rem
}

.atlas-phone-field>[data-phone-country-trigger] {
    display:flex;
    align-items:center;
    gap:.5rem;
    border-top-right-radius:0;
    border-bottom-right-radius:0;
    white-space:nowrap
}

.atlas-phone-field>[data-phone-national-number] {
    border-top-left-radius:0;
    border-bottom-left-radius:0;
    min-width:0
}

.atlas-phone-field__panel {
    position:absolute;
    top:calc(100% + .35rem);
    left:0;
    z-index:20;
    width:min(24rem,calc(100vw - 3rem));
    padding:.5rem;
    background:#fff;
    border:1px solid #d6e0ee;
    border-radius:12px;
    box-shadow:0 12px 30px rgba(24,43,73,.18)
}

.atlas-phone-field__panel[hidden] {
    display:none
}

.atlas-phone-field__panel .atlas-combobox {
    width:100%
}

.atlas-phone-field__panel .atlas-combobox__option {
    display:flex;
    align-items:center;
    gap:.65rem
}

.atlas-phone-field__panel img {
    display:block;
    object-fit:cover;
    flex:none
}

.bs-client-card .bs-client-phone-label {
    display:none
}

.bs-client-phone {
    grid-column:1/-1;
    display:flex!important;
    flex-wrap:wrap;
    align-items:center;
    gap:.55rem .75rem
}

.bs-client-phone__label {
    flex-basis:100%;
    font-size:.8rem;
    font-weight:700;
    color:#60748f
}

.bs-client-phone__value {
    display:inline-flex;
    align-items:center;
    gap:.5rem
}

.bs-client-phone__value img {
    display:block;
    flex:none;
    object-fit:cover
}

.bs-client-phone__actions {
    display:inline-flex;
    align-items:center;
    gap:.35rem;
    flex:none
}

.bs-phone-action,.bs-whatsapp-action {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:2rem;
    height:2rem;
    border-radius:50%;
    text-decoration:none
}

.bs-phone-action {
    color:#2764e8;
    background:#eef4ff
}

.bs-whatsapp-action {
    color:#fff;
    background:#25d366
}

.bs-phone-action svg,.bs-whatsapp-action svg {
    width:1.05rem;
    height:1.05rem;
    fill:none;
    stroke:currentColor;
    stroke-width:1.8;
    stroke-linecap:round;
    stroke-linejoin:round
}

.bs-phone-action:hover,.bs-whatsapp-action:hover {
    filter:brightness(.92)
}

/* Keep generic quote/invoice email fields usable on desktop and mobile. */
.bs-mail-dialog .bs-field input {
    width:100%;
    box-sizing:border-box;
    min-width:0
}

.bs-mail-dialog {
    position:relative
}

.bs-settings-card form > .atlas-button {
    margin-top:1rem
}

.bs-settings-card form {
    display:grid;
    gap:1.15rem
}

.bs-language-list {
    display:grid;
    gap:.75rem;
    margin-top:1.5rem
}

.bs-language-row {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:1rem;
    padding:1rem 1.1rem;
    border:1px solid #d6e0ee;
    border-radius:12px;
    background:#f7f9fc
}

.bs-language-row>div {
    display:flex;
    align-items:baseline;
    gap:.75rem
}

.bs-language-row strong {
    color:#182b49
}

.bs-language-row small {
    color:#60748f;
    font-size:.8rem;
    font-weight:700
}

.bs-language-row form {
    display:block;
    margin:0
}

.bs-language-protected {
    color:#60748f;
    font-size:.9rem
}

.bs-language-row .atlas-icon-button--delete {
    color:#d9212c
}

.bs-language-delete-modal {
    position:fixed!important;
    inset:0!important;
    z-index:100000!important;
    display:flex!important;
    align-items:center;
    justify-content:center;
    background:rgba(24,43,73,.45)
}

.bs-language-delete-modal[hidden] {
    display:none!important
}

.bs-language-delete-modal .atlas-modal__dialog {
    position:relative;
    width:min(560px,calc(100vw - 2rem));
    padding:1.75rem;
    border-radius:14px;
    background:#fff;
    box-shadow:0 20px 60px rgba(24,43,73,.24)
}

.bs-language-delete-modal h2 {
    margin:0 0 1rem;
    color:#182b49
}

.bs-language-delete-modal p {
    color:#40536e
}

.bs-language-delete-modal .atlas-modal__actions {
    display:flex;
    justify-content:flex-end;
    gap:.75rem;
    margin-top:1.5rem
}

.bs-settings-card form .bs-field {
    display:grid;
    gap:.5rem;
    margin:0
}

.bs-settings-card form .bs-field>span {
    line-height:1.35
}

.bs-settings-card form .bs-check {
    display:flex;
    align-items:center;
    gap:.55rem;
    margin:.15rem 0
}

.bs-settings-card form .bs-options {
    display:grid;
    gap:.8rem;
    margin:.25rem 0;
    padding:1rem 1.15rem;
    border:1px solid #d6e0ee;
    border-radius:10px
}

.bs-settings-card form .bs-options .bs-field {
    margin:0
}

.bs-settings-card form .bs-check input {
    appearance:none;
    width:46px;
    height:26px;
    margin:0;
    border:0;
    border-radius:13px;
    background:#d9e1ec;
    position:relative;
    cursor:pointer;
    flex:none
}

.bs-settings-card form .bs-check input::after {
    content:'';
    position:absolute;
    width:22px;
    height:22px;
    top:2px;
    left:2px;
    border-radius:50%;
    background:#fff;
    transition:.2s
}

.bs-settings-card form .bs-check input:checked {
    background:#2764e8
}

.bs-settings-card form .bs-check input:checked::after {
    left:22px
}

.bs-settings-card form label:has(input[name="bank_branch"]) {
    border:1px solid #d6e0ee;
    border-bottom:0;
    border-radius:10px 10px 0 0;
    padding:1.1rem 1.15rem .35rem;
    position:relative;
    margin-top:.25rem
}

.bs-settings-card form label:has(input[name="bank_branch"])::before {
    content:'Informations bancaires';
    position:absolute;
    top:-.72rem;
    left:.8rem;
    padding:0 .4rem;
    background:#fff;
    color:#182b49;
    font-size:1rem
}

.bs-settings-card form label:has(input[name="bank_name"]) {
    border-left:1px solid #d6e0ee;
    border-right:1px solid #d6e0ee;
    padding:.35rem 1.15rem
}

.bs-settings-card form label:has(input[name="bank_name"]),.bs-settings-card form label:has(input[name="bank_account"]) {
    margin-top:-1.15rem
}

.bs-settings-card form label:has(input[name="bank_account"]) {
    border:1px solid #d6e0ee;
    border-top:0;
    border-radius:0 0 10px 10px;
    padding:.35rem 1.15rem 1.1rem
}

.bs-organizations-page {
    padding:2rem 1rem
}

.bs-organizations-card {
    width:min(900px,calc(100vw - 2rem));
    padding:2.25rem
}

.bs-organizations-header {
    display:flex;
    align-items:center;
    gap:1rem;
    border-bottom:1px solid #d9e1ec;
    padding-bottom:1.25rem;
    margin-bottom:1.25rem
}

.bs-organizations-header .bs-about-mark {
    margin:0
}

.bs-organizations-header h1 {
    text-align:left;
    margin:0
}

.bs-organizations-header p {
    margin:.35rem 0 0;
    color:#60748f
}

.bs-organization-list {
    display:grid;
    gap:1rem;
    margin:1.5rem 0
}

.bs-organization-card {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:1.25rem;
    padding:1.2rem 1.25rem;
    background:#f8fafc;
    border:1px solid #d6e0ee;
    border-radius:12px
}

.bs-organization-info {
    min-width:0
}

.bs-organization-info h2 {
    margin:0;
    color:#182b49;
    font-size:1.1rem
}

.bs-organization-info p {
    margin:.35rem 0 0;
    color:#60748f;
    overflow-wrap:anywhere
}

.bs-organization-actions {
    display:flex;
    align-items:center;
    gap:.65rem;
    flex-wrap:wrap;
    justify-content:flex-end
}

.bs-organization-actions form {
    margin:0
}

.bs-organization-current {
    color:#60748f;
    font-size:.9rem;
    white-space:nowrap
}

.bs-organization-footer {
    display:flex;
    gap:.75rem;
    padding-top:.5rem
}

.bs-organization-footer .atlas-button {
    flex:1
}

@media(max-width:700px) {
    .bs-organizations-page {
        padding:.75rem
    }
    .bs-organizations-card {
        padding:1.25rem
    }
    .bs-organization-card {
        align-items:stretch;
        flex-direction:column
    }
    .bs-organization-actions {
        justify-content:stretch
    }
    .bs-organization-actions .atlas-button,.bs-organization-actions form {
        flex:1
    }
    .bs-organization-actions form .atlas-button {
        width:100%
    }
    .bs-organization-footer {
        flex-direction:column
    }
}

.bs-delete-company-modal {
    position:fixed!important;
    inset:0!important;
    z-index:100000!important;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:1rem;
    background:rgba(24,43,73,.45)
}

.bs-delete-company-modal[hidden] {
    display:none!important
}

.bs-delete-company-modal .atlas-modal__dialog {
    position:relative;
    width:min(520px,calc(100vw - 2rem));
    padding:2rem!important;
    border-radius:14px;
    background:#fff
}

.bs-delete-company-modal h2 {
    margin:0 2rem 1rem 0;
    color:#182b49
}

.bs-delete-company-modal p {
    line-height:1.5
}

.bs-delete-company-close {
    position:absolute;
    top:.7rem;
    right:1rem;
    border:0;
    background:transparent;
    color:#60748f;
    font-size:1.8rem;
    cursor:pointer
}

.bs-delete-company-warning {
    padding:.8rem 1rem;
    border-radius:8px;
    background:#fff4e5;
    color:#8a4b08;
    font-weight:600
}

.bs-delete-company-check {
    display:flex;
    align-items:flex-start;
    gap:.6rem;
    margin:1.25rem 0;
    color:#182b49
}

.bs-delete-company-check input {
    margin-top:.25rem;
    accent-color:#df252b
}

.bs-delete-company-modal .atlas-modal__actions {
    display:flex;
    justify-content:flex-end;
    gap:.75rem;
    margin-top:1.5rem
}

.agdf-language-picker {
    position:relative
}

.agdf-language-trigger {
    width:100%;
    display:flex;
    align-items:center;
    justify-content:space-between;
    min-height:48px;
    padding:.7rem .85rem;
    border:1px solid #b8c7da;
    border-radius:6px;
    background:#fff;
    color:#182b49;
    font:inherit;
    text-align:left;
    cursor:pointer
}

.agdf-language-trigger span:first-child {
    display:flex;
    align-items:center;
    gap:.6rem
}

.agdf-language-panel {
    position:absolute;
    z-index:20;
    top:calc(100% + .35rem);
    left:0;
    right:0;
    padding:.65rem;
    background:#fff;
    border:1px solid #b8c7da;
    border-radius:8px;
    box-shadow:0 10px 24px rgba(24,43,73,.18)
}

.agdf-language-panel[hidden] {
    display:none
}

.agdf-language-search {
    width:100%;
    box-sizing:border-box;
    margin-bottom:.5rem;
    padding:.65rem;
    border:1px solid #b8c7da;
    border-radius:6px;
    font:inherit
}

.agdf-language-panel ul {
    max-height:230px;
    overflow:auto;
    padding:0;
    margin:0;
    list-style:none
}

.agdf-language-panel li {
    display:flex;
    align-items:center;
    gap:.7rem;
    padding:.65rem .55rem;
    border-radius:5px;
    cursor:pointer
}

.agdf-language-panel li:hover {
    background:#edf2f8
}

.agdf-language-panel li img {
    object-fit:cover;
    border:1px solid #d9e1ec
}

.agdf-language-panel li small {
    margin-left:auto;
    color:#60748f
}

.agdf-language-empty {
    padding:.75rem;
    color:#60748f
}

.agdf-language-panel li[hidden] {
    display:none!important
}

.agdf-source-language {
    display:flex;
    align-items:center;
    gap:.65rem
}

.agdf-source-language img {
    width:28px;
    height:19px;
    object-fit:cover;
    border:1px solid #d9e1ec
}

.agdf-source-language .atlas-field__input {
    flex:1
}

.bs-language-menu {
    position:relative
}

.bs-language-current {
    display:flex;
    align-items:center;
    gap:.4rem;
    border:1px solid #b8c7da;
    border-radius:5px;
    padding:.3rem .5rem;
    background:#fff;
    color:#182b49;
    font:inherit;
    cursor:pointer
}

.bs-language-current img,.bs-language-menu-panel img {
    object-fit:cover;
    border:1px solid #d9e1ec
}

.bs-language-menu-panel {
    position:absolute;
    right:0;
    top:calc(100% + .35rem);
    z-index:2000;
    min-width:170px;
    padding:.35rem;
    background:#fff;
    border:1px solid #b8c7da;
    border-radius:7px;
    box-shadow:0 8px 20px rgba(24,43,73,.18)
}

.bs-language-menu-panel[hidden] {
    display:none
}

.bs-language-menu-panel a {
    display:flex;
    align-items:center;
    gap:.6rem;
    padding:.55rem .65rem;
    color:#182b49;
    text-decoration:none;
    border-radius:4px
}

.bs-language-menu-panel a:hover,.bs-language-menu-panel a[aria-current=true] {
    background:#edf2f8
}

.bs-language-menu-panel a[aria-current=true] {
    font-weight:700
}

.agdf-spinner {
    display:inline-block;
    width:14px;
    height:14px;
    margin-right:8px;
    border:2px solid rgba(255,255,255,.45);
    border-top-color:#fff;
    border-radius:50%;
    vertical-align:-2px;
    animation:agdf-spin .8s linear infinite
}

@keyframes agdf-spin {
    to {
        transform:rotate(360deg)
    }
}

.agdf-language-loading {
    position:fixed;
    inset:0;
    z-index:5000;
    display:flex;
    align-items:center;
    justify-content:center;
    background:rgba(24,43,73,.72);
    color:#fff
}

.agdf-language-loading[hidden] {
    display:none
}

.agdf-language-loading__box {
    min-width:260px;
    padding:1.5rem 2rem;
    text-align:center;
    background:#fff;
    color:#182b49;
    border-radius:12px;
    box-shadow:0 12px 40px rgba(0,0,0,.25);
    font-weight:700
}

.agdf-language-loading__spinner {
    width:34px;
    height:34px;
    margin:0 auto .9rem;
    border:4px solid #d6e0ee;
    border-top-color:#2764e8;
    border-radius:50%;
    animation:agdf-spin .8s linear infinite
}

@keyframes agdf-spin {
    to {
        transform:rotate(360deg)
    }
}

.atlas-phone-field>[data-phone-country-trigger],.atlas-phone-field>[data-phone-national-number] {
    height:42px;
    box-sizing:border-box
}

.bs-settings-card > a[href="/clients"] {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    margin-top:1rem;
    min-height:38px;
    padding:.5rem .9rem;
    border:1px solid #b8c7da;
    border-radius:6px;
    color:#182b49;
    text-decoration:none
}

.atlas-modal__dialog,.reminder-type-dialog {
    position:relative
}

.atlas-modal__dialog > .bs-about-close {
    position:absolute;
    top:.65rem;
    right:.8rem;
    border:0;
    background:transparent;
    color:#60748f;
    font-size:1.7rem;
    line-height:1;
    cursor:pointer
}

.bs-reminder-search + .bs-table-wrap .bs-table {
    table-layout:fixed;
    width:100%
}

.bs-reminder-search + .bs-table-wrap .bs-table th:nth-child(1),.bs-reminder-search + .bs-table-wrap .bs-table td:nth-child(1) {
    width:22%
}

.bs-reminder-search + .bs-table-wrap .bs-table th:nth-child(2),.bs-reminder-search + .bs-table-wrap .bs-table td:nth-child(2) {
    width:20%
}

.bs-reminder-search + .bs-table-wrap .bs-table th:nth-child(3),.bs-reminder-search + .bs-table-wrap .bs-table td:nth-child(3) {
    width:15%
}

.bs-reminder-search + .bs-table-wrap .bs-table th:nth-child(4),.bs-reminder-search + .bs-table-wrap .bs-table td:nth-child(4) {
    width:13%
}

.bs-reminder-search + .bs-table-wrap .bs-table th:nth-child(5),.bs-reminder-search + .bs-table-wrap .bs-table td:nth-child(5) {
    width:18%;
    white-space:nowrap
}

html[lang="ja"] .bs-reminder-search + .bs-table-wrap .bs-table th,html[lang="ja"] .bs-reminder-search + .bs-table-wrap .bs-table td {
    word-break:normal!important;
    overflow-wrap:normal!important;
    line-break:auto
}

.currency-table td:last-child {
    white-space:nowrap;
    vertical-align:middle
}

.currency-table td:last-child>a,.currency-table td:last-child>form {
    display:inline-flex;
    vertical-align:middle;
    margin:0
}

.currency-table td:last-child>a+.bs-inline-form {
    margin-left:.35rem
}

.bs-nav-disabled {
    display:block;
    padding:.7rem .8rem;
    border-radius:6px;
    color:rgba(255,255,255,.4);
    cursor:not-allowed
}

.bs-sidebar.is-collapsed .bs-nav-disabled {
    white-space:nowrap
}

.report-filters {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:1rem;
    margin-bottom:1.5rem
}

.report-filters .atlas-button {
    width:100%;
    min-height:38px;
    padding:.45rem .8rem;
    font-size:.875rem
}

.atlas-button--danger {
    background:#df3046;
    color:#fff;
    border-color:#df3046
}

.atlas-button--success {
    background:#22a447;
    color:#fff;
    border-color:#22a447
}

@media(max-width:700px) {
    .report-filters {
        grid-template-columns:1fr
    }
}

.report-filters .atlas-button {
    height:38px!important;
    min-height:38px!important;
    padding:.45rem .8rem!important;
    font-size:.875rem!important
}

.report-filters {
    grid-template-columns:repeat(3,minmax(0,1fr))!important
}

.report-filters>* {
    min-width:0!important;
    box-sizing:border-box!important
}

.report-filters .atlas-button {
    width:100%!important;
    height:38px!important;
    min-height:38px!important;
    padding:.45rem .8rem!important;
    font-size:.875rem!important
}

.report-card .bs-table {
    table-layout:fixed
}

.report-card .bs-table th:first-child,.report-card .bs-table td:first-child {
    width:18%;
    overflow-wrap:anywhere;
    word-break:break-word
}

.report-card .bs-table th:nth-child(2),.report-card .bs-table td:nth-child(2) {
    width:30%;
    overflow-wrap:anywhere;
    word-break:break-word
}

.report-card .bs-table td {
    vertical-align:top
}

.report-card {
    max-width:100%;
    box-sizing:border-box;
    overflow:hidden
}

.report-card .bs-table {
    width:100%;
    min-width:0!important;
    max-width:100%;
    margin:0 auto;
    table-layout:fixed
}

.report-card .bs-table th,.report-card .bs-table td {
    box-sizing:border-box;
    overflow-wrap:anywhere;
    word-break:break-word
}

.report-card .bs-table th:first-child,.report-card .bs-table td:first-child {
    width:18%
}

.report-card .bs-table th:nth-child(2),.report-card .bs-table td:nth-child(2) {
    width:30%
}

.report-card .bs-table th:nth-child(3),.report-card .bs-table td:nth-child(3) {
    width:18%
}

.report-card .bs-table th:nth-child(4),.report-card .bs-table td:nth-child(4) {
    width:16%
}

.report-card .bs-table th:nth-child(5),.report-card .bs-table td:nth-child(5) {
    width:18%
}

.invoice-litige-icon {
    color:#df3046!important;
    border:2px solid currentColor;
    border-radius:50%;
    width:1.75rem;
    height:1.75rem;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-weight:800;
    text-decoration:none
}

.invoice-litige-letter {
    font-size:1rem;
    line-height:1
}

.invoice-dispute-actions .quote-form-actions>form {
    display:inline-flex;
    flex:0 1 auto;
    margin:0
}

.invoice-dispute-actions .quote-form-actions>form>.atlas-button {
    min-width:140px;
    min-height:38px;
    height:38px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    white-space:nowrap
}

.invoice-dispute-actions .quote-form-actions {
    display:flex!important;
    align-items:stretch!important;
    flex-wrap:wrap!important;
    gap:.75rem!important
}

.invoice-dispute-actions .quote-form-actions>a, .invoice-dispute-actions .quote-form-actions>button, .invoice-dispute-actions .quote-form-actions>form {
    display:flex!important;
    align-items:stretch!important;
    flex:0 0 auto!important;
    margin:0!important
}

.invoice-dispute-actions .quote-form-actions>a, .invoice-dispute-actions .quote-form-actions>button, .invoice-dispute-actions .quote-form-actions>form>button {
    height:46px!important;
    min-height:46px!important;
    box-sizing:border-box!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    white-space:nowrap!important;
    margin:0!important
}

.invoice-dispute-actions .quote-form-actions>form>button {
    width:100%!important;
    padding:0 1rem!important;
    line-height:1.2!important
}

.invoice-dispute-actions .quote-form-actions>a, .invoice-dispute-actions .quote-form-actions>button, .invoice-dispute-actions .quote-form-actions>form, .invoice-dispute-actions .quote-form-actions>form>button {
    height:46px!important;
    min-height:46px!important;
    max-height:46px!important;
    box-sizing:border-box!important
}

.invoice-dispute-actions .quote-form-actions {
    display:flex!important;
    flex-wrap:wrap!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:.75rem!important;
    width:100%!important
}

.invoice-dispute-actions .quote-form-actions>a, .invoice-dispute-actions .quote-form-actions>button, .invoice-dispute-actions .quote-form-actions>form, .invoice-dispute-actions .quote-form-actions>form>button {
    align-self:stretch!important;
    vertical-align:top!important
}

.invoice-dispute-actions .quote-form-actions>a, .invoice-dispute-actions .quote-form-actions>button, .invoice-dispute-actions .quote-form-actions>form {
    flex:0 0 auto!important;
    width:auto!important
}

.invoice-dispute-actions .quote-form-actions>form>button {
    width:auto!important;
    min-width:0!important
}

.invoice-dispute-actions .quote-form-actions {
    column-gap:.75rem!important;
    row-gap:.75rem!important
}

.invoice-dispute-actions .quote-form-actions>a.atlas-button, .invoice-dispute-actions .quote-form-actions>button.atlas-button, .invoice-dispute-actions .quote-form-actions>form>button.atlas-button {
    width:auto!important;
    flex:0 0 auto!important;
    border-radius:6px!important
}

.invoice-dispute-actions .quote-form-actions>form {
    width:auto!important;
    flex:0 0 auto!important
}

.dispute-invoice-amount {
    padding:.7rem .85rem;
    border:1px solid #d9e1ec;
    border-radius:6px;
    background:#f6f8fb;
    color:#182b49
}

.invoice-dispute-actions .quote-form-actions>form {
    align-self:center!important;
    align-items:stretch!important
}

.invoice-dispute-actions .quote-form-actions>form>button {
    align-self:center!important
}

.dispute-amount-negative {
    color:#c62828!important
}

.invoice-dispute-actions .lab-button-row {
    display:flex!important;
    align-items:center!important;
    flex-wrap:wrap!important;
    gap:.75rem!important;
    width:100%!important
}

.invoice-dispute-actions .lab-button-row .atlas-button {
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    height:52px!important;
    min-height:52px!important;
    max-height:52px!important;
    box-sizing:border-box!important;
    margin:0!important;
    padding:.65rem 1.1rem!important;
    line-height:1.2!important;
    border-radius:6px!important;
    vertical-align:middle!important
}

@media (max-width:560px) {
    .invoice-dispute-actions .lab-button-row .atlas-button {
        width:100%!important
    }
}

.invoice-dispute-actions .lab-button-row {
    display:flex!important;
    flex-wrap:wrap!important;
    align-items:center!important;
    gap:.75rem!important;
    width:100%!important
}

.invoice-dispute-actions .lab-button-row>form {
    display:contents!important
}

.invoice-dispute-actions .lab-button-row>.atlas-button, .invoice-dispute-actions .lab-button-row>form>.atlas-button {
    height:52px!important;
    min-height:52px!important;
    max-height:52px!important;
    padding:.65rem 1.1rem!important;
    box-sizing:border-box!important;
    line-height:1.2!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    vertical-align:middle!important;
    border-radius:6px!important
}

.invoice-dispute-actions .quote-form-actions .atlas-button, .invoice-dispute-actions .quote-form-actions>a.atlas-button, .invoice-dispute-actions .quote-form-actions>form>.atlas-button {
    height:52px!important;
    min-height:52px!important;
    max-height:52px!important;
    padding:0 .9rem!important;
    box-sizing:border-box!important;
    line-height:1.2!important;
    vertical-align:middle!important
}

.invoice-dispute-actions .quote-form-actions>form {
    height:52px!important;
    min-height:52px!important;
    max-height:52px!important;
    display:flex!important;
    align-items:stretch!important
}

@media (max-width:560px) {
    .invoice-dispute-actions .quote-form-actions>a,.invoice-dispute-actions .quote-form-actions>button,.invoice-dispute-actions .quote-form-actions>form {
        width:100%!important
    }
    .invoice-dispute-actions .quote-form-actions>form>button {
        width:100%!important
    }
}

.invoice-dispute-actions .atlas-button-group {
    display:flex!important;
    width:100%!important;
    align-items:stretch!important;
    gap:0!important;
    flex-wrap:nowrap!important;
    justify-content:flex-start!important
}

.invoice-dispute-actions .atlas-button-group>a, .invoice-dispute-actions .atlas-button-group>button, .invoice-dispute-actions .atlas-button-group>form {
    margin:0!important
}

.invoice-dispute-actions .atlas-button-group>form {
    display:contents!important
}

.invoice-dispute-actions .atlas-button-group>a, .invoice-dispute-actions .atlas-button-group>button, .invoice-dispute-actions .atlas-button-group>form>button {
    height:46px!important;
    min-height:46px!important;
    max-height:46px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    box-sizing:border-box!important;
    border-radius:0!important
}

.invoice-dispute-actions .atlas-button-group>a:first-child {
    border-radius:6px 0 0 6px!important
}

.invoice-dispute-actions .atlas-button-group>form:last-child>button {
    border-radius:0 6px 6px 0!important
}

.invoice-dispute-actions .atlas-button-group .atlas-button {
    margin:0!important
}

.invoice-dispute-actions .atlas-button-group>a, .invoice-dispute-actions .atlas-button-group>button, .invoice-dispute-actions .atlas-button-group>form {
    flex:1 1 0!important;
    min-width:0!important
}

.invoice-dispute-actions .atlas-button-group>form>button {
    width:100%!important;
    white-space:normal!important;
    overflow-wrap:break-word!important
}

.invoice-dispute-actions .quote-form-actions.atlas-button-group {
    display:flex!important;
    width:100%!important;
    max-width:100%!important;
    box-sizing:border-box!important;
    gap:0!important;
    overflow:visible!important;
    align-items:stretch!important
}

.invoice-dispute-actions .quote-form-actions.atlas-button-group>a, .invoice-dispute-actions .quote-form-actions.atlas-button-group>form {
    display:flex!important;
    flex:1 1 0!important;
    min-width:0!important;
    width:auto!important;
    margin:0!important
}

.invoice-dispute-actions .quote-form-actions.atlas-button-group>form {
    display:flex!important
}

.invoice-dispute-actions .quote-form-actions.atlas-button-group>a, .invoice-dispute-actions .quote-form-actions.atlas-button-group>form>button {
    width:100%!important;
    min-width:0!important;
    height:46px!important;
    min-height:46px!important;
    max-height:46px!important;
    padding:0 .75rem!important;
    white-space:normal!important;
    line-height:1.15!important
}

.invoice-dispute-actions .quote-form-actions.atlas-button-group>a:first-child {
    border-radius:6px 0 0 6px!important
}

.invoice-dispute-actions .quote-form-actions.atlas-button-group>form:last-child>button {
    border-radius:0 6px 6px 0!important
}

.invoice-dispute-dialog {
    width:min(620px,calc(100vw - 2rem));
    padding:0;
    border:0;
    border-radius:12px;
    box-shadow:0 18px 60px rgba(20,38,68,.25);
    color:#182b49
}

.invoice-dispute-dialog::backdrop {
    background:rgba(15,31,56,.48)
}

.invoice-dispute-dialog form {
    display:grid;
    gap:1rem;
    padding:1.5rem
}

.invoice-dispute-dialog h2 {
    margin:0 0 .35rem;
    color:#182b49;
    font-size:1.35rem
}

.invoice-dispute-dialog label {
    display:grid;
    gap:.4rem;
    font-weight:600
}

.invoice-dispute-dialog select, .invoice-dispute-dialog input, .invoice-dispute-dialog textarea {
    width:100%;
    box-sizing:border-box;
    min-height:42px;
    padding:.65rem .75rem;
    border:1px solid #b8c7da;
    border-radius:6px;
    background:#fff;
    color:#182b49;
    font:inherit
}

.invoice-dispute-dialog textarea {
    min-height:92px;
    resize:vertical
}

.invoice-dispute-dialog .quote-form-actions {
    display:flex;
    justify-content:flex-end;
    align-items:center;
    gap:.75rem;
    margin-top:.25rem
}

.invoice-dispute-dialog .quote-form-actions .atlas-button {
    height:42px;
    min-height:42px;
    display:inline-flex;
    align-items:center;
    justify-content:center
}

.reminder-editor-actions {
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:.75rem!important;
    flex-wrap:nowrap!important
}

.reminder-editor-actions>.atlas-button {
    flex:0 0 auto!important;
    margin:0!important
}

@media(max-width:900px) {
    .reminder-editor-actions {
        flex-wrap:wrap!important
    }
}

.invoice-dispute-dialog .dispute-amount-summary {
    display:block;
    margin-top:.35rem;
    color:#182b49;
    font-size:.95rem
}

.invoice-dispute-dialog .dispute-amount-summary::first-letter {
    font-weight:700
}

.agdf-dashboard-kpis {
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:1rem;
    margin-top:1rem
}

.agdf-dashboard-pdf-button {
    width:100%;
    min-height:100%;
    box-sizing:border-box;
    display:flex;
    align-items:center;
    justify-content:center
}

.agdf-dashboard-kpi {
    background:#fff;
    border:1px solid #d9e1ec;
    border-radius:12px;
    padding:1.1rem 1.25rem;
    box-shadow:0 4px 16px #182b4910
}

.agdf-dashboard-kpi span {
    display:block;
    color:#60748f;
    font-size:.9rem
}

.agdf-dashboard-kpi strong {
    display:block;
    margin-top:.45rem;
    color:#182b49;
    font-size:1.65rem
}

.agdf-dashboard-grid {
    display:grid;
    grid-template-columns:minmax(0,1.35fr) minmax(280px,1fr);
    gap:1rem;
    margin-top:1rem
}

.agdf-dashboard-panel {
    min-width:0
}

.agdf-dashboard-panel h2 {
    margin-top:0;
    color:#182b49
}

.agdf-dashboard-activity {
    list-style:none;
    margin:0;
    padding:0
}

.agdf-dashboard-activity li {
    display:grid;
    grid-template-columns:7rem 1fr;
    gap:.25rem .75rem;
    padding:.75rem 0;
    border-bottom:1px solid #d9e1ec
}

.agdf-dashboard-activity li:last-child {
    border-bottom:0
}

.agdf-dashboard-activity span {
    color:#60748f;
    font-size:.85rem
}

.agdf-dashboard-activity strong {
    color:#182b49
}

.agdf-dashboard-activity small {
    grid-column:2;
    color:#60748f
}

@media (max-width:800px) {
    .agdf-dashboard-kpis {
        grid-template-columns:repeat(2,minmax(0,1fr))
    }
    .agdf-dashboard-grid {
        grid-template-columns:1fr
    }
}

@media (max-width:480px) {
    .agdf-dashboard-kpis {
        grid-template-columns:1fr
    }
}

.agdf-dashboard-overdue-table {
    table-layout:fixed;
    min-width:0!important;
    width:100%
}

.agdf-dashboard-overdue-table th:nth-child(1),.agdf-dashboard-overdue-table td:nth-child(1) {
    width:57%
}

.agdf-dashboard-overdue-table th:nth-child(2),.agdf-dashboard-overdue-table td:nth-child(2) {
    width:18%;
    white-space:nowrap;
    font-size:.86rem
}

.agdf-dashboard-overdue-table th:nth-child(3),.agdf-dashboard-overdue-table td:nth-child(3) {
    width:25%;
    white-space:nowrap
}

.agdf-dashboard-invoice-reference {
    display:block;
    overflow-wrap:anywhere;
    word-break:break-word
}

.agdf-dashboard-overdue-table td small {
    display:block;
    margin-top:.2rem;
    color:#60748f;
    overflow-wrap:anywhere;
    word-break:break-word
}

.bs-invoice-amount-line {
    display:block;
    margin-top:.2rem;
    font-size:.82rem;
    line-height:1.25
}

.bs-invoice-amount-line--credit {
    color:#b42332
}

.bs-invoice-amount-line--net {
    color:#1f7a4d;
    font-weight:700
}

.bs-language-separator {
    height:1px;
    background:#b8c7da;
    margin:.65rem 0
}

.bs-language-menu-separator {
    height:1px;
    background:#b8c7da;
    margin:.35rem .4rem
}

.bs-topbar-logout {
    display:inline-flex;
    margin:0
}

.bs-topbar-logout button {
    appearance:none;
    -webkit-appearance:none;
    border:0!important;
    background:transparent!important;
    color:#176b56!important;
    padding:0!important;
    font:inherit!important;
    display:inline-flex;
    align-items:center;
    gap:.35rem;
    cursor:pointer
}

.bs-topbar-logout button:hover {
    color:#0d4d3d!important
}

.bs-topbar-logout button:focus-visible {
    outline:2px solid #2764e8;
    outline-offset:3px;
    border-radius:2px
}

.bs-topbar-logout-icon {
    width:1.1rem;
    height:1.1rem;
    flex:none;
    stroke:currentColor;
    stroke-width:1.8;
    fill:none;
    stroke-linecap:round;
    stroke-linejoin:round
}

/* =========================================================
   AUTHENTIFICATION — RESPONSIVE
   Login / inscription / mot de passe oublié
   ========================================================= */
.bs-auth-page {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    padding: 1rem;
}

.bs-auth-card {
    box-sizing: border-box;
    width: min(420px, 100%);
    max-width: 100%;
    min-width: 0;
}

.bs-auth-form {
    width: 100%;
    min-width: 0;
}

.bs-auth-form .bs-field {
    min-width: 0;
}

.bs-auth-form input, .bs-auth-form select, .bs-auth-form textarea, .bs-auth-form .atlas-field__input {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.bs-auth-form select {
    min-height: var(--atlas-input-height, 42px);
    margin: 0;
    padding: .65rem .75rem;
    border: 1px solid var(--atlas-input-border, #b8c7da);
    border-radius: var(--atlas-input-radius, 6px);
    background: var(--atlas-input-background, #fff);
    color: var(--atlas-input-text, #182b49);
    font: inherit;
    line-height: 1.2;
}

.bs-auth-form .atlas-button {
    box-sizing: border-box;
    max-width: 100%;
}

@media (max-width: 520px) {
    .bs-auth-page {
        place-items: start center;
        padding: 1rem;
    }
    .bs-auth-card {
        width: 100%;
        padding: 1.5rem;
        margin: 0;
    }
    .bs-auth-card h1 {
        font-size: clamp(2rem, 10vw, 2.75rem);
    }
    .bs-auth-subtitle {
        margin-bottom: 1.5rem;
    }
}

/* =========================================================
   NAVIGATION MOBILE — DRAWER
   ========================================================= */

@media (max-width: 700px) {

    /*
     * La sidebar n'occupe aucune largeur lorsqu'elle est fermée.
     * Elle devient un drawer superposé lorsqu'elle est ouverte.
     */
    .bs-sidebar {
        display: block !important;
        position: fixed !important;

        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;

        width: min(280px, 85vw) !important;
        height: 100dvh !important;

        padding: 4.5rem 1rem 1rem !important;

        transform: translateX(-100%) !important;
        transition: transform .22s ease !important;

        overflow-y: auto !important;
        overflow-x: hidden !important;

        z-index: 2000 !important;
    }

    .bs-sidebar.is-mobile-open {
        transform: translateX(0) !important;
    }

    .bs-sidebar.is-mobile-open h2,
    .bs-sidebar.is-mobile-open .bs-nav-label {
        display: initial !important;
    }

    /*
     * Hamburger visible lorsque le drawer est fermé.
     */
    .bs-sidebar [data-sidebar-toggle] {
        display: inline-flex !important;
        position: fixed !important;

        top: 118px !important;
        left: 16px !important;

        align-items: center;
        justify-content: center;

        width: 36px !important;
        height: 36px !important;

        padding: 0 !important;

        transform: none !important;

        z-index: 2100 !important;
    }

    /*
     * Une fois la sidebar ouverte, le bouton reste accessible
     * dans le drawer.
     */
    .bs-sidebar.is-mobile-open [data-sidebar-toggle] {
        top: 1rem !important;
        right: 1rem !important;
        left: auto !important;
    }

    /*
     * Le contenu utilise toute la largeur disponible.
     */
    .bs-main {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        padding: 1rem !important;
        overflow-x: hidden;
    }

    /*
     * Fond assombri derrière le drawer ouvert.
     */
    body.bs-sidebar-mobile-open::after {
        content: "";

        position: fixed;
        inset: 0;

        background: rgb(0 0 0 / 35%);

        z-index: 1900;
    }
}


/* =========================================================
   TOPBAR — MOBILE
   ========================================================= */

@media (max-width: 700px) {

    /*
     * Deux lignes :
     *
     * 1 : identité                  déconnexion + langue
     * 2 : société active + sélection
     */
    .bs-topbar {
        display: grid !important;

        grid-template-columns:
            minmax(0, 1fr)
            auto !important;

        grid-template-rows:
            auto
            auto !important;

        gap: .55rem .75rem !important;

        height: auto !important;
        min-height: 100px !important;

        padding: .65rem .75rem !important;

        align-items: center !important;
    }

    /*
     * Nom société / utilisateur.
     */
    .bs-topbar-user-name {
        position: static !important;

        grid-column: 1 !important;
        grid-row: 1 !important;

        transform: none !important;

        min-width: 0 !important;

        font-size: .82rem !important;
        line-height: 1.15 !important;

        text-align: left !important;

        white-space: normal !important;
        overflow-wrap: anywhere;
    }

    /*
     * Déconnexion + langue.
     */
    .bs-topbar-actions {
        grid-column: 2 !important;
        grid-row: 1 !important;

        display: flex !important;
        align-items: center !important;

        gap: .4rem !important;

        margin: 0 !important;

        font-size: .8rem !important;

        white-space: nowrap;
    }

    /*
     * Sélection de la société active.
     */
    .bs-topbar > .bs-admin-context {
        grid-column: 1 / -1 !important;
        grid-row: 2 !important;

        width: 100% !important;
        min-width: 0 !important;

        margin: 0 !important;
    }

    .bs-admin-context label {
        display: grid !important;

        grid-template-columns:
            auto
            minmax(0, 1fr) !important;

        align-items: center !important;

        gap: .5rem !important;

        width: 100% !important;

        font-size: .75rem !important;
    }

    .bs-admin-context select {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
    }

    /*
     * La hauteur réservée sous la topbar doit correspondre
     * à la nouvelle topbar mobile.
     */
    .bs-shell {
        padding-top: 100px !important;
    }
}

/* =========================================================
   HAMBURGER MOBILE — TOPBAR
   ========================================================= */

.bs-mobile-menu-toggle {
    display: none;
}

@media (max-width: 700px) {

    /* Ancien bouton de réduction de la sidebar :
       uniquement destiné au bureau. */
    .bs-sidebar [data-sidebar-toggle] {
        display: none !important;
    }

    .bs-mobile-menu-toggle {
        display: inline-flex !important;

        position: fixed;

        top: 108px;
        left: 16px;

        align-items: center;
        justify-content: center;

        width: 36px;
        height: 36px;

        padding: 0;

        border: 1px solid #b8c7da;
        border-radius: 6px;

        background: #fff;
        color: #182b49;

        font-size: 1.25rem;
        line-height: 1;

        cursor: pointer;

        z-index: 2100;
    }
}

/* =========================================================
   RELANCES — RESPONSIVE
   ========================================================= */

.bs-reminders-mobile {
    display: none;
}

@media (max-width: 700px) {

    .bs-reminders-card {
        padding: 1.25rem;
    }

    .bs-reminders-card > h2 {
        margin-bottom: 1.25rem;
        font-size: 1.35rem;
        line-height: 1.25;
    }

    .bs-reminder-search {
        margin-bottom: 1rem;
    }

    .bs-reminder-search,
    .bs-reminder-search .atlas-search {
        width: 100%;
        max-width: none;
    }

    .bs-reminders-desktop {
        display: none !important;
    }

    .bs-reminders-mobile {
        display: grid;
        gap: 1rem;
        margin-top: 1rem;
    }

    .bs-reminder-item {
        padding: 1rem;

        border: 1px solid #d7e0ec;
        border-radius: 10px;

        background: #fff;
    }

    .bs-reminder-item__header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;

        gap: 1rem;

        margin-bottom: .65rem;
    }

    .bs-reminder-item__reference {
        color: #102d57;
        font-size: 1rem;
    }

    .bs-reminder-item__delay {
        flex: none;

        color: #c42b1c;
        font-weight: 600;
        white-space: nowrap;
    }

    .bs-reminder-item__client {
        padding-bottom: .85rem;
        margin-bottom: .85rem;

        border-bottom: 1px solid #e4eaf2;

        line-height: 1.35;
    }

    .bs-reminder-item__details {
        display: grid;
        grid-template-columns: 1fr 1fr;

        gap: 1rem;
    }

    .bs-reminder-item__details > div {
        min-width: 0;
    }

    .bs-reminder-item__label {
        display: block;

        margin-bottom: .2rem;

        color: #60728c;
        font-size: .8rem;
    }

    .bs-reminder-item__details strong {
        overflow-wrap: anywhere;
    }

    .bs-reminder-item__actions {
        display: flex;
        justify-content: flex-end;
        align-items: center;

        gap: .65rem;

        margin-top: 1rem;
    }
}

/* =========================================================
   TYPES DE PAIEMENT — RESPONSIVE
   ========================================================= */

@media (max-width: 700px) {
    .payment-term-form {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .payment-term-form .bs-field,
    .payment-term-form input {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

	.payment-terms-table-wrap {
		display: block !important;
		width: 100% !important;
		max-width: 100% !important;
		overflow-x: auto !important;
		-webkit-overflow-scrolling: touch;
	}

	.payment-terms-table {
		display: table !important;
		width: 100% !important;
		min-width: 0 !important;
	}

	.payment-terms-table thead {
		display: table-header-group !important;
	}

	.payment-terms-table tbody {
		display: table-row-group !important;
	}

	.payment-terms-table tr {
		display: table-row !important;
	}

	.payment-terms-table th,
	.payment-terms-table td {
		display: table-cell !important;
	}
}

/* =========================================================
   DEVISES — RESPONSIVE
   ========================================================= */

@media (max-width: 700px) {

    .bs-settings .currency-form {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        width: 100% !important;
        max-width: 100% !important;
        gap: 1rem !important;
    }

    .bs-settings .currency-form > .bs-field {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .bs-settings .currency-form input {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .currency-table-wrap {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .currency-table {
        display: table !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    .currency-table thead {
        display: table-header-group !important;
    }

    .currency-table tbody {
        display: table-row-group !important;
    }

    .currency-table tr {
        display: table-row !important;
    }

    .currency-table th,
    .currency-table td {
        display: table-cell !important;
    }

    .currency-table th:last-child,
    .currency-table td:last-child {
        white-space: nowrap;
    }
	
	.currency-table th:nth-child(2),
	.currency-table td:nth-child(2) {
		width: 3.5rem;
		white-space: nowrap !important;
		word-break: keep-all !important;
		overflow-wrap: normal !important;
	}

	.currency-table th:last-child,
	.currency-table td:last-child {
		width: 4.5rem;
		white-space: nowrap !important;
	}

	.currency-table td:last-child {
		padding-left: .35rem !important;
		padding-right: .35rem !important;
	}

	.currency-table td:last-child .atlas-icon-button,
	.currency-table td:last-child .bs-inline-form {
		margin: 0 !important;
	}

	.currency-table td:last-child .bs-inline-form {
		display: inline-block !important;
	}

	.currency-table td:last-child .atlas-icon-button {
		width: 1.9rem !important;
		height: 1.9rem !important;
		padding: .3rem !important;
	}

}

/* =========================================================
   TAUX DE CHANGE — RESPONSIVE
   ========================================================= */

@media (max-width: 700px) {

    .exchange-rates-card .bs-table-wrap {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
    }

    .exchange-rates-table {
        display: table !important;
        width: 100% !important;
        min-width: 0 !important;
        table-layout: fixed !important;
    }

    .exchange-rates-table thead {
        display: table-header-group !important;
    }

    .exchange-rates-table tbody {
        display: table-row-group !important;
    }

    .exchange-rates-table tr {
        display: table-row !important;
    }

    .exchange-rates-table th,
    .exchange-rates-table td {
        display: table-cell !important;
        vertical-align: middle !important;
    }

    .exchange-rates-table th:first-child,
    .exchange-rates-table td:first-child {
        width: 32% !important;
        white-space: nowrap !important;
    }

    .exchange-rates-table th:last-child,
    .exchange-rates-table td:last-child {
        width: 68% !important;
    }

    .exchange-rates-table .exchange-rate-input {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .exchange-rates-card > form > .bs-field {
        width: 100% !important;
        max-width: 100% !important;
    }

    .exchange-rates-card > form > .bs-field input {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* =========================================================
   RAPPORT DES FACTURES
   ========================================================= */

.report-card {
    min-width: 0;
}

.report-filters {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr)
        minmax(12rem, 1.2fr);
    gap: 1rem;
    align-items: end;
    margin-bottom: 1.25rem;
}

.report-filters input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.report-filter-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
}

.report-filter-actions .atlas-button {
    margin: 0 !important;
}

.report-table-wrap {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.report-table {
    width: 100%;
}

@media (max-width: 700px) {

    .report-card {
        width: 100%;
        max-width: 100%;
        padding: 1rem;
        box-sizing: border-box;
        overflow: hidden;
    }

    .report-filters {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 1rem !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    .report-filters > .bs-field {
        grid-column: 1 !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .report-filters input {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .report-filter-actions {
        grid-column: 1 !important;
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: .75rem !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    .report-filter-actions > button {
        grid-column: 1 / -1 !important;
        width: 100% !important;
    }

    .report-filter-actions > a {
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .report-table-wrap {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        padding-bottom: .5rem;
    }

    .report-table-wrap .report-table {
        display: table !important;
        width: 760px !important;
        min-width: 760px !important;
        max-width: none !important;
        table-layout: fixed !important;
    }

    .report-table thead {
        display: table-header-group !important;
    }

    .report-table tbody {
        display: table-row-group !important;
    }

    .report-table tr {
        display: table-row !important;
    }

    .report-table th,
    .report-table td {
        display: table-cell !important;
        min-width: 0 !important;
        max-width: none !important;
        white-space: nowrap !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
        hyphens: none !important;
        vertical-align: middle !important;
    }

    .report-table th:nth-child(1),
    .report-table td:nth-child(1) {
        width: 110px !important;
    }

    .report-table th:nth-child(2),
    .report-table td:nth-child(2) {
        width: 220px !important;
    }

    .report-table th:nth-child(3),
    .report-table td:nth-child(3) {
        width: 150px !important;
    }

    .report-table th:nth-child(4),
    .report-table td:nth-child(4) {
        width: 120px !important;
    }

    .report-table th:nth-child(5),
    .report-table td:nth-child(5) {
        width: 160px !important;
    }
}

/* =========================================================
   STATISTIQUES — RESPONSIVE
   ========================================================= */

.statistics-card {
    min-width: 0;
}

.statistics-card .stats-table-wrap {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: .5rem;
}

@media (max-width: 700px) {

    .statistics-card {
        width: 100%;
        max-width: 100%;
        padding: 1rem;
        box-sizing: border-box;
        overflow: hidden;
    }

    .statistics-card .stats-converter {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 1rem !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    .statistics-card .stats-converter > .bs-field,
    .statistics-card .stats-converter input,
    .statistics-card .stats-converter select {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .statistics-card .stats-converter > .atlas-button {
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        justify-content: center !important;
    }

    .statistics-card .stats-table-wrap {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        padding-bottom: .5rem;
    }

    .statistics-card .stats-table {
        display: table !important;
        width: 680px !important;
        min-width: 680px !important;
        max-width: none !important;
        table-layout: auto !important;
    }

    .statistics-card .stats-table thead {
        display: table-header-group !important;
    }

    .statistics-card .stats-table tbody {
        display: table-row-group !important;
    }

    .statistics-card .stats-table tr {
        display: table-row !important;
    }

    .statistics-card .stats-table th,
    .statistics-card .stats-table td {
        display: table-cell !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        white-space: nowrap !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
        hyphens: none !important;
        vertical-align: middle !important;
    }

    .statistics-card .stats-financial-table {
        width: 1050px !important;
        min-width: 1050px !important;
    }

    .statistics-card .stats-conversion-table {
        width: 520px !important;
        min-width: 520px !important;
    }

    .statistics-card h2 {
        overflow-wrap: normal !important;
        word-break: normal !important;
    }
}

/* =========================================================
   UTILISATEURS — SELECT RÔLE MOBILE
   ========================================================= */

@media (max-width: 700px) {

    .bs-main select {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .bs-main .bs-field {
        min-width: 0 !important;
        max-width: 100% !important;
    }
}

/* =========================================================
   INSCRIPTION / CRÉATION UTILISATEUR — RÔLE
   ========================================================= */

.bs-registration-role {
    position: relative;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.bs-registration-role__trigger {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    text-align: left;
    cursor: pointer;
}

.bs-registration-role__chevron {
    flex: 0 0 auto;
}

.bs-registration-role__menu {
    position: absolute;
    top: calc(100% + .25rem);
    left: 0;
    right: 0;
    z-index: 2200;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    background: #fff;
    border: 1px solid #b8c7da;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgb(0 0 0 / 14%);
}

.bs-registration-role__menu[hidden] {
    display: none !important;
}

.bs-registration-role__option {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: .7rem .85rem;
    border: 0;
    box-sizing: border-box;
    background: #fff;
    color: inherit;
    font: inherit;
    text-align: left;
    white-space: normal;
    overflow-wrap: break-word;
    cursor: pointer;
}

.bs-registration-role__option:hover,
.bs-registration-role__option:focus,
.bs-registration-role__option.is-selected {
    background: #eef4fb;
}

@media (max-width: 700px) {
    .bs-auth-form .bs-field,
    .bs-registration-role,
    .bs-registration-role__trigger,
    .bs-registration-role__menu {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* =========================================================
   À PROPOS — adaptation mobile
   ========================================================= */
@media (max-width: 700px) {
    .bs-about-modal {
        box-sizing: border-box !important;
        padding: .75rem !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .bs-about-dialog {
        box-sizing: border-box !important;
        width: min(100%, 560px) !important;
        max-width: 100% !important;
        max-height: calc(100dvh - 1.5rem) !important;
        margin: auto !important;
        padding: 1.25rem !important;
        overflow-y: auto !important;
        overscroll-behavior: contain;
    }

    .bs-about-brand {
        gap: .75rem;
        padding-bottom: .8rem;
    }

    .bs-about-mark {
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
        font-size: 1.45rem;
    }

    .bs-about-brand h2 {
        font-size: 1.35rem;
    }

    .bs-about-brand p {
        font-size: .92rem;
        line-height: 1.25;
    }

    .bs-about-version {
        gap: .6rem;
        margin: .9rem 0;
    }

    .bs-about-description {
        line-height: 1.45;
    }

    .bs-about-features {
        grid-template-columns: 1fr 1fr;
        gap: .5rem .75rem;
        margin: .9rem 0;
    }

    .bs-about-footer {
        gap: .75rem;
        padding-top: .8rem;
    }

    .bs-about-footer .atlas-button {
        flex: 0 0 auto;
    }
}

@media (max-width: 380px) {
    .bs-about-dialog {
        padding: 1rem !important;
    }

    .bs-about-features {
        grid-template-columns: 1fr;
    }

    .bs-about-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* =========================================================
   DÉTAIL FACTURE — ACTIONS A / L / R CERCLÉES
   À placer APRÈS les anciennes règles des actions facture.
   ========================================================= */

.bs-invoice-detail-actions {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: .8rem !important;
}

.bs-invoice-detail-actions > a,
.bs-invoice-detail-actions > form {
    flex: 0 0 auto !important;
    margin: 0 !important;
}

.bs-invoice-detail-actions > form {
    display: inline-flex !important;
}

.bs-invoice-detail-action,
.bs-invoice-detail-actions > form > .bs-invoice-detail-action {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Neutralise l'ancienne règle qui mettait le 2e lien sur fond bleu. */
.invoice-total ~ .quote-form-actions.bs-invoice-detail-actions > a:nth-of-type(2) {
    background: transparent !important;
    border-color: transparent !important;
    color: #b42318 !important;
}

/* Cercle commun A / L / R : même principe que le L des cards facture. */
.invoice-action-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    box-sizing: border-box;
    border: 2px solid currentColor;
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
}

/* Avoir */
.bs-invoice-detail-action--credit {
    color: #2764e8 !important;
}

/* PDF */
.bs-invoice-detail-action--pdf {
    color: #b42318 !important;
}

/* Litige */
.bs-invoice-detail-action--dispute {
    color: #c97712 !important;
}

/* Remboursé */
.bs-invoice-detail-action--refund {
    color: #168044 !important;
}

@media (max-width: 700px) {
    .bs-invoice-detail-actions {
        flex-wrap: nowrap !important;
        gap: .55rem !important;
        width: 100% !important;
    }
}

/* Détail facture — harmonisation taille icône PDF */
.bs-invoice-detail-action--pdf svg {
    width: 1.75rem !important;
    height: 1.75rem !important;
}

/* Cards factures — harmonisation visuelle des icônes */
.bs-invoice-card .bs-actions .atlas-icon-button svg {
    width: 1.55rem !important;
    height: 1.55rem !important;
}

/* =========================================================
   CARDS DEVIS — HARMONISATION VISUELLE DES ICÔNES
   Même taille que les actions des cards Factures.
   ========================================================= */

.bs-quote-card .bs-actions .atlas-icon-button svg {
    width: 1.55rem !important;
    height: 1.55rem !important;
}

/* =========================================================
   AGDF — SHELL MOBILE CANONIQUE
   Validation finale sur téléphone réel.
   Ce bloc est volontairement placé en fin de fichier afin
   d'annuler les anciennes règles mobiles historiques.
   ========================================================= */

@media (max-width: 700px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    body.bs-sidebar-mobile-open {
        overflow: hidden;
    }

    .bs-shell {
        width: 100% !important;
        max-width: 100% !important;
        padding-top: 104px !important;
    }

    .bs-main {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        padding: 1rem .75rem !important;
        overflow-x: hidden !important;
    }

    /* Topbar : 1re ligne = menu / identité / actions,
       2e ligne = société active. */
    .bs-topbar {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        left: 0 !important;
        z-index: 2200 !important;

        display: grid !important;
        grid-template-columns: 40px minmax(0, 1fr) auto !important;
        grid-template-rows: 40px 44px !important;
        gap: .35rem .5rem !important;

        width: 100% !important;
        height: 104px !important;
        min-height: 104px !important;
        box-sizing: border-box !important;

        padding: .5rem .65rem !important;
        align-items: center !important;
    }

    .bs-mobile-menu-toggle {
        display: inline-flex !important;
        position: static !important;
        grid-column: 1 !important;
        grid-row: 1 !important;
        align-self: center !important;
        justify-self: start !important;

        width: 36px !important;
        height: 36px !important;
        padding: 0 !important;
        margin: 0 !important;

        align-items: center !important;
        justify-content: center !important;

        border: 1px solid #b8c7da !important;
        border-radius: 6px !important;
        background: #fff !important;
        color: #182b49 !important;

        font-size: 1.25rem !important;
        line-height: 1 !important;
        cursor: pointer !important;
        z-index: auto !important;
    }

    .bs-topbar-user-name {
        position: static !important;
        grid-column: 2 !important;
        grid-row: 1 !important;
        align-self: center !important;
        justify-self: center !important;

        min-width: 0 !important;
        max-width: 100% !important;
        margin: 0 !important;
        transform: none !important;

        color: #274e84 !important;
        font-size: .78rem !important;
        font-weight: 700 !important;
        line-height: 1.15 !important;
        text-align: center !important;

        white-space: normal !important;
        overflow-wrap: anywhere !important;
    }

    .bs-topbar-actions {
        grid-column: 3 !important;
        grid-row: 1 !important;
        align-self: center !important;
        justify-self: end !important;

        display: flex !important;
        align-items: center !important;
        gap: .25rem !important;

        min-width: 0 !important;
        margin: 0 !important;
        font-size: .8rem !important;
        white-space: nowrap !important;
    }

    .bs-topbar-logout {
        display: inline-flex !important;
        margin: 0 !important;
    }

    .bs-topbar-actions .bs-topbar-logout button {
        width: 34px !important;
        height: 34px !important;
        padding: 0 !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .bs-topbar-logout-label {
        display: none !important;
    }

    .bs-topbar-logout-icon {
        width: 1.2rem !important;
        height: 1.2rem !important;
        margin: 0 !important;
    }

    .bs-language-menu {
        position: relative !important;
        min-width: 0 !important;
    }

    .bs-language-current {
        min-width: 0 !important;
        height: 34px !important;
        padding: .25rem .35rem !important;
        gap: .25rem !important;
    }

    .bs-language-current > .bs-topbar-icon,
    .bs-language-current-label {
        display: none !important;
    }

    .bs-language-current img {
        width: 24px !important;
        height: 16px !important;
        flex: none !important;
    }

    .bs-language-menu-panel {
        right: 0 !important;
        left: auto !important;
        max-width: calc(100vw - 1.3rem) !important;
    }

    .bs-topbar > .bs-admin-context {
        grid-column: 1 / -1 !important;
        grid-row: 2 !important;

        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
    }

    .bs-admin-context label {
        display: grid !important;
        grid-template-columns: auto minmax(0, 1fr) !important;
        gap: .45rem !important;
        align-items: center !important;

        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;

        font-size: .72rem !important;
        line-height: 1.1 !important;
        white-space: nowrap !important;
    }

    .bs-admin-context select {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        height: 34px !important;
        padding: .3rem .45rem !important;
        font-size: .78rem !important;
    }

    /* Un seul menu mobile : la sidebar est un drawer. */
    .bs-sidebar {
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        z-index: 2400 !important;

        width: min(280px, 86vw) !important;
        height: 100dvh !important;
        box-sizing: border-box !important;

        padding: 1.25rem 1rem !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;

        transform: translate3d(-105%, 0, 0) !important;
        transition: transform .22s ease !important;
        box-shadow: 8px 0 24px rgb(0 0 0 / 18%) !important;
    }

    .bs-sidebar.is-mobile-open {
        transform: translate3d(0, 0, 0) !important;
    }

    .bs-sidebar h2,
    .bs-sidebar .bs-nav-label {
        display: initial !important;
    }

    .bs-sidebar [data-sidebar-toggle] {
        display: none !important;
    }

    body.bs-sidebar-mobile-open::after {
        content: "" !important;
        position: fixed !important;
        inset: 0 !important;
        z-index: 2300 !important;
        background: rgb(0 0 0 / 38%) !important;
    }
}

@media (max-width: 390px) {
    .bs-topbar {
        grid-template-columns: 38px minmax(0, 1fr) auto !important;
        column-gap: .3rem !important;
        padding-right: .5rem !important;
        padding-left: .5rem !important;
    }

    .bs-topbar-user-name {
        font-size: .72rem !important;
    }

    .bs-admin-context label {
        gap: .3rem !important;
        font-size: .68rem !important;
    }
}

/* Quote form — prevent grid fields from overflowing their card */
.bs-settings-card .bs-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
}

.bs-settings-card .bs-form-grid > .bs-field {
    min-width: 0;
    width: 100%;
}

.bs-settings-card .bs-form-grid > .bs-field input,
.bs-settings-card .bs-form-grid > .bs-field select,
.bs-settings-card .bs-form-grid > .bs-field textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.bs-settings-card .bs-form-grid .bs-field--full {
    grid-column: 1 / -1;
}

/* Visualisation devis : le tableau reste dans la carte sans scroll horizontal. */
.quote-detail-table {
    width:100%;
    min-width:0!important;
    table-layout:fixed;
}

.quote-detail-table th,
.quote-detail-table td {
    padding:.65rem .7rem;
    overflow-wrap:break-word;
    word-break:normal;
}

.quote-detail-table[data-vat-enabled="1"] th:nth-child(1),
.quote-detail-table[data-vat-enabled="1"] td:nth-child(1) { width:32%; }
.quote-detail-table[data-vat-enabled="1"] th:nth-child(2),
.quote-detail-table[data-vat-enabled="1"] td:nth-child(2) { width:10%; }
.quote-detail-table[data-vat-enabled="1"] th:nth-child(3),
.quote-detail-table[data-vat-enabled="1"] td:nth-child(3) { width:16%; }
.quote-detail-table[data-vat-enabled="1"] th:nth-child(4),
.quote-detail-table[data-vat-enabled="1"] td:nth-child(4) { width:10%; }
.quote-detail-table[data-vat-enabled="1"] th:nth-child(5),
.quote-detail-table[data-vat-enabled="1"] td:nth-child(5) { width:16%; }
.quote-detail-table[data-vat-enabled="1"] th:nth-child(6),
.quote-detail-table[data-vat-enabled="1"] td:nth-child(6) { width:16%; }

.quote-detail-table[data-vat-enabled="0"] th:nth-child(1),
.quote-detail-table[data-vat-enabled="0"] td:nth-child(1) { width:48%; }
.quote-detail-table[data-vat-enabled="0"] th:nth-child(2),
.quote-detail-table[data-vat-enabled="0"] td:nth-child(2) { width:12%; }
.quote-detail-table[data-vat-enabled="0"] th:nth-child(3),
.quote-detail-table[data-vat-enabled="0"] td:nth-child(3) { width:20%; }
.quote-detail-table[data-vat-enabled="0"] th:nth-child(4),
.quote-detail-table[data-vat-enabled="0"] td:nth-child(4) { width:20%; }

@media (max-width:700px) {
    .quote-detail-table {
        font-size:.82rem;
    }
    .quote-detail-table th,
    .quote-detail-table td {
        padding:.5rem .4rem;
    }
}

/* =========================================================
   CARDS FACTURES — ACTIONS CANONIQUES
   - Les devis restent inchangés.
   - La zone d'actions facture est ancrée à droite.
   - Sa largeur est fixe afin que la première icône soit
     alignée verticalement sur toutes les cards.
   - Les actions se remplissent ensuite de gauche à droite.
   ========================================================= */

.bs-invoice-card > .bs-actions {
    display: flex;
    width: 22rem;
    max-width: 100%;
    margin-top: 1rem;
    margin-left: auto;
    margin-right: 0;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: .55rem;
    box-sizing: border-box;
}

.bs-invoice-card > .bs-actions > * {
    flex: 0 0 auto;
    margin: 0;
}

/* Mail indisponible : même gabarit que le mail normal. */
.bs-invoice-card .bs-mail-unavailable {
    position: relative !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8 !important;
    cursor: default;
}

.bs-invoice-card .bs-mail-unavailable__cross {
    position: absolute !important;
    inset: 50% auto auto 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    color: #d9212c !important;
    font-size: 1.55rem !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    pointer-events: none !important;
}

.bs-invoice-card .bs-mail-unavailable__mail {
    display: block !important;
}

/* Litige : même encombrement visuel que les autres actions. */
.bs-invoice-card .invoice-litige-icon {
    width: 24px;
    min-width: 24px;
    height: 24px;
    padding: 0;
    box-sizing: border-box;
}

.bs-invoice-card .invoice-litige-letter {
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

/* Information remboursement : reste naturellement à la suite. */
.bs-invoice-card .bs-refund-info {
    flex: 0 0 auto;
    margin: 0;
}

/* ==========================================================================
   AGDF V2 — Supplier card actions
   Icon-only actions with native translated tooltips.
   Scoped to supplier cards so legacy .bs-actions rules do not hide icons.
   ========================================================================== */

.supplier-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.supplier-actions .supplier-action-form {
    display: inline-flex;
    margin: 0;
}

.supplier-actions .supplier-action {
    width: 36px;
    min-width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
}

.supplier-actions a.supplier-action:first-child {
    font-size: 14px;
}

.supplier-actions .supplier-action::after,
.supplier-actions a.supplier-action:first-child::after {
    content: none;
}

.supplier-actions .supplier-action i {
    font-size: 14px;
    line-height: 1;
    pointer-events: none;
}

.supplier-actions .supplier-action--delete {
    cursor: pointer;
}



/* ==========================================================================
   AGDF V2 — Supplier card actions
   Same Atlas icon-button pattern as client/quote/invoice cards.
   ========================================================================== */

.supplier-actions {
    display: flex;
    align-items: center;
    gap: .35rem;
}

.supplier-actions .supplier-action-form {
    display: inline-flex;
    margin: 0;
}

.supplier-actions a.supplier-action:first-child {
    font-size: 1.2rem;
}

.supplier-actions a.supplier-action:first-child::after,
.supplier-actions button.supplier-action::after {
    content: none;
}

.supplier-actions .supplier-action svg {
    width: 1.55rem;
    height: 1.55rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ============================================================
   Fiche fournisseur
   Styles déplacés depuis supplier-form.php
   ============================================================ */

.supplier-sheet-toolbar{display:flex;width:100%;align-items:flex-start;justify-content:space-between}
.supplier-sheet-toolbar .atlas-toolbar__end{margin-left:auto}
.supplier-sheet-tabs .atlas-tabs__list{display:flex;gap:.5rem;border-bottom:0;flex-wrap:wrap}
.supplier-sheet-tabs .atlas-tabs__tab{
    border:1px solid #d4deec;
    border-radius:.55rem;
    background:#fff;
    color:#172b4d;
    padding:.55rem .9rem;
    text-decoration:none;
}
.supplier-sheet-tabs .atlas-tabs__tab:hover{background:#f3f7ff}
.supplier-sheet-tabs .atlas-tabs__tab[aria-selected="true"],
.supplier-sheet-tabs .atlas-tabs__tab--active{
    background:#2563eb;
    border-color:#2563eb;
    color:#fff;
    box-shadow:none;
}
.supplier-sheet-tabs .atlas-tabs__tab::after{display:none!important}
.atlas-table__action-group form{display:inline-flex;margin:0}
#catalog-delete-modal[hidden]{display:none!important}
#catalog-delete-modal{position:fixed;inset:0;z-index:10000;display:flex;align-items:center;justify-content:center;padding:1rem}
#catalog-delete-modal .atlas-modal__backdrop{position:absolute;inset:0;background:rgba(20,35,60,.38)}
#catalog-delete-modal .atlas-modal__dialog{position:relative;z-index:1;width:min(520px,calc(100vw - 2rem));background:#fff;border-radius:.85rem;box-shadow:0 20px 60px rgba(20,35,60,.25);overflow:hidden}
#catalog-delete-modal .atlas-modal__header{display:flex;align-items:center;justify-content:space-between;padding:1.15rem 1.25rem;border-bottom:1px solid #e1e8f2}
#catalog-delete-modal .atlas-modal__title{margin:0;font-size:1.2rem}
#catalog-delete-modal .atlas-modal__close{border:0;background:transparent;font-size:1.5rem;cursor:pointer;color:#607089}
#catalog-delete-modal .atlas-modal__body{padding:1.25rem}
#catalog-delete-modal .atlas-modal__body p{margin:.15rem 0 .75rem;line-height:1.5}
#catalog-delete-modal .atlas-text-muted{color:#607089;font-size:.95rem}
#catalog-delete-modal .atlas-modal__footer{display:flex;justify-content:flex-end;gap:.65rem;padding:1rem 1.25rem;border-top:1px solid #e1e8f2}

.supplier-price-modal[hidden] { display: none !important; }
.supplier-price-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.supplier-price-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .48);
}
.supplier-price-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(760px, 100%);
    max-height: min(80vh, 720px);
    overflow: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, .24);
}
.supplier-price-modal__header,
.supplier-price-modal__footer {
    display: flex;
    align-items: center;
    padding: 16px 20px;
}
.supplier-price-modal__header {
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #e2e8f0;
}
.supplier-price-modal__header h3 { margin: 0; }
.supplier-price-modal__body { padding: 20px; }
.supplier-price-modal__footer {
    justify-content: flex-end;
    border-top: 1px solid #e2e8f0;
}
body.supplier-price-modal-open { overflow: hidden; }

/* Espacement des panneaux sous les onglets.
   Évite notamment que « Raison sociale » soit collé à l’onglet Informations. */
.supplier-sheet-tabs + [id^="supplier-panel-"],
.supplier-sheet-tabs + form > [id^="supplier-panel-"],
[id^="supplier-panel-"] {
    margin-top: 1.5rem;
}

/* Fiche fournisseur : contenu plus aéré. */
#supplier-panel-information .bs-form-grid,
#supplier-panel-terms .bs-form-grid {
    column-gap: 3rem;
    row-gap: 1.5rem;
}

#supplier-panel-information .bs-field,
#supplier-panel-terms .bs-field {
    display: flex;
    flex-direction: column;
    gap: .45rem;
    margin: 0;
}

#supplier-panel-information .bs-field > span,
#supplier-panel-terms .bs-field > span {
    display: block;
    line-height: 1.3;
}

#supplier-panel-information .bs-field > strong,
#supplier-panel-terms .bs-field > strong {
    display: block;
    line-height: 1.45;
    min-height: 1.45rem;
}


/* Devis : sélection fournisseur / produit et import catalogue */
.quote-zone{border:1px solid #dbe5f2;border-radius:10px;padding:.85rem;margin-bottom:.8rem;background:#fff}
.quote-zone{grid-column:1 / -1;width:auto;min-width:0}
.quote-zone--procurement{background:#f8fbff}
.bs-quote-line>.remove-quote-line{grid-column:1 / -1;justify-self:start}
.quote-zone__title{font-size:.82rem;font-weight:700;color:#334155;margin-bottom:.65rem}
.bs-quote-line__sourcing{display:flex;align-items:center;gap:.4rem;flex-wrap:wrap;margin-bottom:.55rem}
.bs-quote-line__sourcing .atlas-button{min-height:34px;padding:.38rem .7rem;font-size:.82rem;font-weight:600;border-radius:7px}
.quote-purchase-info{display:inline-flex;align-items:center;height:34px;min-height:34px;box-sizing:border-box;padding:0 .7rem;border:1px solid #f1c2ca;border-radius:7px;background:#fff0f3;color:#8b2638;font-size:.82rem;font-weight:600;line-height:1;transform:translateY(4px)}
.quote-purchase-info:empty{display:none}
.quote-picker-modal{align-items:center;justify-content:center}
.quote-picker-dialog{position:relative;width:min(980px,calc(100vw - 2rem));max-height:85vh;display:flex;flex-direction:column}
.quote-picker-dialog--wide{width:min(1380px,calc(100vw - 1rem))}
.quote-picker-search{width:100%;box-sizing:border-box;margin:.5rem 0 1rem}
.quote-picker-table-wrap{overflow:auto;min-height:180px;max-height:55vh}
#quote-supplier-modal .quote-picker-table,
#quote-product-modal .quote-picker-table{width:100%;min-width:0;table-layout:auto}
#quote-supplier-modal .quote-picker-table th:first-child,
#quote-supplier-modal .quote-picker-table td:first-child,
#quote-product-modal .quote-picker-table th:first-child,
#quote-product-modal .quote-picker-table td:first-child{width:34px;min-width:34px;max-width:34px;padding-left:.35rem;padding-right:.35rem;text-align:center}
#quote-supplier-modal .quote-picker-table th:nth-child(2),
#quote-supplier-modal .quote-picker-table td:nth-child(2){width:34%}
#quote-supplier-modal .quote-picker-table th:nth-child(3),
#quote-supplier-modal .quote-picker-table td:nth-child(3){width:70px;white-space:nowrap}
#quote-supplier-modal .quote-picker-table th:nth-child(4),
#quote-supplier-modal .quote-picker-table td:nth-child(4){width:auto}
#quote-product-modal .quote-picker-table th:nth-child(2),
#quote-product-modal .quote-picker-table td:nth-child(2){width:190px;white-space:nowrap}
#quote-product-modal .quote-picker-table th:nth-child(3),
#quote-product-modal .quote-picker-table td:nth-child(3){width:auto}
#quote-product-modal .quote-picker-table th:nth-child(4),
#quote-product-modal .quote-picker-table td:nth-child(4){width:150px}
#quote-product-modal .quote-picker-table th:nth-child(5),
#quote-product-modal .quote-picker-table td:nth-child(5){width:105px;min-width:105px;white-space:nowrap}
#quote-product-modal .quote-picker-table th:nth-child(6),
#quote-product-modal .quote-picker-table td:nth-child(6){width:145px;min-width:145px;white-space:nowrap}
.quote-picker-table input[type="radio"]{width:18px;height:18px;margin:0;accent-color:#1769e0}
.quote-picker-table{border-collapse:separate;border-spacing:0}
.quote-picker-table thead{position:sticky;top:0;z-index:4}
.quote-picker-table thead th{position:sticky;top:0;z-index:5;background:#eef4fb;box-shadow:0 1px 0 #d7e1ee}
.quote-picker-table tbody tr{cursor:pointer}
.quote-picker-table tbody tr:hover{background:rgba(30,110,200,.06)}
.atlas-modal__actions{gap:.5rem}
.atlas-modal__actions .atlas-button{min-height:36px;padding:.42rem .8rem;font-size:.84rem}
.quote-procurement-row{display:flex;align-items:center;justify-content:space-between;gap:.75rem;flex-wrap:wrap}
.quote-procurement-info{display:inline-flex;align-items:center;min-height:34px;color:#68778b;font-size:.78rem}
.quote-procurement-quantity{display:flex;align-items:center;gap:.35rem}
.quote-procurement-quantity>span{font-size:.78rem;color:#475569;font-weight:600;margin-right:.15rem}
.quote-procurement-quantity input{width:72px;height:34px;box-sizing:border-box;text-align:center;border:1px solid #b9c9df;border-radius:7px}
.quote-procurement-quantity .atlas-icon-button{width:34px;height:34px;min-width:34px;font-size:1.05rem}
.quote-procurement-quantity[hidden]{display:none}
.bs-quote-line__numbers{align-items:start}
.quote-markup-field{align-self:start}
.quote-suggested-price{display:block;margin-top:.28rem;color:#68778b;font-size:.76rem;line-height:1.2}
@media(max-width:700px){.quote-picker-dialog,.quote-picker-dialog--wide{width:calc(100vw - 1rem);max-height:90vh}#quote-supplier-modal .quote-picker-table{min-width:650px}#quote-product-modal .quote-picker-table{min-width:820px}}
.quote-catalog-import-modal{z-index:100100!important}
.quote-catalog-import-dialog{position:relative;width:min(1500px,calc(100vw - 1rem));height:min(92vh,980px);max-height:92vh;display:flex;flex-direction:column;padding:1rem!important}
.quote-catalog-import-dialog>h2{flex:0 0 auto;margin:0 2.5rem .75rem 0}
.quote-catalog-import-frame{display:block;flex:1 1 auto;width:100%;min-height:0;border:0;border-radius:8px;background:#fff}
.supplier-catalog-import-embedded .bs-topbar,.supplier-catalog-import-embedded .bs-sidebar{display:none!important}
.supplier-catalog-import-embedded .bs-shell{padding-top:0!important;min-height:0!important;background:#fff!important}
.supplier-catalog-import-embedded .bs-main{margin-left:0!important;padding:0!important;max-width:none!important}
.supplier-catalog-import-embedded .bs-settings{max-width:none!important;margin:0!important}
.supplier-catalog-import-embedded .bs-settings-card{border:0!important;border-radius:0!important;box-shadow:none!important;padding:1rem!important}
@media(max-width:700px){.quote-catalog-import-dialog{width:calc(100vw - .5rem);height:94vh;max-height:94vh;padding:.5rem!important}}


/* Devis : fournisseur de la ligne d'approvisionnement */
.quote-supplier-control{display:inline-flex;align-items:center;gap:.3rem;min-width:0}
.quote-supplier-control .quote-select-supplier{min-width:0}
.quote-clear-line-supplier{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;flex:0 0 26px;padding:0;border:0;border-radius:50%;background:transparent;color:#64748b;font:700 1.15rem/1 inherit;cursor:pointer}
.quote-clear-line-supplier:hover{background:#fee2e2;color:#b91c1c}
.quote-clear-line-supplier[hidden]{display:none!important}

/* Devis : modale produit — état vide réellement centré et aéré */
#quote-product-modal .quote-picker-dialog {
    min-height: 470px;
}

#quote-product-modal .quote-picker-search {
    flex: 0 0 auto;
    margin-top: 1rem;
    margin-bottom: 1.25rem;
}

#quote-product-modal .quote-picker-table-wrap {
    flex: 1 1 auto;
    min-height: 250px;
    display: flex;
    flex-direction: column;
}

/* Le tableau reprend son comportement normal dès qu'il contient des produits. */
#quote-product-modal .quote-picker-table {
    flex: 0 0 auto;
}

/* Lorsque la liste est vide, le message occupe la zone centrale disponible. */
#quote-product-modal #quote-product-empty:not([hidden]) {
    flex: 1 1 auto;
    min-height: 210px;
    margin: 0;
    padding: 1.25rem 1rem 1.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Le pied de modale reste bien ancré en bas. */
#quote-product-modal .atlas-modal__actions {
    flex: 0 0 auto;
    margin-top: 1rem;
}

/* Devis : espace entre le texte de l'état vide et l'action d'import */
#quote-product-modal #quote-product-empty:not([hidden]) .atlas-button,
#quote-product-modal #quote-product-empty:not([hidden]) button,
#quote-product-modal #quote-product-empty:not([hidden]) a.atlas-button {
    margin-top: 16px;
}



/* Devis : remise client par ligne */
.quote-discount-type-field select{min-height:42px;box-sizing:border-box}
.quote-discount-value-field input:disabled{background:#f4f6f8;color:#94a3b8;cursor:not-allowed}
@media (max-width:1200px) and (min-width:901px){.bs-quote-line__numbers,.bs-quote-line[data-vat-enabled="0"] .bs-quote-line__numbers{grid-template-columns:repeat(4,minmax(0,1fr))}}

/* Devis : remise globale */
.quote-global-discount{
    margin-top:1rem;
    padding:1rem;
    border:1px solid #dbe5f2;
    border-radius:10px;
    background:#f8fbff;
}
.quote-global-discount__heading{
    display:flex;
    align-items:baseline;
    justify-content:space-between;
    gap:1rem;
    margin-bottom:.8rem;
}
.quote-global-discount__heading h2{
    margin:0;
    font-size:1rem;
}
.quote-global-discount__heading span{
    font-size:.82rem;
    color:#64748b;
}
.quote-global-discount__fields{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:.8rem;
}
#quote-global-discount-value:disabled{
    background:#f4f6f8;
    color:#94a3b8;
    cursor:not-allowed;
}
.quote-global-discount__computed input{
    font-weight:700;
}
@media (max-width:760px){
    .quote-global-discount__heading{align-items:flex-start;flex-direction:column;gap:.25rem}
    .quote-global-discount__fields{grid-template-columns:1fr}
}


/* AGDF — placement du composant Atlas Steps dans les documents */
.agdf-document-steps{margin:1.25rem 0 1.5rem;padding:1rem .5rem}
.agdf-document-steps--compact{margin:.85rem 0 .95rem;padding:.25rem 0;--atlas-steps-marker-size:1.65rem}
.agdf-document-steps--compact .atlas-steps__label{font-size:.78rem}
@media (max-width:40rem){.agdf-document-steps{padding:.5rem 0}.agdf-document-steps--compact .atlas-steps__item{min-height:3rem}}

/* Steps compacts — libellés longs (notamment allemand)
   On décale alternativement les libellés pour éviter leur chevauchement,
   sans modifier le composant Atlas lui-même. */
html[lang^="de"] .agdf-document-steps--compact{
    margin-bottom:1.35rem;
}

html[lang^="de"] .agdf-document-steps--compact .atlas-steps__content{
    width:100%;
    min-width:0;
}

html[lang^="de"] .agdf-document-steps--compact .atlas-steps__label{
    position:relative;
    display:block;
    width:100%;
    padding:0 .15rem;
    box-sizing:border-box;
    font-size:.72rem;
    line-height:1.15;
    white-space:nowrap;
}

html[lang^="de"] .agdf-document-steps--compact .atlas-steps__item:nth-child(even) .atlas-steps__label{
    transform:translateY(.9rem);
}

html[lang^="de"] .agdf-document-steps--compact .atlas-steps__item:nth-child(odd) .atlas-steps__label{
    transform:translateY(0);
}

/* Sur très petite largeur, Atlas passe vertical : plus besoin du décalage. */
@media (max-width:40rem){
    html[lang^="de"] .agdf-document-steps--compact{
        margin-bottom:.95rem;
    }

    html[lang^="de"] .agdf-document-steps--compact .atlas-steps__item:nth-child(even) .atlas-steps__label,
    html[lang^="de"] .agdf-document-steps--compact .atlas-steps__item:nth-child(odd) .atlas-steps__label{
        transform:none;
    }
}



/* Dashboard V2 — navigation par indicateurs */
.agdf-dashboard-recent-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.agdf-dashboard-recent-grid .agdf-dashboard-activity strong a{color:#1459d9;text-decoration:underline}
.agdf-dashboard-recent-grid .agdf-dashboard-activity strong a:hover{color:#0b3d91}
.agdf-dashboard-chart{margin-top:1rem}
.agdf-dashboard-chart-header{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap}
.agdf-dashboard-chart-header h2{margin:0;color:#182b49}
.agdf-dashboard-year-filter{display:inline-flex;align-items:center;gap:.5rem;margin:0;color:#182b49;font-weight:600}
.agdf-dashboard-year-filter select{min-width:7rem;width:auto}
.agdf-dashboard-chart-wrap{width:100%;overflow:hidden;margin-top:.75rem}
.agdf-dashboard-chart svg{display:block;width:100%;height:auto;min-height:220px}
.agdf-dashboard-chart svg line{stroke:#d9e1ec;stroke-width:1}
.agdf-dashboard-chart svg text{fill:#60748f;font-size:9px}
.agdf-dashboard-chart svg polyline{fill:none;stroke-width:2;stroke-linejoin:round;stroke-linecap:round}
.agdf-dashboard-chart-quotes{stroke:#2563eb}.agdf-dashboard-chart-invoices{stroke:#e11d48}
.agdf-dashboard-chart-legend{display:flex;gap:1rem;color:#182b49;font-size:.85rem;font-weight:600}
.agdf-dashboard-chart-legend-item{display:inline-flex;align-items:center;gap:.4rem}
.agdf-dashboard-chart-legend-swatch{display:inline-block;width:1.5rem;height:5px;border-radius:3px}
.agdf-dashboard-chart-legend-swatch-quotes,.agdf-dashboard-chart-point-quotes{background:#2563eb;fill:#2563eb}
.agdf-dashboard-chart-legend-swatch-invoices,.agdf-dashboard-chart-point-invoices{background:#e11d48;fill:#e11d48}
.agdf-dashboard-chart svg circle{stroke:#fff;stroke-width:1.5;cursor:pointer}.agdf-dashboard-chart svg rect{cursor:pointer}
.agdf-dashboard-chart-bar-quotes{fill:#2563eb}.agdf-dashboard-chart-bar-invoices{fill:#e11d48}
.agdf-dashboard-heading{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap}
.agdf-dashboard-tabs{display:flex;gap:.4rem;margin:1rem 0;padding:.35rem;border:1px solid #dbe3ef;border-radius:.75rem;background:#fff;overflow-x:auto;scrollbar-width:thin}
.agdf-dashboard-tab{flex:0 0 auto;padding:.65rem .9rem;border-radius:.55rem;color:#53657d;font-size:.9rem;font-weight:600;text-decoration:none;white-space:nowrap;transition:background .15s ease,color .15s ease}
.agdf-dashboard-tab:hover{background:#f1f5fb;color:#182b49}
.agdf-dashboard-tab.is-active{background:#1459d9;color:#fff}
.agdf-dashboard-tab-placeholder{margin-top:1rem;min-height:12rem;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center}
.agdf-dashboard-tab-placeholder h2{margin-bottom:.5rem;color:#182b49}
@media(max-width:800px){.agdf-dashboard-recent-grid{grid-template-columns:1fr}}
@media(max-width:700px){
 .bs-main.atlas-app-shell{width:100%;max-width:100%;min-width:0;margin-left:0;padding:1rem .75rem;box-sizing:border-box;overflow-x:hidden}
 .agdf-dashboard-heading,.agdf-dashboard-kpis,.agdf-dashboard-chart,.agdf-dashboard-grid,.agdf-dashboard-recent-grid{width:100%;max-width:100%;min-width:0;box-sizing:border-box}
 .agdf-dashboard-kpis,.agdf-dashboard-grid,.agdf-dashboard-recent-grid{grid-template-columns:1fr}
 .agdf-dashboard-chart-header{align-items:flex-start}.agdf-dashboard-chart-header h2{width:100%}
 .agdf-dashboard-year-filter,.agdf-dashboard-chart-legend{max-width:100%;flex-wrap:wrap}
 .agdf-dashboard-chart-wrap{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
 .agdf-dashboard-tabs{margin-inline:0}
}


/* Dashboard V2 — apparence de vrais onglets */
.agdf-dashboard-tabs{
    display:flex;
    align-items:flex-end;
    gap:0;
    margin:1.25rem 0 1.5rem;
    padding:0 .75rem;
    border-bottom:1px solid var(--atlas-color-border);
    overflow-x:auto;
    overflow-y:hidden;
}

.agdf-dashboard-tabs .atlas-button,
.agdf-dashboard-tabs a{
    position:relative;
    margin:0 0 -1px 0;
    border-radius:.65rem .65rem 0 0;
    border-bottom-color:var(--atlas-color-border);
    white-space:nowrap;
}

.agdf-dashboard-tabs .atlas-button + .atlas-button,
.agdf-dashboard-tabs a + a{
    margin-left:.18rem;
}

.agdf-dashboard-tabs .is-active,
.agdf-dashboard-tabs [aria-current="page"],
.agdf-dashboard-tabs [aria-selected="true"]{
    z-index:1;
    border-bottom-color:var(--atlas-color-surface);
    border-radius:.65rem .65rem 0 0;
}

@media (max-width:40rem){
    .agdf-dashboard-tabs{
        padding:0 .25rem;
    }

    .agdf-dashboard-tabs .atlas-button + .atlas-button,
    .agdf-dashboard-tabs a + a{
        margin-left:.1rem;
    }
}


/* Dashboard V2 — onglet Commercial */
.agdf-dashboard-section-heading{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:1rem;
    margin:0 0 1rem;
}
.agdf-dashboard-section-heading h2{margin:0 0 .25rem}
.agdf-dashboard-section-heading p{margin:0}
.agdf-dashboard-kpis--commercial{grid-template-columns:repeat(5,minmax(0,1fr))}
.agdf-commercial-rates{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}
.agdf-commercial-rate{padding:1rem;border:1px solid var(--atlas-color-border);border-radius:.6rem}
.agdf-commercial-rate span,.agdf-commercial-rate small{display:block}
.agdf-commercial-rate strong{display:block;margin:.35rem 0;font-size:1.7rem}
.agdf-commercial-rate small{color:var(--atlas-color-text-muted);line-height:1.35}
.agdf-commercial-pipeline{display:grid;gap:.85rem}
.agdf-commercial-pipeline-row>div:first-child{display:flex;justify-content:space-between;gap:1rem;margin-bottom:.3rem}
.agdf-commercial-pipeline-track{height:.5rem;overflow:hidden;border-radius:999px;background:var(--atlas-color-border)}
.agdf-commercial-pipeline-track>span{display:block;height:100%;min-width:0;background:var(--atlas-color-primary);border-radius:999px}
@media (max-width:64rem){
    .agdf-dashboard-kpis--commercial{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:40rem){
    .agdf-dashboard-section-heading{align-items:stretch;flex-direction:column}
    .agdf-dashboard-kpis--commercial{grid-template-columns:repeat(2,minmax(0,1fr))}
    .agdf-commercial-rates{grid-template-columns:1fr}
}


/* Dashboard V2 — Commercial : correction définitive tableaux + KPI responsive */
.agdf-commercial-amounts-wrap,
.agdf-commercial-clients-wrap{
    width:100%;
    max-width:100%;
    min-width:0;
    overflow-x:hidden;
}

.agdf-commercial-amounts-table,
.agdf-commercial-clients-table{
    min-width:0 !important;
    max-width:100%;
    table-layout:fixed;
}

/* Valeur des devis : 5 colonnes compactes, sans scroll horizontal. */
.agdf-commercial-amounts-table th,
.agdf-commercial-amounts-table td{
    padding:.48rem .45rem;
    white-space:normal;
    overflow-wrap:anywhere;
}
.agdf-commercial-amounts-table th:nth-child(1),
.agdf-commercial-amounts-table td:nth-child(1){width:12%}
.agdf-commercial-amounts-table th:nth-child(n+2),
.agdf-commercial-amounts-table td:nth-child(n+2){width:22%;text-align:right}

/* Clients : ne pas étirer artificiellement les deux colonnes sur toute la carte. */
.agdf-commercial-clients-table{
    width:min(100%, 34rem) !important;
}
.agdf-commercial-clients-table th:first-child,
.agdf-commercial-clients-table td:first-child{
    width:72% !important;
    text-align:left;
}
.agdf-commercial-clients-table th:nth-child(2),
.agdf-commercial-clients-table td:nth-child(2){
    width:28% !important;
    text-align:center !important;
}

/* Le breakpoint réel du shell AGDF est 700 px :
   on force donc ici la disposition des 5 KPI commerciaux. */
@media (max-width:700px){
    .agdf-dashboard-kpis.agdf-dashboard-kpis--commercial{
        display:grid !important;
        grid-template-columns:repeat(2,minmax(0,1fr)) !important;
        gap:.65rem !important;
        width:100% !important;
        max-width:100% !important;
        overflow:visible !important;
    }

    .agdf-dashboard-kpis--commercial > .agdf-dashboard-kpi{
        display:block !important;
        min-width:0 !important;
        width:auto !important;
        max-width:100% !important;
        margin:0 !important;
        padding:.8rem !important;
    }

    .agdf-dashboard-kpis--commercial > .agdf-dashboard-kpi:nth-child(5){
        grid-column:1 / -1 !important;
    }

    .agdf-commercial-amounts-table,
    .agdf-commercial-clients-table{
        width:100% !important;
        font-size:.78rem;
    }

    .agdf-commercial-amounts-table th,
    .agdf-commercial-amounts-table td,
    .agdf-commercial-clients-table th,
    .agdf-commercial-clients-table td{
        padding:.4rem .3rem;
    }
}

@media (max-width:380px){
    .agdf-dashboard-kpis.agdf-dashboard-kpis--commercial{
        grid-template-columns:1fr !important;
    }

    .agdf-dashboard-kpis--commercial > .agdf-dashboard-kpi:nth-child(5){
        grid-column:auto !important;
    }
}


/* Dashboard V2 — Commercial : les tableaux restent visibles en responsive.
   Les règles historiques .bs-table responsive masquent certaines parties ;
   on les neutralise explicitement pour ces deux tableaux. */
@media (max-width:700px){
    .agdf-commercial-amounts-wrap,
    .agdf-commercial-clients-wrap{
        display:block !important;
        width:100% !important;
        max-width:100% !important;
        min-width:0 !important;
        overflow:visible !important;
    }

    .agdf-commercial-amounts-table,
    .agdf-commercial-clients-table{
        display:table !important;
        width:100% !important;
        max-width:100% !important;
        min-width:0 !important;
        table-layout:fixed !important;
    }

    .agdf-commercial-amounts-table thead,
    .agdf-commercial-clients-table thead{
        display:table-header-group !important;
    }

    .agdf-commercial-amounts-table tbody,
    .agdf-commercial-clients-table tbody{
        display:table-row-group !important;
    }

    .agdf-commercial-amounts-table tr,
    .agdf-commercial-clients-table tr{
        display:table-row !important;
    }

    .agdf-commercial-amounts-table th,
    .agdf-commercial-amounts-table td,
    .agdf-commercial-clients-table th,
    .agdf-commercial-clients-table td{
        display:table-cell !important;
        visibility:visible !important;
        min-width:0 !important;
        white-space:normal !important;
        overflow-wrap:anywhere !important;
        font-size:.72rem !important;
        line-height:1.15 !important;
        padding:.38rem .22rem !important;
    }

    /* 5 colonnes du tableau Valeur des devis */
    .agdf-commercial-amounts-table th:nth-child(1),
    .agdf-commercial-amounts-table td:nth-child(1){
        width:12% !important;
        text-align:left !important;
    }

    .agdf-commercial-amounts-table th:nth-child(n+2),
    .agdf-commercial-amounts-table td:nth-child(n+2){
        width:22% !important;
        text-align:right !important;
    }

    /* 2 colonnes du tableau Clients */
    .agdf-commercial-clients-table th:first-child,
    .agdf-commercial-clients-table td:first-child{
        width:68% !important;
        text-align:left !important;
    }

    .agdf-commercial-clients-table th:nth-child(2),
    .agdf-commercial-clients-table td:nth-child(2){
        width:32% !important;
        text-align:center !important;
    }
}

@media (max-width:420px){
    .agdf-commercial-amounts-table th,
    .agdf-commercial-amounts-table td{
        font-size:.66rem !important;
        padding:.34rem .14rem !important;
    }

    .agdf-commercial-clients-table th,
    .agdf-commercial-clients-table td{
        font-size:.7rem !important;
        padding:.36rem .2rem !important;
    }
}


/* Dashboard V2 — onglet Facturation */
.agdf-dashboard-kpis--billing{grid-template-columns:repeat(5,minmax(0,1fr))}
.agdf-billing-amounts-panel{min-width:0;margin-top:1rem}
.agdf-billing-amounts-wrap{width:100%;max-width:100%;min-width:0;overflow-x:hidden}
.agdf-billing-amounts-table{width:100%;max-width:100%;min-width:0;table-layout:fixed;font-size:.86rem}
.agdf-billing-amounts-table th,.agdf-billing-amounts-table td{padding:.5rem .55rem;white-space:normal;overflow-wrap:anywhere}
.agdf-billing-amounts-table th:first-child,.agdf-billing-amounts-table td:first-child{width:12%;text-align:left}
.agdf-billing-amounts-table th:nth-child(n+2),.agdf-billing-amounts-table td:nth-child(n+2){width:22%;text-align:right}

@media (max-width:700px){
    .agdf-dashboard-kpis.agdf-dashboard-kpis--billing{
        display:grid !important;
        grid-template-columns:repeat(2,minmax(0,1fr)) !important;
        gap:.65rem !important;
        width:100% !important;
        overflow:visible !important;
    }
    .agdf-dashboard-kpis--billing>.agdf-dashboard-kpi{display:block!important;min-width:0!important;width:auto!important;margin:0!important;padding:.8rem!important}
    .agdf-dashboard-kpis--billing>.agdf-dashboard-kpi:nth-child(5){grid-column:1/-1!important}
    .agdf-billing-amounts-wrap{display:block!important;width:100%!important;overflow:visible!important}
    .agdf-billing-amounts-table{display:table!important;width:100%!important;min-width:0!important;table-layout:fixed!important;font-size:.72rem!important}
    .agdf-billing-amounts-table thead{display:table-header-group!important}
    .agdf-billing-amounts-table tbody{display:table-row-group!important}
    .agdf-billing-amounts-table tr{display:table-row!important}
    .agdf-billing-amounts-table th,.agdf-billing-amounts-table td{display:table-cell!important;visibility:visible!important;min-width:0!important;padding:.38rem .22rem!important;white-space:normal!important;overflow-wrap:anywhere!important;line-height:1.15!important}
}
@media (max-width:380px){
    .agdf-dashboard-kpis.agdf-dashboard-kpis--billing{grid-template-columns:1fr!important}
    .agdf-dashboard-kpis--billing>.agdf-dashboard-kpi:nth-child(5){grid-column:auto!important}
    .agdf-billing-amounts-table{font-size:.66rem!important}
}

/* Dashboard V2 — Achats & Fournisseurs */
.agdf-dashboard-kpis--purchases{grid-template-columns:repeat(5,minmax(0,1fr))}
.agdf-purchase-currency-list{display:grid;gap:.65rem}
.agdf-purchase-currency-list>div{display:flex;justify-content:space-between;gap:1rem;padding:.65rem .75rem;border:1px solid var(--atlas-color-border);border-radius:.5rem}
.agdf-purchase-table-wrap,.agdf-supplier-table-wrap{width:100%;max-width:100%;min-width:0;overflow-x:hidden}
.agdf-purchase-table,.agdf-supplier-table{width:100%!important;max-width:100%;min-width:0!important;table-layout:fixed;font-size:.84rem}
.agdf-purchase-table th,.agdf-purchase-table td,.agdf-supplier-table th,.agdf-supplier-table td{padding:.48rem .45rem;white-space:normal;overflow-wrap:anywhere}
.agdf-purchase-table th:first-child,.agdf-purchase-table td:first-child{width:16%;text-align:left}
.agdf-purchase-table th:nth-child(n+2),.agdf-purchase-table td:nth-child(n+2){width:28%;text-align:right}
.agdf-supplier-table{width:min(100%,34rem)!important}
.agdf-supplier-table th:first-child,.agdf-supplier-table td:first-child{width:72%!important;text-align:left}
.agdf-supplier-table th:nth-child(2),.agdf-supplier-table td:nth-child(2){width:28%!important;text-align:center!important}
@media(max-width:700px){
 .agdf-dashboard-kpis.agdf-dashboard-kpis--purchases{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:.65rem!important;width:100%!important;overflow:visible!important}
 .agdf-dashboard-kpis--purchases>.agdf-dashboard-kpi{display:block!important;min-width:0!important;width:auto!important;margin:0!important;padding:.8rem!important}
 .agdf-dashboard-kpis--purchases>.agdf-dashboard-kpi:nth-child(5){grid-column:1/-1!important}
 .agdf-purchase-table-wrap,.agdf-supplier-table-wrap{display:block!important;width:100%!important;overflow:visible!important}
 .agdf-purchase-table,.agdf-supplier-table{display:table!important;width:100%!important;min-width:0!important;table-layout:fixed!important;font-size:.7rem!important}
 .agdf-purchase-table thead,.agdf-supplier-table thead{display:table-header-group!important}
 .agdf-purchase-table tbody,.agdf-supplier-table tbody{display:table-row-group!important}
 .agdf-purchase-table tr,.agdf-supplier-table tr{display:table-row!important}
 .agdf-purchase-table th,.agdf-purchase-table td,.agdf-supplier-table th,.agdf-supplier-table td{display:table-cell!important;visibility:visible!important;min-width:0!important;padding:.36rem .2rem!important;white-space:normal!important;overflow-wrap:anywhere!important}
}
@media(max-width:380px){
 .agdf-dashboard-kpis.agdf-dashboard-kpis--purchases{grid-template-columns:1fr!important}
 .agdf-dashboard-kpis--purchases>.agdf-dashboard-kpi:nth-child(5){grid-column:auto!important}
}

/* Dashboard V2 — Marges */
.agdf-margin-currency-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(18rem,1fr));gap:1rem;margin-bottom:1rem}.agdf-margin-currency-card{min-width:0}.agdf-margin-currency-title{font-size:1.15rem;font-weight:700;margin-bottom:.8rem}.agdf-margin-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}.agdf-margin-metrics>div{min-width:0;padding:.7rem;border:1px solid var(--atlas-color-border);border-radius:.5rem}.agdf-margin-metrics span,.agdf-margin-metrics strong{display:block}.agdf-margin-metrics span{font-size:.78rem;color:var(--atlas-color-text-muted);margin-bottom:.25rem}.agdf-margin-table-wrap{width:100%;max-width:100%;min-width:0;overflow-x:hidden}.agdf-margin-table{width:100%!important;min-width:0!important;table-layout:fixed;font-size:.76rem}.agdf-margin-table th,.agdf-margin-table td{padding:.42rem .25rem;white-space:normal;overflow-wrap:anywhere}.agdf-margin-formula{padding:.9rem;border:1px solid var(--atlas-color-border);border-radius:.55rem}.agdf-margin-formula p{margin:.6rem 0 0;color:var(--atlas-color-text-muted)}@media(max-width:700px){.agdf-margin-currency-cards{grid-template-columns:1fr}.agdf-margin-table-wrap{display:block!important;width:100%!important;overflow:visible!important}.agdf-margin-table{display:table!important;width:100%!important;min-width:0!important;table-layout:fixed!important;font-size:.62rem!important}.agdf-margin-table thead{display:table-header-group!important}.agdf-margin-table tbody{display:table-row-group!important}.agdf-margin-table tr{display:table-row!important}.agdf-margin-table th,.agdf-margin-table td{display:table-cell!important;visibility:visible!important;min-width:0!important;padding:.3rem .1rem!important;white-space:normal!important;overflow-wrap:anywhere!important}}@media(max-width:380px){.agdf-margin-metrics{grid-template-columns:1fr}}


/* Dashboard V2 — Alertes */
.agdf-dashboard-kpis--alerts{
    grid-template-columns:repeat(4,minmax(0,1fr));
}
.agdf-alerts-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:1rem;
    margin:1rem 0;
}
.agdf-alert-card{
    display:grid;
    grid-template-columns:2.7rem minmax(0,1fr) auto;
    align-items:center;
    gap:.85rem;
    min-width:0;
    color:inherit;
    text-decoration:none;
    transition:transform .15s ease, box-shadow .15s ease;
}
.agdf-alert-card:hover{
    transform:translateY(-1px);
}
.agdf-alert-card__icon{
    display:flex;
    align-items:center;
    justify-content:center;
    width:2.7rem;
    height:2.7rem;
    border-radius:50%;
    background:var(--atlas-color-surface);
    border:1px solid var(--atlas-color-border);
}
.agdf-alert-card__body{
    min-width:0;
}
.agdf-alert-card__body span,
.agdf-alert-card__body strong,
.agdf-alert-card__body small{
    display:block;
}
.agdf-alert-card__body span{
    font-weight:600;
}
.agdf-alert-card__body strong{
    margin:.15rem 0;
    font-size:1.55rem;
}
.agdf-alert-card__body small{
    color:var(--atlas-color-text-muted);
    line-height:1.3;
}
.agdf-alert-card__arrow{
    color:var(--atlas-color-text-muted);
}
.agdf-alert-card--danger{
    border-left:4px solid var(--atlas-color-danger);
}
.agdf-alert-card--warning{
    border-left:4px solid var(--atlas-color-warning);
}
.agdf-alert-card--info{
    border-left:4px solid var(--atlas-color-primary);
}
.agdf-alerts-note{
    margin-top:1rem;
}
.agdf-alerts-note p{
    margin-bottom:0;
    color:var(--atlas-color-text-muted);
}
@media(max-width:700px){
    .agdf-dashboard-kpis.agdf-dashboard-kpis--alerts{
        display:grid!important;
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
        gap:.65rem!important;
        width:100%!important;
        overflow:visible!important;
    }
    .agdf-dashboard-kpis--alerts>.agdf-dashboard-kpi{
        display:block!important;
        min-width:0!important;
        width:auto!important;
        margin:0!important;
        padding:.8rem!important;
    }
    .agdf-alerts-grid{
        grid-template-columns:1fr;
    }
}
@media(max-width:380px){
    .agdf-dashboard-kpis.agdf-dashboard-kpis--alerts{
        grid-template-columns:1fr!important;
    }
    .agdf-alert-card{
        grid-template-columns:2.35rem minmax(0,1fr) auto;
        gap:.65rem;
    }
    .agdf-alert-card__icon{
        width:2.35rem;
        height:2.35rem;
    }
}


/* Fiche fournisseur — historique des catalogues : action sous le message. */
.supplier-catalog-import-button{
    display:flex!important;
    width:max-content!important;
    margin-top:.75rem!important;
    margin-left:0!important;
    margin-right:auto!important;
}


/* ==========================================================================
   AGDF — fiche fournisseur / Informations en mode consultation
   Une donnée = une ligne compacte "Libellé : valeur".
   ========================================================================== */
.supplier-info-grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    column-gap:2.5rem!important;
    row-gap:0!important;
    margin-top:1rem!important;
}
.supplier-info-row{
    display:grid;
    grid-template-columns:minmax(11.5rem,auto) 1rem minmax(0,1fr);
    align-items:baseline;
    min-height:2.65rem;
    padding:.45rem 0;
}
.supplier-info-row__label{
    font-weight:400;
    min-width:0;
}
.supplier-info-row__separator{
    text-align:center;
}
.supplier-info-row__value{
    min-width:0;
    overflow-wrap:anywhere;
    font-weight:700;
}
.supplier-info-row__value.is-empty{
    font-weight:400;
    opacity:.65;
}
@media (max-width:48rem){
    .supplier-info-grid{
        grid-template-columns:1fr!important;
        column-gap:0!important;
    }
    .supplier-info-row{
        grid-template-columns:minmax(9.5rem,auto) 1rem minmax(0,1fr);
        min-height:2.4rem;
    }
}


/* Fiche fournisseur — Informations : supprimer l'espacement vertical inutile. */
.supplier-info-grid{
    row-gap:0!important;
}
.supplier-info-row{
    min-height:0!important;
    padding:.18rem 0!important;
    line-height:1.35!important;
}
@media (max-width:48rem){
    .supplier-info-row{
        min-height:0!important;
        padding:.18rem 0!important;
    }
}

/* ==========================================================================
   AGDF — STANDARD FINAL DES BOUTONS D'ACTION
   Référence validée : SMALL / Retour vert Atlas / PDF orange.
   Placé en fin de fichier pour neutraliser les anciennes règles historiques.
   ========================================================================== */

/* Tous les boutons texte Atlas restent au format SMALL validé. */
.atlas-button,
button.atlas-button,
a.atlas-button,
input.atlas-button,
.bs-toolbar .atlas-button,
.bs-settings-card .atlas-button,
.bs-settings-card > .atlas-toolbar__end .atlas-button{
    box-sizing:border-box!important;
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
    height:38px!important;
    min-height:38px!important;
    max-height:38px!important;
    padding:.45rem .8rem!important;
    margin-top:0;
    font-size:.875rem!important;
    line-height:1.2!important;
    border-radius:6px!important;
    vertical-align:middle!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center!important;
    white-space:nowrap;
}

/* Une action de retour est toujours verte Atlas. */
.atlas-button.agdf-button--back,
a.atlas-button.agdf-button--back,
button.atlas-button.agdf-button--back,
.bs-settings-card a.atlas-button.agdf-button--back,
.bs-toolbar a.atlas-button.agdf-button--back{
    background:#168044!important;
    border-color:#168044!important;
    color:#fff!important;
}

.atlas-button.agdf-button--back:hover,
a.atlas-button.agdf-button--back:hover,
button.atlas-button.agdf-button--back:hover,
.bs-settings-card a.atlas-button.agdf-button--back:hover,
.bs-toolbar a.atlas-button.agdf-button--back:hover{
    background:#126d3a!important;
    border-color:#126d3a!important;
    color:#fff!important;
}

/* Identité visuelle dédiée aux exports PDF : orange Atlas. */
.atlas-button.agdf-button--pdf,
a.atlas-button.agdf-button--pdf,
button.atlas-button.agdf-button--pdf,
.bs-settings-card a.atlas-button.agdf-button--pdf,
.bs-toolbar a.atlas-button.agdf-button--pdf{
    background:#c97712!important;
    border-color:#c97712!important;
    color:#fff!important;
}

.atlas-button.agdf-button--pdf:hover,
a.atlas-button.agdf-button--pdf:hover,
button.atlas-button.agdf-button--pdf:hover,
.bs-settings-card a.atlas-button.agdf-button--pdf:hover,
.bs-toolbar a.atlas-button.agdf-button--pdf:hover{
    background:#ad650f!important;
    border-color:#ad650f!important;
    color:#fff!important;
}

/* Les formulaires inline ne doivent jamais modifier la hauteur de leur bouton. */
.agdf-inline-form{
    display:inline-flex!important;
    align-items:center!important;
    margin:0!important;
}

/* ==========================================================================
   AGDF — ONGLET CANONIQUE FINAL
   Dashboard + fiche fournisseur : onglets rapprochés, sans cadre extérieur.
   ========================================================================== */

/* Dashboard */
.agdf-dashboard-tabs{
    display:flex!important;
    align-items:flex-end!important;
    gap:0!important;
    margin:1.25rem 0 1.5rem!important;
    padding:0!important;
    border:0!important;
    border-bottom:1px solid #d4deec!important;
    border-radius:0!important;
    background:transparent!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
}

.agdf-dashboard-tabs .agdf-dashboard-tab,
.agdf-dashboard-tabs .atlas-button,
.agdf-dashboard-tabs a{
    flex:0 0 auto!important;
    width:auto!important;
    min-width:0!important;
    height:38px!important;
    min-height:38px!important;
    max-height:38px!important;
    margin:0 0 -1px 0!important;
    padding:0 .85rem!important;
    border:1px solid transparent!important;
    border-bottom-color:#d4deec!important;
    border-radius:.65rem .65rem 0 0!important;
    background:transparent!important;
    color:#53657d!important;
    box-shadow:none!important;
    white-space:nowrap!important;
}

.agdf-dashboard-tabs .agdf-dashboard-tab + .agdf-dashboard-tab,
.agdf-dashboard-tabs .atlas-button + .atlas-button,
.agdf-dashboard-tabs a + a{
    margin-left:0!important;
}

.agdf-dashboard-tabs .agdf-dashboard-tab:hover,
.agdf-dashboard-tabs .atlas-button:hover,
.agdf-dashboard-tabs a:hover{
    background:#f3f7ff!important;
    color:#182b49!important;
}

.agdf-dashboard-tabs .agdf-dashboard-tab.is-active,
.agdf-dashboard-tabs .is-active,
.agdf-dashboard-tabs [aria-current="page"],
.agdf-dashboard-tabs [aria-selected="true"]{
    z-index:1!important;
    background:#2764e8!important;
    border-color:#2764e8!important;
    border-bottom-color:#2764e8!important;
    color:#fff!important;
}

/* Fiche fournisseur */
.supplier-sheet-tabs{
    margin:1.25rem 0 0!important;
}

.supplier-sheet-tabs .atlas-tabs__list{
    display:flex!important;
    align-items:flex-end!important;
    flex-wrap:nowrap!important;
    gap:0!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-bottom:1px solid #d4deec!important;
    border-radius:0!important;
    background:transparent!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
}

.supplier-sheet-tabs .atlas-tabs__tab{
    flex:0 0 auto!important;
    box-sizing:border-box!important;
    width:auto!important;
    min-width:0!important;
    height:38px!important;
    min-height:38px!important;
    max-height:38px!important;
    margin:0 0 -1px 0!important;
    padding:0 .85rem!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:.45rem!important;
    border:1px solid #d4deec!important;
    border-bottom-color:#d4deec!important;
    border-radius:.65rem .65rem 0 0!important;
    background:#fff!important;
    color:#172b4d!important;
    box-shadow:none!important;
    text-decoration:none!important;
    white-space:nowrap!important;
}

.supplier-sheet-tabs .atlas-tabs__tab + .atlas-tabs__tab{
    margin-left:-1px!important;
}

.supplier-sheet-tabs .atlas-tabs__tab:hover{
    position:relative!important;
    z-index:1!important;
    background:#f3f7ff!important;
}

.supplier-sheet-tabs .atlas-tabs__tab[aria-selected="true"],
.supplier-sheet-tabs .atlas-tabs__tab--active{
    position:relative!important;
    z-index:2!important;
    background:#2764e8!important;
    border-color:#2764e8!important;
    color:#fff!important;
}

.supplier-sheet-tabs .atlas-tabs__tab::after{
    display:none!important;
}

@media (max-width:40rem){
    .agdf-dashboard-tabs .agdf-dashboard-tab,
    .agdf-dashboard-tabs .atlas-button,
    .agdf-dashboard-tabs a,
    .supplier-sheet-tabs .atlas-tabs__tab{
        padding-left:.7rem!important;
        padding-right:.7rem!important;
    }
}

/* Dashboard — centrage vertical du texte dans les onglets */
.agdf-dashboard-tabs .agdf-dashboard-tab,
.agdf-dashboard-tabs .atlas-button,
.agdf-dashboard-tabs a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Dashboard — séparateurs verticaux entre les onglets */
.agdf-dashboard-tabs .agdf-dashboard-tab,
.agdf-dashboard-tabs .atlas-button,
.agdf-dashboard-tabs a {
    border-left: 1px solid #d4deec !important;
    border-right: 1px solid #d4deec !important;
}

/* Évite de doubler la bordure entre deux onglets */
.agdf-dashboard-tabs .agdf-dashboard-tab + .agdf-dashboard-tab,
.agdf-dashboard-tabs .atlas-button + .atlas-button,
.agdf-dashboard-tabs a + a {
    margin-left: -1px !important;
}

/* L'onglet actif conserve son contour bleu */
.agdf-dashboard-tabs .agdf-dashboard-tab.is-active,
.agdf-dashboard-tabs .is-active,
.agdf-dashboard-tabs [aria-current="page"],
.agdf-dashboard-tabs [aria-selected="true"] {
    border-color: #2764e8 !important;
}

/* Fournisseurs — actions de l'onglet Contacts */
.supplier-contact-actions{
    display:flex;
    align-items:flex-start;
    gap:.5rem;
    flex-wrap:wrap;
    margin-top:.75rem;
}
.supplier-contact-actions .supplier-contact-editor{
    margin:0;
}


/* Fournisseurs — ajout manuel d'un contact en modale */
.supplier-contact-modal__dialog{
    width:min(42rem,calc(100vw - 2rem));
    max-width:42rem;
}
.supplier-contact-modal__grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:.8rem 1rem;
}
.supplier-contact-modal__wide{
    grid-column:1 / -1;
}
.supplier-contact-modal__checks{
    display:flex;
    align-items:center;
    gap:1.25rem;
    flex-wrap:wrap;
    margin-top:1rem;
}
.supplier-contact-check{
    display:inline-flex;
    align-items:center;
    gap:.45rem;
    cursor:pointer;
}
.supplier-contact-check input[type="checkbox"]{
    appearance:auto!important;
    -webkit-appearance:checkbox!important;
    width:1rem!important;
    min-width:1rem!important;
    max-width:1rem!important;
    height:1rem!important;
    min-height:1rem!important;
    max-height:1rem!important;
    margin:0!important;
    padding:0!important;
}
.agdf-modal-open{
    overflow:hidden;
}
@media (max-width:40rem){
    .supplier-contact-modal__grid{
        grid-template-columns:1fr;
    }
    .supplier-contact-modal__wide{
        grid-column:auto;
    }
}


/* Import contacts fournisseur — retour en haut à droite */
.supplier-contact-import-header{
    display:flex!important;
    align-items:flex-start!important;
    justify-content:space-between!important;
    gap:1rem!important;
}
.supplier-contact-import-header .atlas-toolbar__end{
    margin-left:auto!important;
    align-self:flex-start!important;
}
.supplier-contact-import-empty-modal{
    display:flex;
}

.agdf-import-error-code{
    display:block;
    margin-top:.35rem;
    opacity:.7;
    font-size:.75rem;
}

/* Fiche fournisseur — actions par onglet */
.supplier-row-actions,.supplier-tab-actions{display:flex;align-items:center;justify-content:flex-end;gap:.35rem}
.supplier-row-actions form{display:inline-flex;margin:0}
.supplier-tab-actions{margin:.25rem 0 .65rem}
.supplier-contact-card__header{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}
.supplier-contact-card__header h3{margin-top:0}
.supplier-contact-line{display:flex;align-items:center;gap:.5rem;min-height:2rem;margin:.35rem 0}
.supplier-contact-flag{display:block;object-fit:cover;flex:0 0 auto}
.supplier-mail-action{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border-radius:50%;color:#2563eb;background:#eef4ff;text-decoration:none}
.supplier-mail-action svg,.supplier-row-actions svg,.supplier-tab-actions svg{width:1rem;height:1rem;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.supplier-edit-modal[hidden]{display:none!important}
.supplier-edit-modal{position:fixed;inset:0;z-index:10050;display:flex;align-items:center;justify-content:center;padding:1rem}
.supplier-edit-modal .atlas-modal__backdrop{position:absolute;inset:0;background:rgba(20,35,60,.38)}
.supplier-edit-modal .atlas-modal__dialog{position:relative;z-index:1;background:#fff;border-radius:.85rem;box-shadow:0 20px 60px rgba(20,35,60,.25);max-height:calc(100vh - 2rem);overflow:auto}

/* E-mail direct depuis un contact fournisseur */
button.supplier-mail-action{border:0;cursor:pointer;font:inherit}
.supplier-mail-form{display:grid;gap:1rem}
.supplier-mail-message{min-height:12rem;resize:vertical;line-height:1.45}

/* Contact fournisseur - état d'envoi SMTP */
.supplier-mail-submit{display:inline-flex;align-items:center;justify-content:center;gap:.5rem}
.supplier-mail-submit__spinner{display:none;width:1rem;height:1rem;box-sizing:border-box;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:agdfSupplierMailSpin .7s linear infinite}
.supplier-mail-submit.is-sending .supplier-mail-submit__spinner{display:inline-block}
.supplier-mail-submit:disabled{cursor:wait;opacity:.82}
@keyframes agdfSupplierMailSpin{to{transform:rotate(360deg)}}


/* Fournisseurs — modales Banque : préserver le premier libellé sous l'en-tête */
#supplier-panel-bank .supplier-edit-modal .atlas-modal__header{
    margin-bottom:.75rem;
}
#supplier-panel-bank .supplier-edit-modal .atlas-modal__body{
    overflow:visible;
}
#supplier-panel-bank .supplier-edit-modal .supplier-contact-modal__grid{
    padding-top:.15rem;
}


/* Fournisseurs — carte bancaire complète */
.supplier-bank-card__details{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    column-gap:2rem;
    row-gap:.55rem;
    margin-top:1rem;
}
.supplier-bank-card__details>div{
    min-width:0;
    line-height:1.4;
}
.supplier-bank-card__details strong{
    color:#182b49;
}
.supplier-bank-card__details span:not(.supplier-bank-badge){
    overflow-wrap:anywhere;
}
.supplier-bank-card__status{
    display:flex;
    align-items:center;
    gap:.45rem;
    flex-wrap:wrap;
}
.supplier-bank-badge{
    display:inline-flex;
    align-items:center;
    min-height:1.5rem;
    padding:.1rem .5rem;
    border:1px solid #b9cae3;
    border-radius:999px;
    background:#f5f8fc;
    color:#40536e;
    font-size:.82rem;
    font-weight:600;
}
@media (max-width:700px){
    .supplier-bank-card__details{grid-template-columns:1fr}
}


/* Fournisseurs — édition des informations générales */
.supplier-information-modal__dialog{
    width:min(48rem,calc(100vw - 2rem));
    max-width:48rem;
}
#supplier-panel-information{
    position:relative;
}
#supplier-panel-information>.supplier-tab-actions{
    position:absolute;
    top:.15rem;
    right:.15rem;
    z-index:2;
}
#supplier-panel-information>.supplier-info-grid{
    padding-right:2.5rem;
}
@media (max-width:700px){
    .supplier-information-modal__dialog{width:min(100%,calc(100vw - 2rem))}
    #supplier-panel-information>.supplier-info-grid{padding-right:0;padding-top:2.5rem}
}


/* Fournisseurs — téléphone de la fiche : drapeau, appel et WhatsApp */
.supplier-phone-display{
    display:inline-flex!important;
    align-items:center;
    gap:.45rem;
    flex-wrap:wrap;
}
.supplier-phone-display__flag{
    width:24px;
    height:16px;
    object-fit:cover;
    border-radius:2px;
    box-shadow:0 0 0 1px rgba(24,43,73,.12);
}
.supplier-phone-action{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:1.55rem;
    height:1.55rem;
    border-radius:50%;
    text-decoration:none;
}
.supplier-phone-action svg{
    width:1rem;
    height:1rem;
    fill:none;
    stroke:currentColor;
    stroke-width:1.8;
    stroke-linecap:round;
    stroke-linejoin:round;
}
.supplier-phone-action--call{color:#2563eb}
.supplier-phone-action--whatsapp{color:#16a34a}


/* =========================================================
   UTILISATEURS — CARDS
   ========================================================= */
.agdf-users-header{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1rem;flex-wrap:wrap}
.agdf-users-header .bs-section-title{margin-bottom:.25rem}
.agdf-user-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:1rem;margin-top:1rem}
.agdf-user-card{display:flex;flex-direction:column;justify-content:space-between;gap:1rem;min-height:128px;padding:1rem;border:1px solid #d7e0ec;border-radius:10px;background:#fff}
.agdf-user-card.is-disabled{opacity:.68}
.agdf-user-card__top{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem}
.agdf-user-card__top h2{margin:0 0 .3rem;font-size:1rem;color:#182b49}
.agdf-user-card__email{font-size:.88rem;color:#5d6d82;overflow-wrap:anywhere}
.agdf-user-card__footer{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding-top:.75rem;border-top:1px solid #e5ebf2}
.agdf-user-active-form{margin:0}
.agdf-user-switch{display:inline-flex;align-items:center;gap:.55rem;font-size:.86rem;color:#334a68;cursor:pointer}
.agdf-user-switch:has(.atlas-switch:disabled){cursor:not-allowed;opacity:.7}
.agdf-user-edit-dialog{width:min(520px,calc(100vw - 2rem))}
.agdf-user-edit-fields{display:grid;gap:1rem}
@media(max-width:700px){.agdf-user-grid{grid-template-columns:1fr}.agdf-users-header{align-items:stretch}.agdf-users-header>.atlas-button{width:100%}}


/* =========================================================
   Statistiques V2 — mise en page et lisibilité
   ========================================================= */

.statistics-v2 {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.statistics-v2-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.statistics-v2-head h1,
.statistics-v2-head h2 {
    margin: 0 0 6px;
}

.statistics-v2-subtitle {
    margin: 0;
    color: #667085;
}

.statistics-v2-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 14px;
}

.statistics-v2-tabs {
    margin-top: 4px;
}

.statistics-v2-tab-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 34px;
    margin: 2px 0 0;
}

.statistics-v2-panel {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.statistics-v2-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(145px, 1fr));
    gap: 14px;
}

.statistics-v2-kpi {
    min-height: 92px;
    padding: 16px 18px;
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 14px;
}

.statistics-v2-kpi > i {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: #eef4ff;
    color: #245fc7;
}

.statistics-v2-kpi > div {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.statistics-v2-kpi span {
    color: #667085;
    font-size: .88rem;
    line-height: 1.25;
}

.statistics-v2-kpi strong {
    color: #102a4c;
    font-size: 1.32rem;
    line-height: 1.15;
}

.statistics-v2-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.statistics-v2-block {
    padding: 22px;
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    background: #fff;
}

.statistics-v2-block > h2,
.statistics-v2-block > h3 {
    margin: 0 0 18px;
    color: #102a4c;
}

.statistics-v2-wide {
    grid-column: 1 / -1;
}

.statistics-v2-rates,
.statistics-v2-pipeline {
    display: grid;
    gap: 10px;
}

.statistics-v2-rates > div,
.statistics-v2-pipeline > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 18px;
    padding: 9px 0;
    border-bottom: 1px solid #edf1f6;
}

.statistics-v2-rates > div:last-child,
.statistics-v2-pipeline > div:last-child {
    border-bottom: 0;
}

.statistics-v2-rates span,
.statistics-v2-pipeline span {
    color: #475467;
}

.statistics-v2-rates strong,
.statistics-v2-pipeline strong {
    color: #102a4c;
    white-space: nowrap;
    font-size: 1.04rem;
}

.statistics-v2-note {
    margin: 14px 0 0;
    color: #667085;
    line-height: 1.55;
}

.statistics-v2-table {
    width: 100%;
}

.statistics-v2-table th,
.statistics-v2-table td {
    padding: 11px 12px;
    vertical-align: middle;
}

.statistics-v2-table th {
    white-space: nowrap;
}

.statistics-v2-coming {
    min-height: 220px;
    justify-content: center;
    align-items: center;
    text-align: center;
}

@media (max-width: 1180px) {
    .statistics-v2-kpis {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
    }
}

@media (max-width: 820px) {
    .statistics-v2 {
        gap: 18px;
    }

    .statistics-v2-head {
        flex-direction: column;
    }

    .statistics-v2-kpis,
    .statistics-v2-grid {
        grid-template-columns: 1fr;
    }

    .statistics-v2-kpi {
        min-height: 78px;
    }

    .statistics-v2-block {
        padding: 18px;
    }

    .statistics-v2-tab-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .statistics-v2-kpis {
        grid-template-columns: 1fr;
    }

    .statistics-v2-block {
        padding: 15px;
    }
}


/* =========================================================
   Statistiques V2 — tableaux par devise (revue consolidée)
   ========================================================= */
.statistics-v2-table--commercial-currency,
.statistics-v2-table--billing-currency,
.statistics-v2-table--purchases-currency {
    width: 100%;
    table-layout: fixed;
}

.statistics-v2-table--commercial-currency th,
.statistics-v2-table--commercial-currency td,
.statistics-v2-table--billing-currency th,
.statistics-v2-table--billing-currency td,
.statistics-v2-table--purchases-currency th,
.statistics-v2-table--purchases-currency td {
    white-space: nowrap;
}

/* Devise volontairement compacte : 8 %. */
.statistics-v2-table--commercial-currency th:nth-child(1),
.statistics-v2-table--commercial-currency td:nth-child(1),
.statistics-v2-table--billing-currency th:nth-child(1),
.statistics-v2-table--billing-currency td:nth-child(1),
.statistics-v2-table--purchases-currency th:nth-child(1),
.statistics-v2-table--purchases-currency td:nth-child(1) {
    width: 8%;
}

/* Commercial : 8 + 18 + 18 + 19 + 17 + 20 = 100 */
.statistics-v2-table--commercial-currency th:nth-child(2) { width: 18%; }
.statistics-v2-table--commercial-currency th:nth-child(3) { width: 18%; }
.statistics-v2-table--commercial-currency th:nth-child(4) { width: 19%; }
.statistics-v2-table--commercial-currency th:nth-child(5) { width: 17%; }
.statistics-v2-table--commercial-currency th:nth-child(6) { width: 20%; }

/* Facturation : 8 + 14 + 13 + 17 + 13 + 17 + 18 = 100 */
.statistics-v2-table--billing-currency th:nth-child(2) { width: 14%; }
.statistics-v2-table--billing-currency th:nth-child(3) { width: 13%; }
.statistics-v2-table--billing-currency th:nth-child(4) { width: 17%; }
.statistics-v2-table--billing-currency th:nth-child(5) { width: 13%; }
.statistics-v2-table--billing-currency th:nth-child(6) { width: 17%; }
.statistics-v2-table--billing-currency th:nth-child(7) { width: 18%; }

/* Achats : 8 + 30 + 30 + 32 = 100 */
.statistics-v2-table--purchases-currency th:nth-child(2) { width: 30%; }
.statistics-v2-table--purchases-currency th:nth-child(3) { width: 30%; }
.statistics-v2-table--purchases-currency th:nth-child(4) { width: 32%; }

/* Devise à gauche, valeurs à droite. */
.statistics-v2-table--commercial-currency th:not(:first-child),
.statistics-v2-table--commercial-currency td:not(:first-child),
.statistics-v2-table--billing-currency th:not(:first-child),
.statistics-v2-table--billing-currency td:not(:first-child),
.statistics-v2-table--purchases-currency th:not(:first-child),
.statistics-v2-table--purchases-currency td:not(:first-child) {
    text-align: right;
}

/* Les wrappers ne créent pas de scrollbar sur desktop. */
@media (min-width: 761px) {
    .statistics-v2-table--commercial-currency,
    .statistics-v2-table--billing-currency,
    .statistics-v2-table--purchases-currency {
        min-width: 0 !important;
    }
}

@media (max-width: 760px) {
    .statistics-v2-table--commercial-currency,
    .statistics-v2-table--billing-currency,
    .statistics-v2-table--purchases-currency {
        table-layout: auto;
        min-width: max-content;
    }
}


/* Statistiques V2 — Marges : meilleures marges par devis */
.statistics-v2-table--margins-quotes {
    width: 100%;
    table-layout: fixed;
    min-width: 0 !important;
}

.statistics-v2-table--margins-quotes th,
.statistics-v2-table--margins-quotes td {
    white-space: nowrap;
}

.statistics-v2-table--margins-quotes th:nth-child(1) { width: 15%; }
.statistics-v2-table--margins-quotes th:nth-child(2) { width: 10%; }
.statistics-v2-table--margins-quotes th:nth-child(3) { width: 19%; }
.statistics-v2-table--margins-quotes th:nth-child(4) { width: 18%; }
.statistics-v2-table--margins-quotes th:nth-child(5) { width: 19%; }
.statistics-v2-table--margins-quotes th:nth-child(6) { width: 19%; }

.statistics-v2-table--margins-quotes th:nth-child(n+3),
.statistics-v2-table--margins-quotes td:nth-child(n+3) {
    text-align: right;
}

@media (max-width: 760px) {
    .statistics-v2-table--margins-quotes {
        table-layout: auto;
        min-width: max-content !important;
    }
}


/* Rapport — synthèse par statut */
.report-status-summary {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid #dbe3ee;
}

.report-status-summary__title {
    margin: 0 0 16px;
}

.report-status-summary__table {
    width: 100%;
    table-layout: fixed;
}

.report-status-summary__table th:nth-child(1) { width: 38%; }
.report-status-summary__table th:nth-child(2) { width: 14%; }
.report-status-summary__table th:nth-child(3) { width: 16%; }
.report-status-summary__table th:nth-child(4) { width: 32%; }

.report-status-summary__count {
    text-align: center;
}

.report-status-summary__amount {
    text-align: right;
    white-space: nowrap;
}

.report-status-summary__total td {
    font-weight: 700;
    background: #f5f8fc;
    border-top: 2px solid #c8d6e8;
}


/* Fournisseurs > Catalogue — ajustement spécifique allemand */
.supplier-products-table--de {
    width: 100%;
    table-layout: fixed;
}

.supplier-products-table--de th {
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.15;
    padding-left: .65rem;
    padding-right: .65rem;
}

.supplier-products-table--de td {
    overflow-wrap: anywhere;
    padding-left: .65rem;
    padding-right: .65rem;
}

.supplier-products-table--de th:nth-child(1) { width: 16%; }
.supplier-products-table--de th:nth-child(2) { width: 15%; }
.supplier-products-table--de th:nth-child(3) { width: 7%; }
.supplier-products-table--de th:nth-child(4) { width: 11%; }
.supplier-products-table--de th:nth-child(5) { width: 9%; }
.supplier-products-table--de th:nth-child(6) { width: 12%; }
.supplier-products-table--de th:nth-child(7) { width: 12%; }
.supplier-products-table--de th:nth-child(8) { width: 11%; }
.supplier-products-table--de th:nth-child(9) { width: 7%; }

.supplier-products-table--de .atlas-table__actions {
    white-space: nowrap;
}

@media (max-width: 760px) {
    .supplier-products-table--de {
        width: max-content;
        min-width: 100%;
        table-layout: auto;
    }
}


/* Paramètres — traduction des contenus PDF */
.agdf-pdf-translation-card{
    margin:1rem 0;
    padding:1rem 1.1rem;
    border:1px solid #d9e2ef;
    border-radius:.75rem;
    background:#f8fafc;
}
.agdf-pdf-translation-card__head{
    margin-bottom:.9rem;
}
.agdf-pdf-translation-card__head h3{
    margin:0 0 .35rem;
    font-size:1rem;
    font-weight:700;
    color:#182b49;
}
.agdf-pdf-translation-card__head p{
    margin:0;
    max-width:70rem;
    color:#667085;
    font-size:.9rem;
    line-height:1.45;
}
.agdf-pdf-translation-card__options{
    display:flex;
    flex-direction:column;
    gap:.75rem;
}
.agdf-pdf-translation-card__options .bs-check{
    margin:0;
}


/* AGDF — archives des sociétés */
.bs-archives-table-wrap {
    overflow-x: auto;
    margin-top: 1rem;
}
.bs-archives-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 860px;
}
.bs-archives-table th,
.bs-archives-table td {
    padding: .75rem;
    border-bottom: 1px solid var(--atlas-border, #dfe3e8);
    text-align: left;
    vertical-align: middle;
}
.bs-archives-table th {
    font-weight: 700;
}
.bs-archive-status {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: .25rem .55rem;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 700;
}
.bs-archive-status.is-deleted {
    background: rgba(185, 28, 28, .10);
    color: #991b1b;
}
.bs-archive-status.is-active {
    background: rgba(21, 128, 61, .10);
    color: #166534;
}
.bs-archives-empty {
    margin: 1rem 0;
}


/* Dashboard V2 — Commercial : tableaux compacts sans défilement horizontal */
.agdf-commercial-amounts-table{width:100%!important;min-width:0!important;table-layout:fixed!important}
.agdf-commercial-amounts-table th,.agdf-commercial-amounts-table td{padding:.46rem .38rem!important;white-space:nowrap!important}
.agdf-commercial-amounts-table th:nth-child(1),.agdf-commercial-amounts-table td:nth-child(1){width:10%!important;text-align:left!important}
.agdf-commercial-amounts-table th:nth-child(n+2),.agdf-commercial-amounts-table td:nth-child(n+2){width:22.5%!important;text-align:right!important}
.agdf-commercial-clients-table{width:100%!important;min-width:0!important;table-layout:fixed!important}
.agdf-commercial-clients-table th,.agdf-commercial-clients-table td{padding:.46rem .38rem!important}
.agdf-commercial-clients-table th:nth-child(1),.agdf-commercial-clients-table td:nth-child(1){width:64%!important;text-align:left!important}
.agdf-commercial-clients-table th:nth-child(2),.agdf-commercial-clients-table td:nth-child(2),.agdf-commercial-clients-table th:nth-child(3),.agdf-commercial-clients-table td:nth-child(3){width:18%!important;text-align:center!important;white-space:nowrap!important}
@media(max-width:700px){
 .agdf-commercial-amounts-wrap,.agdf-commercial-clients-wrap{overflow-x:hidden!important}
 .agdf-commercial-amounts-table{font-size:.70rem!important}
 .agdf-commercial-amounts-table th,.agdf-commercial-amounts-table td{padding:.36rem .18rem!important}
 .agdf-commercial-clients-table{font-size:.76rem!important}
 .agdf-commercial-clients-table th,.agdf-commercial-clients-table td{padding:.38rem .2rem!important}
 .agdf-commercial-clients-table th:nth-child(1),.agdf-commercial-clients-table td:nth-child(1){width:58%!important}
 .agdf-commercial-clients-table th:nth-child(2),.agdf-commercial-clients-table td:nth-child(2),.agdf-commercial-clients-table th:nth-child(3),.agdf-commercial-clients-table td:nth-child(3){width:21%!important}
}


/* Topbar - alerte des besoins d'achat à commander */
.bs-topbar-purchase-alert {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
}
.bs-topbar-purchase-alert svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.bs-topbar-purchase-alert__badge {
    position: absolute;
    top: 2px;
    right: 1px;
    min-width: 15px;
    height: 15px;
    padding: 0 4px;
    border-radius: 999px;
    background: #c62828;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    line-height: 15px;
    text-align: center;
}

/* AGDF - compteurs d'onglets : contour uniforme */
.supplier-tabs .atlas-badge,
.supplier-tabs .supplier-tab__count,
.supplier-tabs [class*="count"],
.purchase-tabs .atlas-badge,
.po-tabs .atlas-badge {
    border: 1px solid #334155 !important;
}


/* =========================================================
   SEQUORIA — IDENTITÉ ÉDITEUR
   ========================================================= */
.bs-auth-publisher {
    display:flex;
    justify-content:center;
    margin:0 auto 1.15rem;
}

.bs-auth-publisher img {
    display:block;
    width:min(270px,82%);
    height:auto;
    object-fit:contain;
}

.bs-about-sequoria-logo {
    display:block;
    width:180px;
    max-width:42%;
    height:auto;
    object-fit:contain;
    flex:0 0 auto;
}

.bs-about-footer a {
    color:#0f7f9f;
    font-weight:600;
    text-decoration:none;
}

.bs-about-footer a:hover {
    text-decoration:underline;
}

@media (max-width:520px) {
    .bs-about-brand {
        align-items:flex-start;
    }

    .bs-about-sequoria-logo {
        width:130px;
        max-width:40%;
    }

    .bs-about-footer {
        align-items:flex-start;
        gap:.8rem;
        flex-direction:column;
    }
}


/* SEQUORIA — navigation latérale : modules défilants + pied fixe */
.bs-sidebar {
    display:flex;
    flex-direction:column;
    overflow:hidden;
}

.bs-sidebar > h2 {
    flex:0 0 auto;
}

.bs-sidebar > nav {
    flex:1 1 auto;
    min-height:0;
    overflow-y:auto;
    overflow-x:hidden;
    scrollbar-width:thin;
    scrollbar-color:rgba(255,255,255,.28) transparent;
}

.bs-sidebar > nav::-webkit-scrollbar {
    width:5px;
}

.bs-sidebar > nav::-webkit-scrollbar-thumb {
    background:rgba(255,255,255,.28);
    border-radius:999px;
}

.bs-sidebar-footer {
    flex:0 0 auto;
    margin-top:.45rem;
    padding-top:.55rem;
    border-top:1px solid rgba(255,255,255,.16);
}

.bs-sidebar-footer .bs-about-trigger {
    display:flex;
    align-items:center;
    gap:.55rem;
    margin-top:0;
    padding:.55rem .8rem;
}

.bs-about-trigger-icon {
    flex:0 0 auto;
    line-height:1;
}

.bs-sidebar-publisher {
    display:block;
    margin-top:.15rem;
    color:rgba(255,255,255,.62);
    font-size:.68rem;
    font-weight:400;
    letter-spacing:.035em;
    line-height:1.2;
}

.bs-sidebar.is-collapsed .bs-sidebar-footer {
    border-top-color:rgba(255,255,255,.12);
}

.bs-sidebar.is-collapsed .bs-about-trigger {
    justify-content:center;
    padding:.65rem 0;
}

/* SEQUORIA — footer de sidebar et contact éditeur */
.bs-sidebar-footer {
    padding-bottom:3.25rem;
}
.bs-sidebar-footer .bs-about-trigger + .bs-about-trigger {
    margin-top:.15rem;
}
.bs-contact-trigger { width:100%; }
.bs-contact-dialog { width:min(620px,calc(100vw - 2rem)); }
.bs-contact-brand { display:flex; align-items:center; gap:1rem; padding-right:2rem; margin-bottom:1.15rem; }
.bs-contact-brand img { width:170px; max-width:38%; height:auto; object-fit:contain; }
.bs-contact-brand h2 { margin:0 0 .25rem; }
.bs-contact-brand p { margin:0; }
.bs-contact-form { display:grid; gap:1rem; }
.bs-contact-form textarea { resize:vertical; min-height:150px; }
.bs-contact-actions { display:flex; justify-content:flex-end; gap:.65rem; align-items:center; }
.bs-contact-submit { display:inline-flex; align-items:center; justify-content:center; gap:.5rem; }
.bs-contact-submit:disabled { opacity:1; cursor:wait; }
.bs-contact-spinner { display:none; width:15px; height:15px; border:2px solid rgba(255,255,255,.45); border-top-color:#fff; border-radius:50%; animation:bs-contact-spin .7s linear infinite; }
.bs-contact-submit.is-loading .bs-contact-spinner { display:inline-block; }
.bs-contact-status { margin:0; padding:.7rem .85rem; border-radius:8px; }
.bs-contact-status.is-success { background:#eaf8f1; color:#176a48; }
.bs-contact-status.is-error { background:#fff0f1; color:#a32632; }
@keyframes bs-contact-spin { to { transform:rotate(360deg); } }
@media (max-width:520px) {
    .bs-contact-brand { align-items:flex-start; }
    .bs-contact-brand img { width:125px; }
    .bs-contact-actions { flex-direction:column-reverse; align-items:stretch; }
}

/* SEQUORIA — footer éditeur : couleurs des icônes
   1er bouton = À propos ; 2e bouton = Contacter Sequoria */
.bs-sidebar-footer .bs-about-trigger:nth-of-type(1) .bs-about-trigger-icon {
    color:#10bfd1 !important;
}

.bs-sidebar-footer .bs-about-trigger:nth-of-type(2) .bs-about-trigger-icon {
    color:#7bdc19 !important;
}

/* Les SVG utilisent la couleur de l'icône au lieu du blanc du bouton. */
.bs-sidebar-footer .bs-about-trigger .bs-about-trigger-icon svg {
    stroke:currentColor !important;
    color:inherit !important;
}

/* On conserve le poids visuel validé. */
.bs-sidebar-footer .bs-about-trigger-icon {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:22px;
    min-width:22px;
    font-size:18px;
    font-weight:800;
    line-height:1;
    -webkit-text-stroke:.45px currentColor;
}


/* AGDF — Login multi-organisation V2 */
.bs-auth-choice-intro {
    margin: 0 0 1rem;
    line-height: 1.5;
    text-align: center;
}

.bs-auth-organization-list {
    display: grid;
    gap: .65rem;
}

.bs-auth-organization-choice {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .85rem .95rem;
    border: 1px solid var(--atlas-border, #d9e0e7);
    border-radius: 10px;
    cursor: pointer;
    background: #fff;
}

.bs-auth-organization-choice:has(input:checked) {
    border-color: var(--atlas-primary, #167c80);
    box-shadow: 0 0 0 1px var(--atlas-primary, #167c80);
}

.bs-auth-organization-choice input {
    margin-top: .25rem;
    flex: 0 0 auto;
}

.bs-auth-organization-content {
    display: grid;
    gap: .18rem;
    min-width: 0;
}

.bs-auth-organization-content strong {
    font-size: .98rem;
}

.bs-auth-organization-content span,
.bs-auth-organization-content small {
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.bs-auth-organization-content span {
    font-size: .86rem;
}

.bs-auth-organization-content small {
    opacity: .72;
}


/* AGDF subscriptions — plan picker and topbar badge */
.bs-plan-picker{border:0;padding:0;margin:1rem 0}.bs-plan-picker legend{font-weight:800;margin-bottom:.25rem}.bs-plan-picker__help,.bs-plan-picker__note{margin:.25rem 0 .75rem;color:#5f6f7c;font-size:.88rem}.bs-plan-picker__grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem}.bs-plan-choice{position:relative;cursor:pointer}.bs-plan-choice input{position:absolute;opacity:0;pointer-events:none}.bs-plan-choice__body{display:flex;min-height:108px;flex-direction:column;gap:.25rem;padding:.8rem;border:1px solid #cfdbe5;border-radius:14px;background:#fff}.bs-plan-choice input:checked+.bs-plan-choice__body{border-color:#11b7c8;box-shadow:0 0 0 2px rgba(17,183,200,.12)}.bs-plan-choice__price{font-size:1.05rem;font-weight:800;color:#123d4d}.bs-plan-choice small{color:#60717e;line-height:1.3}.bs-subscription-badge{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;flex:0 0 36px;border-radius:50%;font-size:.88rem;font-weight:900;color:#fff;border:2px solid rgba(255,255,255,.9);box-shadow:0 2px 8px rgba(15,55,70,.22);line-height:1}.bs-subscription-badge--trial{background:#10aebe}.bs-subscription-badge--basic{background:#2f6fe4}.bs-subscription-badge--pro{background:#075f78}.bs-subscription-badge--business{background:#21845f;font-size:1.18rem}@media(max-width:640px){.bs-plan-picker__grid{grid-template-columns:1fr}}


/* AGDF — inscription compacte + affichage mot de passe */
.bs-password-field{position:relative;display:block;width:100%}
.bs-password-field .atlas-field__input{padding-right:3rem!important}
.bs-password-toggle{position:absolute;right:.55rem;top:50%;transform:translateY(-50%);display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;padding:0;border:0;border-radius:50%;background:transparent;color:#53657a;cursor:pointer}
.bs-password-toggle:hover{background:#eef4fb;color:#123d4d}
.bs-password-toggle:focus-visible{outline:2px solid #11b7c8;outline-offset:2px}
.bs-password-eye{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.bs-password-eye--hide{display:none}.bs-password-toggle.is-visible .bs-password-eye--show{display:none}.bs-password-toggle.is-visible .bs-password-eye--hide{display:block}
@media (min-width:900px){
  .bs-auth-card--registration{width:min(960px,calc(100vw - 3rem));padding:1.5rem 2rem}
  .bs-auth-card--registration .bs-auth-publisher{margin-bottom:.65rem}
  .bs-auth-card--registration .bs-auth-publisher img{width:min(235px,70%)}
  .bs-auth-card--registration h1{margin:.35rem 0;font-size:2.25rem}
  .bs-auth-card--registration .bs-auth-subtitle{margin:.25rem 0 1rem}
  .bs-auth-card--registration .bs-auth-form{gap:.8rem}
  .bs-registration-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(390px,1.12fr);gap:2rem;align-items:start}
  .bs-registration-details{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem 1rem}
  .bs-registration-details > .bs-field:first-child,.bs-registration-details > .bs-field:nth-child(2),.bs-registration-details > .bs-field:nth-child(3),.bs-registration-details > .bs-field:nth-child(6),.bs-registration-details > .bs-field:nth-child(7){grid-column:1/-1}
  .bs-registration-offers{min-width:0}
  .bs-registration-offers .bs-plan-picker{margin:0}
  .bs-plan-choice__body{min-height:96px}
}
@media (max-width:899px){.bs-registration-layout{display:grid;gap:1rem}.bs-registration-details{display:grid;gap:1rem}}

/* AGDF — compte existant + détails des offres */
.bs-registration-passwords{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem 1rem;grid-column:1/-1}
.bs-registration-passwords--single{grid-template-columns:1fr}
.bs-account-status{grid-column:1/-1;margin:-.25rem 0 .15rem;font-size:.82rem;line-height:1.35;color:#60717e}
.bs-account-status.is-existing{color:#0f6f78;font-weight:700}.bs-account-status.is-new{color:#52606d}
.bs-plan-choice__heading{display:flex;align-items:center;justify-content:space-between;gap:.5rem}
.bs-plan-info{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;flex:0 0 24px;border:1px solid #11b7c8;border-radius:50%;background:#fff;color:#087d92;font:800 14px/1 Georgia,serif;cursor:pointer}
.bs-plan-info:hover,.bs-plan-info:focus-visible{background:#e9f9fb;outline:none;box-shadow:0 0 0 2px rgba(17,183,200,.18)}
.bs-plan-modal[hidden]{display:none}.bs-plan-modal{position:fixed;inset:0;z-index:5000;display:grid;place-items:center;padding:1rem}.bs-plan-modal__backdrop{position:absolute;inset:0;background:rgba(15,35,48,.48);backdrop-filter:blur(2px)}
.bs-plan-modal__dialog{position:relative;z-index:1;width:min(520px,calc(100vw - 2rem));max-height:calc(100vh - 2rem);overflow:auto;padding:1.5rem 1.6rem;border-radius:18px;background:#fff;box-shadow:0 24px 70px rgba(10,36,50,.25)}
.bs-plan-modal__dialog h2{margin:0 2.25rem .25rem 0;color:#123d4d}.bs-plan-modal__price{margin:.15rem 0 1rem;font-size:1.12rem;font-weight:800;color:#087d92}.bs-plan-modal__detail{display:grid;gap:.55rem;color:#465c6b;line-height:1.5}.bs-plan-modal__detail p{margin:0;padding-bottom:.5rem;border-bottom:1px solid #e3ebf0}.bs-plan-modal__detail p:last-child{border-bottom:0;padding-bottom:0}
.bs-plan-modal__close{position:absolute;top:.8rem;right:.9rem;width:32px;height:32px;border:0;border-radius:50%;background:transparent;color:#53657a;font-size:1.65rem;line-height:1;cursor:pointer}.bs-plan-modal__close:hover{background:#eef4f7}.bs-modal-open{overflow:hidden}
@media(max-width:640px){.bs-registration-passwords{grid-template-columns:1fr}}


/* Lot 05 - données de démonstration (switch isolé du switch historique AGDF) */
.bs-demo-option{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:14px;padding:13px 15px;border:1px solid rgba(15,118,110,.18);border-radius:12px;background:rgba(20,184,166,.055)}
.bs-demo-option[hidden]{display:none!important}.bs-demo-option__copy{display:flex;flex-direction:column;gap:3px}.bs-demo-option__copy strong{font-size:.92rem}.bs-demo-option__copy small{line-height:1.35;color:var(--atlas-text-muted,#64748b)}
.bs-demo-toggle{position:relative;display:inline-flex;align-items:center;flex:0 0 auto;cursor:pointer}.bs-demo-toggle input{position:absolute;opacity:0;width:1px;height:1px}.bs-demo-toggle__track{display:block;width:42px;height:24px;border-radius:999px;background:#cbd5e1;padding:3px;transition:background .18s ease,box-shadow .18s ease}.bs-demo-toggle__thumb{display:block;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(15,23,42,.25);transition:transform .18s ease}.bs-demo-toggle input:checked+.bs-demo-toggle__track{background:#0f766e;box-shadow:0 0 0 1px rgba(15,118,110,.08)}.bs-demo-toggle input:checked+.bs-demo-toggle__track .bs-demo-toggle__thumb{transform:translateX(18px)}.bs-demo-toggle input:focus-visible+.bs-demo-toggle__track{outline:3px solid rgba(20,184,166,.25);outline-offset:2px}

/* Lot 05 - Correctif 03 : compte AGDF existant + switch demo */
.bs-registration-passwords [data-password-confirmation-field][hidden] {
    display: none !important;
}
.bs-demo-toggle input:checked + .bs-demo-toggle__track {
    background: #16a34a;
    box-shadow: 0 0 0 1px rgba(22, 163, 74, .12);
}
.bs-demo-toggle input:focus-visible:checked + .bs-demo-toggle__track {
    outline-color: rgba(22, 163, 74, .28);
}

/* Lot 05 - centrage strict du bouton du switch de démonstration */
.bs-demo-toggle__track {
    box-sizing: border-box;
    display: flex;
    align-items: center;
}
.bs-demo-toggle__thumb {
    flex: 0 0 18px;
}
.bs-demo-data-management {
    margin-top: 1.25rem;
}
.bs-demo-badge{display:inline-flex;align-items:center;margin-left:.35rem;padding:.1rem .42rem;border-radius:999px;background:#dcfce7;color:#166534;font-size:.68rem;font-weight:700;line-height:1.35;vertical-align:middle}


/* AGDF - Correctif ergonomie Lot 05 : switch démo */
.bs-demo-option .bs-switch__track{position:relative;display:inline-flex;align-items:center;}
.bs-demo-option .bs-switch__thumb{position:absolute;top:50%;transform:translateY(-50%);}
.bs-demo-option .bs-switch input:checked + .bs-switch__track{background:#198754!important;border-color:#198754!important;}

/* Relances : recherche + filtre de statut et colonne de suivi. */
.bs-reminder-search {
    display:flex;
    align-items:center;
    gap:.75rem;
}
.bs-reminder-search .atlas-search {
    flex:1 1 auto;
}
.bs-reminder-status-filter {
    flex:0 0 210px;
    min-height:42px;
}
.bs-reminder-search + .bs-table-wrap .bs-table th:nth-child(1),.bs-reminder-search + .bs-table-wrap .bs-table td:nth-child(1){width:19%}
.bs-reminder-search + .bs-table-wrap .bs-table th:nth-child(2),.bs-reminder-search + .bs-table-wrap .bs-table td:nth-child(2){width:17%}
.bs-reminder-search + .bs-table-wrap .bs-table th:nth-child(3),.bs-reminder-search + .bs-table-wrap .bs-table td:nth-child(3){width:14%}
.bs-reminder-search + .bs-table-wrap .bs-table th:nth-child(4),.bs-reminder-search + .bs-table-wrap .bs-table td:nth-child(4){width:11%}
.bs-reminder-search + .bs-table-wrap .bs-table th:nth-child(5),.bs-reminder-search + .bs-table-wrap .bs-table td:nth-child(5){width:16%}
.bs-reminder-search + .bs-table-wrap .bs-table th:nth-child(6),.bs-reminder-search + .bs-table-wrap .bs-table td:nth-child(6){width:15%;white-space:nowrap}
.bs-reminder-search + .bs-table-wrap .bs-table th:nth-child(7),.bs-reminder-search + .bs-table-wrap .bs-table td:nth-child(7){width:8%;white-space:nowrap}
.bs-reminder-item__status{margin-top:.65rem;display:flex;justify-content:space-between;gap:1rem}
@media (max-width: 760px){.bs-reminder-search{align-items:stretch;flex-direction:column}.bs-reminder-status-filter{flex-basis:auto;width:100%}}

/* Relances : respiration entre les filtres et le tableau. */
.bs-reminder-search{margin-bottom:16px;}
.invoice-action-pdf{font-size:.62rem;font-weight:800;letter-spacing:-.03em;line-height:1;color:#c0392b;}

/* Catalogue fournisseur — actions lisibles et switch actif/inactif */
.supplier-product-card .atlas-icon-button{width:2.15rem;height:2.15rem;min-width:2.15rem}
.supplier-product-card .atlas-icon-button svg{width:1.35rem;height:1.35rem}
.supplier-product-toggle-form{display:inline-flex;margin:0}
.supplier-product-switch{appearance:none;border:0;background:transparent;padding:.25rem;margin:0;cursor:pointer;border-radius:999px;line-height:1}
.supplier-product-switch__track{position:relative;display:block;width:2.65rem;height:1.45rem;border:2px solid #64748b;border-radius:999px;background:#e5e7eb;transition:.15s}
.supplier-product-switch__thumb{position:absolute;top:50%;left:.16rem;width:.95rem;height:.95rem;border-radius:50%;background:#64748b;transform:translateY(-50%);transition:.15s}
.supplier-product-switch.is-active .supplier-product-switch__track{border-color:#2563eb;background:#dbeafe}
.supplier-product-switch.is-active .supplier-product-switch__thumb{left:1.32rem;background:#2563eb}
.supplier-product-switch:focus-visible{outline:2px solid #2563eb;outline-offset:2px}


/* ==========================================================================
   Catalogue fournisseur — état visuel final
   Même $active que le badge Actif/Inactif de la card.
   ========================================================================== */
.supplier-product-card form.supplier-product-toggle-form {
    display: inline-flex !important;
    align-items: center !important;
    margin: 0 !important;
}

.supplier-product-card .supplier-product-switch {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 3rem !important;
    height: 2.25rem !important;
    padding: .3rem !important;
    border: 0 !important;
    background: transparent !important;
    cursor: pointer !important;
}

.supplier-product-card .supplier-product-switch__track {
    position: relative !important;
    display: block !important;
    width: 2.55rem !important;
    height: 1.4rem !important;
    box-sizing: border-box !important;
    border-radius: 999px !important;
    transition: none !important;
}

.supplier-product-card .supplier-product-switch__thumb {
    position: absolute !important;
    top: 50% !important;
    width: .92rem !important;
    height: .92rem !important;
    border-radius: 50% !important;
    transform: translateY(-50%) !important;
    transition: none !important;
}

/* INACTIF : gris, rond à gauche */
.supplier-product-card .supplier-product-switch[data-active="0"] .supplier-product-switch__track {
    border: 2px solid #94a3b8 !important;
    background: #e5e7eb !important;
}
.supplier-product-card .supplier-product-switch[data-active="0"] .supplier-product-switch__thumb {
    left: .17rem !important;
    right: auto !important;
    background: #64748b !important;
}

/* ACTIF : bleu, rond blanc à droite */
.supplier-product-card .supplier-product-switch[data-active="1"] .supplier-product-switch__track {
    border: 2px solid #2563eb !important;
    background: #2563eb !important;
}
.supplier-product-card .supplier-product-switch[data-active="1"] .supplier-product-switch__thumb {
    left: auto !important;
    right: .17rem !important;
    background: #fff !important;
}

/* Toutes les autres actions du catalogue ont la même boîte et la même taille. */
.supplier-product-card .atlas-icon-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 2.25rem !important;
    height: 2.25rem !important;
    min-width: 2.25rem !important;
    padding: .3rem !important;
}

.supplier-product-card .atlas-icon-button svg {
    display: block !important;
    width: 1.5rem !important;
    height: 1.5rem !important;
    min-width: 1.5rem !important;
    min-height: 1.5rem !important;
}


/* Catalogue fournisseur — icône historique harmonisée avec les actions */
.supplier-product-card .fa-clock-rotate-left,
.supplier-product-card [class*="clock-rotate-left"] {
    font-size: 1.5rem;
    line-height: 1;
}

.supplier-product-card__actions .supplier-history-clock {
    display: inline-block;
    width: auto;
    height: auto;
    font-size: 1.5rem;
    line-height: 1;
    color: inherit;
}


/* Catalogue fournisseur — historique SVG, indépendant de Font Awesome */
.supplier-product-card__actions .supplier-history-clock {
    display: block;
    width: 1.55rem;
    height: 1.55rem;
    fill: currentColor;
    color: inherit;
}

/* Catalogue fournisseur — action principale en haut à droite */
.supplier-products-add-reference {
    float: right;
    margin-top: .35rem;
    margin-right: 0;
    margin-bottom: 1rem;
    margin-left: 1.5rem;
}
@media (max-width: 700px) {
    .supplier-products-add-reference {
        float: none;
        display: inline-flex;
        margin: .75rem 0 1rem;
    }
}

/* Catalogue fournisseur — bouton Ajouter une référence sur sa propre ligne */
#supplier-panel-catalog .supplier-products-header {
    width: 100%;
    margin-bottom: 1rem;
}
#supplier-panel-catalog .supplier-products-header__action {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    margin: .9rem 0 1.1rem;
}
#supplier-panel-catalog .supplier-products-header__content h2 {
    margin: 0 0 .55rem;
}
#supplier-panel-catalog .supplier-products-header__content p {
    margin: 0;
}
@media (max-width: 700px) {
    #supplier-panel-catalog .supplier-products-header__action {
        justify-content: flex-start;
    }
}


/* =========================================================
   AGDF — ICÔNE PDF GLOBALE (CORRECTION CUMULATIVE)
   Le SVG file-pdf est plein et ne doit pas hériter de fill:none.
   ========================================================= */
.agdf-icon-pdf {
    color: #b42318 !important;
}
.agdf-icon-pdf .agdf-pdf-svg,
.atlas-icon-button .agdf-pdf-svg,
.bs-actions .atlas-icon-button .agdf-pdf-svg,
.bs-table .atlas-icon-button .agdf-pdf-svg {
    display: block !important;
    width: 1.55rem !important;
    height: 1.55rem !important;
    min-width: 1.55rem !important;
    min-height: 1.55rem !important;
    fill: currentColor !important;
    stroke: none !important;
    stroke-width: 0 !important;
    opacity: 1 !important;
}
.bs-invoice-detail-actions .bs-invoice-detail-action > svg {
    width: 1.65rem !important;
    height: 1.65rem !important;
    min-width: 1.65rem !important;
    min-height: 1.65rem !important;
}

/* Cards clients — même gabarit visuel que Devis / Factures. */
.bs-client-card .bs-actions .atlas-icon-button svg {
    width: 1.55rem !important;
    height: 1.55rem !important;
    min-width: 1.55rem !important;
    min-height: 1.55rem !important;
}

/* Conditions de paiement — même gabarit d'action. */
.payment-terms-table .atlas-icon-button {
    width: 2rem;
    height: 2rem;
    padding: .225rem;
    font-size: 1.55rem;
    line-height: 1;
}
.payment-terms-table .atlas-icon-button svg {
    width: 1.55rem !important;
    height: 1.55rem !important;
    min-width: 1.55rem !important;
    min-height: 1.55rem !important;
}


/* =========================================================
   AGDF — DÉTAIL FACTURE : HARMONISATION RETOUR / VALIDATION
   Ajustement visuel local uniquement. PDF, A et L inchangés.
   ========================================================= */
.bs-invoice-detail-actions .bs-invoice-detail-action:first-child > svg {
    width: 1.75rem !important;
    height: 1.75rem !important;
    min-width: 1.75rem !important;
    min-height: 1.75rem !important;
}

.bs-invoice-detail-actions .bs-invoice-detail-action:nth-child(2) > svg {
    width: 1.75rem !important;
    height: 1.75rem !important;
    min-width: 1.75rem !important;
    min-height: 1.75rem !important;
}

/* =========================================================
   CARDS DEVIS / FACTURES — ALIGNEMENT VERTICAL DES ACTIONS
   Les informations variables (TVA, avoir, montant net, etc.)
   peuvent augmenter la hauteur du contenu. Les actions restent
   ancrées en bas de chaque card de la même rangée.
   ========================================================= */
.bs-quote-card,
.bs-invoice-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}

.bs-quote-card > .bs-actions,
.bs-invoice-card > .bs-actions {
    margin-top: auto;
}

/* =========================================================
   CARDS FOURNISSEURS — ALIGNEMENT VERTICAL DES ACTIONS
   Le nom et les informations fournisseur peuvent occuper un
   nombre variable de lignes. Les actions restent en bas.
   ========================================================= */
[data-supplier-card] {
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}

[data-supplier-card] > .bs-actions {
    margin-top: auto;
}

/* Lot 6 - Respecter l'attribut hidden dans la modale de litige */
.invoice-dispute-declare-modal [hidden] {
    display: none !important;
}

/* Lot 6 - Champ montant non modifiable : rendu visuel désactivé */
.invoice-dispute-declare-modal input[readonly] {
    background: #f1f3f5;
    color: #6c757d;
    cursor: not-allowed;
}

/* Lot 6 - Montant du litige non modifiable */
.invoice-dispute-declare-modal input:read-only {
    background: #eef1f5 !important;
    color: #6c757d !important;
    border-color: #cbd5e1 !important;
    cursor: not-allowed !important;
}

.invoice-dispute-declare-modal input:read-only:focus {
    background: #eef1f5 !important;
    color: #6c757d !important;
    border-color: #cbd5e1 !important;
    outline: none !important;
    box-shadow: none !important;
}

/* =========================================================
   STATISTIQUES — FILTRES DESKTOP SUR UNE SEULE LIGNE
   ========================================================= */
@media (min-width: 1101px) {
    .statistics-card .statistics-v2-filters {
        display: grid;
        grid-template-columns: minmax(145px, 1fr) minmax(145px, 1fr) minmax(135px, 1fr) minmax(135px, 1fr) auto auto;
        align-items: end;
        gap: 12px;
        width: 100%;
    }

    .statistics-card .statistics-v2-filters > .bs-field,
    .statistics-card .statistics-v2-filters > button {
        grid-column: auto !important;
        grid-row: auto !important;
        min-width: 0;
        margin: 0;
    }

    .statistics-card .statistics-v2-filters input,
    .statistics-card .statistics-v2-filters select {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .statistics-card .statistics-v2-filters > .atlas-button {
        white-space: nowrap;
        align-self: end;
    }
}

@media (min-width: 701px) and (max-width: 1100px) {
    .statistics-card .statistics-v2-filters {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .statistics-card .statistics-v2-filters > .bs-field,
    .statistics-card .statistics-v2-filters > button {
        grid-column: auto !important;
        grid-row: auto !important;
    }
}


/* Cards devis : actions compactes, sans débordement à gauche. */
.bs-quote-card .bs-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: .15rem;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.bs-quote-card .bs-actions .atlas-icon-button {
    flex: 0 0 1.75rem;
    width: 1.75rem;
    height: 2rem;
    padding: .1rem;
    box-sizing: border-box;
}
.bs-quote-card .bs-actions .bs-inline-form {
    flex: 0 0 auto;
    margin: 0;
}

/* Devis : actions indisponibles visibles, mais toujours inactives. */
.bs-quote-card .bs-actions .atlas-icon-button.is-disabled,
.bs-quote-card .bs-actions .atlas-icon-button[disabled],
.bs-quote-card .bs-actions .atlas-icon-button[aria-disabled="true"] {
    color: #94a3b8 !important;
    opacity: .85 !important;
    cursor: not-allowed;
}
.bs-quote-card .bs-actions .atlas-icon-button.is-disabled svg,
.bs-quote-card .bs-actions .atlas-icon-button[disabled] svg,
.bs-quote-card .bs-actions .atlas-icon-button[aria-disabled="true"] svg {
    stroke: currentColor !important;
    opacity: 1 !important;
}

/* AGDF V2 - paramètres à onglets, première ébauche */
.bs-settings-card:has(.agdf-settings-tabs){max-width:1180px;margin-inline:auto}
.agdf-settings-tabs{display:flex;flex-wrap:wrap;gap:.45rem;border-bottom:1px solid #d9e3f0;padding:.4rem 0 .9rem;margin:1rem 0 1.3rem}
.agdf-settings-tab{appearance:none;border:1px solid transparent;background:transparent;color:#52657f;border-radius:10px;padding:.7rem 1.15rem;font:inherit;font-weight:650;cursor:pointer;transition:background .15s,border-color .15s}
.agdf-settings-tab:hover{background:#f1f6fd;color:#173c75}
.agdf-settings-tab.is-active{background:#eaf2ff;border-color:#b7cef6;color:#1457b8}
.agdf-settings-tab:focus-visible{outline:3px solid #7aa7f8;outline-offset:2px}
.agdf-settings-panel[hidden]{display:none!important}
.agdf-settings-panel-title{font-size:1.16rem;color:#1b355b;margin:0 0 1.2rem;font-weight:700}
.agdf-settings-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.1rem 1.4rem;align-items:start}
.agdf-settings-fields>.bs-field,.agdf-settings-fields>.bs-check,.agdf-settings-fields>.bs-options,.agdf-settings-fields>.agdf-pdf-translation-card{margin:0!important;min-width:0}
.agdf-settings-fields>.bs-field:has(textarea),.agdf-settings-fields>.bs-options,.agdf-settings-fields>.agdf-pdf-translation-card{grid-column:1/-1}
.agdf-settings-fields>.bs-options{border:1px solid #dce5f1;border-radius:12px;padding:1rem 1.25rem}
.agdf-settings-fields>.bs-options:has(input[name="bank_branch"]){border:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}
.agdf-settings-fields>.bs-options:has(input[name="bank_branch"])>legend{display:none}
.agdf-settings-fields>.bs-options:has(input[name="bank_branch"])>.bs-field{margin:0!important}
.agdf-settings-fields>.bs-options:has(input[name="bank_branch"])>.bs-field:last-child{grid-column:1/-1}
.bs-settings-card .agdf-settings-fields label:has(input[name="bank_branch"]),.bs-settings-card .agdf-settings-fields label:has(input[name="bank_name"]),.bs-settings-card .agdf-settings-fields label:has(input[name="bank_account"]){border:0!important;padding:0!important;background:transparent!important}
.bs-settings-card .agdf-settings-fields label:has(input[name="bank_branch"])::before{display:none!important}
.agdf-settings-actions{display:flex;justify-content:flex-end;position:sticky;bottom:0;background:linear-gradient(180deg,rgba(255,255,255,.92),#fff 30%);padding:1rem 0 .25rem;margin-top:1.25rem;border-top:1px solid #e2e9f3;z-index:2}
.agdf-settings-actions button{min-width:160px}
@media(max-width:720px){.agdf-settings-fields{grid-template-columns:1fr}.agdf-settings-fields>.bs-options:has(input[name="bank_branch"]){grid-template-columns:1fr}.agdf-settings-tabs{gap:.2rem}.agdf-settings-tab{flex:1 1 40%;padding:.65rem .45rem}.agdf-settings-actions button{width:100%}}

/* Paramètres : onglets identiques à la fiche Fournisseur. */
.agdf-settings-tabs.supplier-sheet-tabs{display:flex!important;align-items:flex-end!important;flex-wrap:nowrap!important;gap:0!important;margin:1rem 0 1.3rem!important;padding:0!important;border:0!important;border-bottom:1px solid #d4deec!important;border-radius:0!important;overflow-x:auto!important;overflow-y:hidden!important}
.agdf-settings-tabs.supplier-sheet-tabs .agdf-settings-tab.atlas-tabs__tab{flex:0 0 auto!important;box-sizing:border-box!important;width:auto!important;min-width:0!important;height:38px!important;min-height:38px!important;max-height:38px!important;margin:0 0 -1px 0!important;padding:0 .85rem!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;border:1px solid #d4deec!important;border-radius:.65rem .65rem 0 0!important;background:#fff!important;color:#172b4d!important;box-shadow:none!important;white-space:nowrap!important;font:inherit!important;font-weight:normal!important}
.agdf-settings-tabs.supplier-sheet-tabs .agdf-settings-tab + .agdf-settings-tab{margin-left:-1px!important}
.agdf-settings-tabs.supplier-sheet-tabs .agdf-settings-tab:hover{position:relative!important;z-index:1!important;background:#f3f7ff!important}
.agdf-settings-tabs.supplier-sheet-tabs .agdf-settings-tab[aria-selected="true"]{position:relative!important;z-index:2!important;background:#2764e8!important;border-color:#2764e8!important;color:#fff!important;font-weight:650!important}
@media(max-width:720px){.agdf-settings-tabs.supplier-sheet-tabs .agdf-settings-tab{flex:0 0 auto!important;padding:0 .7rem!important}}


/* Employee directory: compact table and Atlas active switch. */
.employee-directory-table { width:100%; min-width:0; table-layout:fixed; font-size:.88rem; }
.employee-directory-table th,.employee-directory-table td { padding:.55rem .7rem; vertical-align:middle; }
.employee-directory-table th:nth-child(1),.employee-directory-table td:nth-child(1) { width:34%; }
.employee-directory-table th:nth-child(2),.employee-directory-table td:nth-child(2) { width:28%; }
.employee-directory-table th:nth-child(3),.employee-directory-table td:nth-child(3) { width:13%; text-align:center; }
.employee-directory-table th:nth-child(4),.employee-directory-table td:nth-child(4) { width:15%; }
.employee-directory-table th:last-child,.employee-directory-table td:last-child { width:54px; text-align:center; }
.employee-directory-table td { overflow-wrap:anywhere; }
.employee-contact { display:block; margin-top:.15rem; color:#64748b; font-size:.77rem; line-height:1.3; }
.employee-active-switch { grid-column:1 / -1; width:max-content; margin-top:.2rem; }

.employee-assignment-table { width:100%; min-width:0; table-layout:fixed; font-size:.88rem; }
.employee-assignment-table th,.employee-assignment-table td { padding:.55rem .7rem; vertical-align:middle; }
.employee-assignment-table th:nth-child(1),.employee-assignment-table td:nth-child(1) { width:22%; }
.employee-assignment-table th:nth-child(2),.employee-assignment-table td:nth-child(2) { width:31%; }
.employee-assignment-table th:nth-child(3),.employee-assignment-table td:nth-child(3) { width:24%; white-space:nowrap; }
.employee-assignment-table th:nth-child(4),.employee-assignment-table td:nth-child(4) { width:15%; }
.employee-assignment-table th:last-child,.employee-assignment-table td:last-child { width:100px; text-align:right; }
.employee-assignment-table td { overflow-wrap:anywhere; }
.employee-assignment-heading,.employee-gantt-toolbar,.employee-gantt-month-nav{display:flex;align-items:center;justify-content:space-between;gap:.8rem}
.employee-assignment-heading h2,.employee-gantt-month-nav h2{margin:0}
.employee-assignment-filters{margin:1rem 0;align-items:end}
.employee-assignment-filters .bs-filter-field{min-width:150px;flex:1}
.employee-assignment-table tr[hidden],.employee-gantt-row[hidden]{display:none}
.employee-contact{display:block;color:#64748b;font-size:.82rem;margin-top:.16rem}
.employee-view-quote{display:inline-flex;align-items:center;gap:.4rem;color:#2764e8;text-decoration:none;font-weight:600;white-space:nowrap}
.employee-view-quote:hover{text-decoration:underline;color:#1748b5}
.employee-view-quote svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.employee-filter-empty{margin:.8rem 0;color:#64748b}
.employee-gantt-card{overflow:hidden}
.employee-gantt-toolbar{margin-bottom:1.25rem;flex-wrap:wrap}
.employee-gantt-month-nav{justify-content:flex-start}
.employee-gantt-scroll{overflow:auto;border:1px solid #dce4ef;border-radius:.7rem;max-height:70vh}
.employee-gantt-grid{min-width:calc(13rem + var(--gantt-width));width:calc(13rem + var(--gantt-width))}
.employee-gantt-header,.employee-gantt-row{display:grid;grid-template-columns:13rem var(--gantt-width);min-width:calc(13rem + var(--gantt-width))}
.employee-gantt-header{position:sticky;top:0;z-index:3;background:#f2f6fc;border-bottom:1px solid #d8e1ed}
.employee-gantt-name-head,.employee-gantt-name{position:sticky;left:0;z-index:2;background:#fff;padding:.65rem .8rem;border-right:1px solid #d8e1ed;display:flex;flex-direction:column;justify-content:center;font-weight:650}
.employee-gantt-name-head{z-index:4;background:#f2f6fc}
.employee-gantt-name small{font-size:.78rem;color:#64748b;font-weight:400;margin-top:.15rem}
.employee-gantt-day-heads{display:grid;grid-template-columns:repeat(var(--gantt-days),2.2rem);width:var(--gantt-width);min-width:var(--gantt-width)}
.employee-gantt-day-heads span{padding:.55rem 0;text-align:center;font-size:.78rem;color:#475569;border-right:1px solid #e7edf5}
.employee-gantt-row{min-height:3.6rem;border-bottom:1px solid #e7edf5}
.employee-gantt-row:last-child{border-bottom:0}
.employee-gantt-track{position:relative;width:var(--gantt-width);min-width:var(--gantt-width);background:repeating-linear-gradient(to right,transparent 0,transparent 2.1rem,#e7edf5 2.1rem,#e7edf5 2.2rem);}
.employee-gantt-bar{position:absolute;top:.55rem;bottom:.55rem;display:flex;align-items:center;gap:.4rem;min-width:8px;overflow:hidden;padding:0 .5rem;border-radius:.38rem;background:#dceaff;color:#1748a2;text-decoration:none;border-left:3px solid #3976dc;font-size:.78rem;white-space:nowrap}
.employee-gantt-bar strong{overflow:hidden;text-overflow:ellipsis}
.employee-gantt-bar span{overflow:hidden;text-overflow:ellipsis;color:#365981}
.employee-gantt-bar:hover{background:#c9defd}
.employee-gantt-legend{display:flex;align-items:center;gap:.45rem;color:#64748b;font-size:.84rem;margin:.85rem 0 0}
.employee-gantt-legend span{width:14px;height:10px;border-radius:3px;background:#dceaff;border-left:3px solid #3976dc}
.quote-employee-availability-message{margin:.4rem 0 .8rem!important;font-size:.9rem}
.quote-employee-availability-message.is-error{color:#b42318}
@media(max-width:760px){.employee-assignment-heading{align-items:flex-start;flex-direction:column}.employee-assignment-filters .bs-filter-field{min-width:calc(50% - .5rem)}.employee-gantt-name-head,.employee-gantt-name{padding:.55rem}.employee-gantt-bar span{display:none}}

/* =========================================================
   AGDF — Bordures harmonisées des cartes
   ========================================================= */.atlas-card,
.bs-settings-card,
.svc-card,
.svc-item,
.bs-client-card,
.bs-quote-card,
.bs-invoice-card,
.bs-auth-card,
.bs-organization-card,
.bs-card,
.agdf-user-card,
.agdf-pdf-translation-card,
.mi-history-card,
.mi-part-card,
.mi-separator-card,
.supplier-product-card,
.dispute-summary-card {
    border:2px solid #8195ae;
}

/* Statistiques — achats : conserver les cinq colonnes dans la largeur disponible. */
.statistics-card .stats-table-wrap--purchases-currency {
    overflow-x:hidden !important;
}

.statistics-card .stats-table.statistics-v2-table--purchases-currency {
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    table-layout:fixed !important;
    font-size:.8rem;
}

.statistics-card .statistics-v2-table--purchases-currency th,
.statistics-card .statistics-v2-table--purchases-currency td {
    padding:.5rem .35rem;
    overflow-wrap:anywhere;
}

.statistics-card .statistics-v2-table--purchases-currency th {
    white-space:normal !important;
    word-break:normal;
    hyphens:auto;
}

.statistics-card .statistics-v2-table--purchases-currency td:not(:first-child) {
    white-space:nowrap;
}

.statistics-v2-table--purchases-currency th:nth-child(1),
.statistics-v2-table--purchases-currency td:nth-child(1) { width:9%; }
.statistics-v2-table--purchases-currency th:nth-child(2),
.statistics-v2-table--purchases-currency td:nth-child(2),
.statistics-v2-table--purchases-currency th:nth-child(3),
.statistics-v2-table--purchases-currency td:nth-child(3),
.statistics-v2-table--purchases-currency th:nth-child(4),
.statistics-v2-table--purchases-currency td:nth-child(4),
.statistics-v2-table--purchases-currency th:nth-child(5),
.statistics-v2-table--purchases-currency td:nth-child(5) { width:22.75%; }

@media (max-width:700px) {
    .statistics-card .stats-table.statistics-v2-table--purchases-currency {
        font-size:.67rem !important;
    }

    .statistics-card .statistics-v2-table--purchases-currency th,
    .statistics-card .statistics-v2-table--purchases-currency td {
        padding:.38rem .2rem !important;
    }

    .statistics-card .statistics-v2-table--purchases-currency th {
        font-size:.61rem !important;
    }
}
