:root {
    --fd-primary:        #14213d;
    --fd-primary-dark:   #0c1428;
    --fd-primary-light:  #f26b21;
    --fd-primary-mid:    #1f3259;
    --fd-primary-solid:       #14213d;
    --fd-primary-solid-hover: #1f3259;
    --fd-body-bg: #f4f1ea;
    --fd-text:           #14213d;
    --fd-text-muted:     #5f6676;
    --fd-link-color:     #a4460f;
    --fd-card-bg:        #ffffff;
    --fd-input-bg:       #fffdf9;
    --fd-card-shadow:    rgba(20, 33, 61, 0.10);
    --fd-border:         #d6d1c4;
    --fd-border-light:   #e8e4da;
    --fd-summary-bg: linear-gradient(45deg, #d9d4c8, #b9b2a3);
    --fd-summary-text:          #14213d;
    --fd-tree-addr:             rgba(20,33,61,.6);
    --fd-summary-com-bg: linear-gradient(45deg, #fbe6d8, #ffffff);
    --fd-summary-com-text:      #14213d;
    --fd-link-card-bg:          linear-gradient(45deg, #ece8df, #cfc9bb);
    --fd-link-card-text:        #14213d;
    --fd-accordion-com-bg: linear-gradient(45deg, #fcfaf5, #ffffff);
    --fd-accordion-com-text:    #14213d;
    --fd-link-card-h4:          #14213d;
    --fd-link-card-p:           rgba(20,33,61,.6);
    --fd-accordion-bg:          linear-gradient(45deg, #e4dfd3, #c9c2b2);
    --fd-accordion-text:        #2b2f3a;
    --fd-btn-bg:         #fbe3d5;
    --fd-btn-text:       #0c1428;
    --fd-btn-hover:      #f8caa9;
    --fd-btn-active:     #f4a874;
    --fd-header-bg:      #14213d;
    --fd-sidebar-bg:     #0c1428;
    --fd-table-text:     #14213d;
    --fd-table-th:       #14213d;
    --fd-scroll-thumb:       #c3bcad;
    --fd-scroll-thumb-hover: #9c9484;
}

[data-theme="dark"] {
    --fd-primary:        #f6a06e;
    --fd-primary-dark:   #0c1428;
    --fd-primary-light:  #f26b21;
    --fd-primary-mid:    #2b3d6b;
    --fd-primary-solid:       #2b3d6b;
    --fd-primary-solid-hover: #36497f;
    --fd-body-bg:        #0f1626;
    --fd-text:           #e8e6df;
    --fd-text-muted:     #a3a9bd;
    --fd-link-color:     #f6a06e;
    --fd-card-bg:        #182340;
    --fd-input-bg: #0c1428;
    --fd-card-shadow:    rgba(0, 0, 0, 0.35);
    --fd-border:         #2a3a63;
    --fd-border-light:   #2a3a63;
    --fd-summary-bg:            linear-gradient(45deg, #000000, #010101);
    --fd-summary-text:          #e8e6df;
    --fd-tree-addr:             rgba(255,255,255,.6);
    --fd-summary-com-bg: linear-gradient(45deg, #1f2d55, #0f1626);
    --fd-summary-com-text:      #e8e6df;
    --fd-link-card-bg:          linear-gradient(45deg, #000000, #010101);
    --fd-link-card-text:        #e8e6df;
    --fd-accordion-com-bg:      linear-gradient(45deg, #162040, #202c4a);
    --fd-accordion-com-text:    #e8e6df;
    --fd-link-card-h4:          #e8e6df;
    --fd-link-card-p:           rgba(255,255,255,.6);
    --fd-accordion-bg:          linear-gradient(45deg, #162040, #202c4a);
    --fd-accordion-text:        #e8e6df;
    --fd-btn-bg:         #26345a;
    --fd-btn-text:       #e8e6df;
    --fd-btn-hover:      #31427a;
    --fd-btn-active:     #3d52a0;
    --fd-header-bg:      #0a1222;
    --fd-sidebar-bg:     #0a1222;
    --fd-table-text:     #dcdad2;
    --fd-table-th:       #f6a06e;
    --fd-scroll-thumb:       #475167;
    --fd-scroll-thumb-hover: #616e8b;
}

[data-theme="dark"] .fd-tree-site,
[data-theme="dark"] .fd-measure-card {
    background: #16213a;
    border-color: #1e2e54;
}
[data-theme="dark"] .fd-top-table th {
    background: #16213a;
}
[data-theme="dark"] .fd-card input,
[data-theme="dark"] .fd-card select,
[data-theme="dark"] .fd-card textarea,
[data-theme="dark"] .fd-cerfa-inner input,
[data-theme="dark"] .fd-cerfa-inner select,
[data-theme="dark"] .fd-cerfa-inner textarea {
    background: #0f1627;
    color: #eee7dc;
    border: 1px solid #1e2e54;
}
[data-theme="dark"] .fd-stat-card {
    background: #16213a;
    color: #eee7dc;
}
[data-theme="dark"] .fd-stat-value {
    color: #f6a06e;
}
[data-theme="dark"] .fd-tree-fiche,
[data-theme="dark"] .fd-tree-action { color: #f6a06e; }
[data-theme="dark"] .fd-tree-fiche:hover,
[data-theme="dark"] .fd-tree-action:hover { background: rgba(246,160,110,.12); color: #f69f6c; }
[data-theme="dark"] .fd-tree-equipment { background: linear-gradient(45deg, #c9520d, #152549); color: #eae0d3; }
[data-theme="dark"] .fd-tree-equipment:hover { background: linear-gradient(45deg, #c9520d, #192c58); }
[data-theme="dark"] .fd-equip-summary { background: linear-gradient(45deg, #c9520d, #152549); }
[data-theme="dark"] .fd-equip-summary:hover { background: linear-gradient(45deg, #c9520d, #192c58); }
[data-theme="dark"] .fd-reading-list a { background: #1a2642; color: #e6daca; }
[data-theme="dark"] .fd-reading-list a:hover { background: #1e2d50; }
[data-theme="dark"] .fd-reading-list strong { color: #f6a06e; }
[data-theme="dark"] .fd-analyse-card { background: #16213a; border-left-color: #1e2e54; color: #e6daca; }
[data-theme="dark"] .fd-dormants-toolbar { background: #0e1628; border-color: #1e2e54; }

html {
    height: 100%;
    scrollbar-color: var(--fd-scroll-thumb) transparent;
}
* {
    scrollbar-width: thin;
}
*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
*::-webkit-scrollbar-track,
*::-webkit-scrollbar-corner {
    background: transparent;
}
*::-webkit-scrollbar-thumb {
    background: var(--fd-scroll-thumb);
    border-radius: 6px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover {
    background: var(--fd-scroll-thumb-hover);
    background-clip: padding-box;
}

body.fd-body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: var(--fd-body-bg);
    color: var(--fd-text);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body {
    min-height: 100vh;
}

a[href^="mailto"] {
    color: var(--fd-link-color);
}

h1 {
    font-size: 24px;
    text-align: center;
    margin: 21px 5px;
}

h2 {
    font-size: 16px;
    text-align: center;
    color: var(--fd-primary);
}

p {
    padding: 0 10px;
}

.fd-container,
.fd-login {
    max-width: 1200px;
    width: 100%;
    margin: 40px auto 0px auto;
    padding: 15px 8px 0px 8px;
    flex: 1;
    box-sizing: border-box;
}

.fd-login {
    max-width: 420px;
}

.fd-form-colonne {
    max-width: 820px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.fd-form-bon {
    display: block;
    width: 100%;
    margin: 0;
}

.fd-panneau {
    padding: 14px 12px 14px;
    background: var(--fd-input-bg);
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--fd-card-shadow);
    box-sizing: border-box;
}

.fd-panneau > .fd-card,
.fd-panneau > .fd-bil-two-cols > .fd-card {
    margin: 0;
    padding: 12px 0;
    background: none;
    border-radius: 0;
    box-shadow: none;
    border-bottom: 1px solid var(--fd-border);
}

.fd-panneau > .fd-card-actions {
    margin-left: 16px;
    margin-right: 16px;
}

.fd-card {
    margin: 0px 0;
    background: var(--fd-card-bg);
    border-radius: 2px;
    padding: 3px 3px 7px 7px;
    color: var(--fd-text);
    box-shadow: 0 2px 8px var(--fd-card-shadow);
}

.fd-card-2 {
    background: none;
    padding: 15px 0;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
@media (max-width: 600px) {
    .fd-card-2 {
        flex-direction: column;
        align-items: flex-start;
    }
    .fd-card-2 > * {
        width: 54%;
        box-sizing: border-box;
        text-align: center;
    }
}

.fd-card-3 {
    margin: 20px 10px 40px 10px;
    background: var(--fd-card-bg);
    border-radius: 2px;
    padding: 10px 16px;
    color: var(--fd-text);
    box-shadow: 0 2px 8px var(--fd-card-shadow);
}

.fd-card label {
    padding: 3px;
    display: block;
    margin: 8px 0px 3px;
    font-weight: 700;
}

.fd-card, fd-dash-billing {
    padding: 20px;
}

.fd-card input,
.fd-cerfa-inner input:not([type="checkbox"]):not([type="radio"]),
.fd-cerfa-inner select,
.fd-cerfa-inner textarea,
.fd-pub-card input:not([type="checkbox"]):not([type="radio"]) {
    width: 87%;
    padding: 6px 9px;
    margin-top: 0px;
    border-radius: 6px;
    border: 1px solid #00000069;
    box-sizing: border-box;
}

.fd-form-societe .fd-fieldset input:not([type="checkbox"]):not([type="radio"]):not(.fd-societe-cp):not(.fd-input-fichier),
.fd-form-societe .fd-fieldset select,
.fd-form-societe .fd-fieldset textarea {
    width: 100%;
    box-sizing: border-box;
}
.fd-card input.fd-societe-cp {
    width: 140px;
    max-width: 100%;
}
.fd-card input.fd-input-fichier {
    width: auto;
    max-width: 100%;
}
.fd-card input[readonly] {
    cursor: default;
}
.fd-card input[readonly]:placeholder-shown {
    background: #f5f2ee;
    color: #aab8c2;
    border-color: #dde4ea;
    cursor: not-allowed;
}
[data-theme="dark"] .fd-card input[readonly]:placeholder-shown {
    background: #1e2432;
    color: #3d5060;
    border-color: #2a3a45;
}

@media (max-width: 700px) {
    .fd-card {
        margin-left: 8px;
        margin-right: 8px;
    }

    .fd-card input {
    text-align: center;
    width: 100%;
    padding: 10px 3px;
    margin-top: 0px;
    box-sizing: border-box;
}
}

.fd-bil-client-bloc > summary {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    list-style: none;
}
.fd-bil-client-bloc > summary::-webkit-details-marker {
    display: none;
}
.fd-bil-client-bloc > summary > .fd-card-section-title {
    flex: 1 1 auto;
}
.fd-bil-client-bloc > summary::after {
    content: '\25BE';
    font-size: .8em;
    display: inline-block;
    transition: transform .15s ease;
}
.fd-bil-client-bloc[open] > summary::after {
    transform: rotate(180deg);
}

.fd-card button:not(.fd-main-button-2):not(.fd-main-button-inline):not(.fd-stepper):not(.fd-chart-toggle):not(.fd-page-btn):not(.fd-btn-feed):not(.fd-fluide-fav-btn):not(.fd-photo-delete-btn) {
    display: inline-block;
    padding: 6px 14px;
    margin: 6px auto;
    text-align: center;
    background: var(--fd-btn-bg);
    border: 0;
    border-radius: 2px;
    color: var(--fd-btn-text);
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s;
}

.fd-card button:not(.fd-main-button-2):not(.fd-main-button-inline):not(.fd-stepper):not(.fd-chart-toggle):not(.fd-page-btn):not(.fd-btn-feed):not(.fd-fluide-fav-btn):not(.fd-photo-delete-btn):hover {
    background: var(--fd-btn-hover);
    color: var(--fd-text);
}

.fd-card button:not(.fd-main-button-2):not(.fd-main-button-inline):not(.fd-stepper):not(.fd-chart-toggle):not(.fd-page-btn):not(.fd-btn-feed):not(.fd-fluide-fav-btn):not(.fd-photo-delete-btn):active {
    background: var(--fd-btn-active);
    box-shadow: inset 0 1px 2px rgba(0,0,0,.18);
}
.fd-card button:not(.fd-main-button-2):not(.fd-main-button-inline):not(.fd-stepper):not(.fd-chart-toggle):not(.fd-page-btn):not(.fd-btn-feed):not(.fd-fluide-fav-btn):not(.fd-photo-delete-btn):focus {
    background: var(--fd-btn-active);
}

[data-theme="dark"] .fd-field-warning {
    color: #f0a05a;
}

.fd-field-warning {
    display: block;
    color: #b94a00;
    font-size: .82rem;
    margin-top: 3px;
    min-height: 1em;
}

.fd-alert {
    background: #ffe3e3;
    color: #8a1111;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 14px;
}

.fd-alert-inline {
    background: #fff8e1;
    color: #7a5800;
    border: 1px solid #ffe082;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: .85rem;
    margin: 10px 0 6px;
}
.fd-alert-inline a {
    color: var(--fd-primary);
    font-weight: 600;
    text-decoration: underline;
}
.fd-alert-inline.fd-alert-inline-info {
    background: #f6f2ed;
    color: var(--fd-primary);
    border-color: #e1d3c0;
}

[data-theme="dark"] .fd-alert-inline {
    background: rgba(255, 193, 7, .12);
    color: #f0c674;
    border-color: rgba(255, 193, 7, .3);
}
[data-theme="dark"] .fd-alert-inline.fd-alert-inline-info {
    background: rgba(246, 160, 110, .12);
    color: var(--fd-primary);
    border-color: rgba(246, 160, 110, .32);
}
[data-theme="dark"] .fd-alert-inline a {
    color: #f6a779;
}

.fd-alert-success {
    display: inline-flex;
    align-self: flex-start;
    width: fit-content;
    max-width: 100%;
    align-items: center;
    gap: 8px;
    background: #63d876;
    color: #ffffff;
    padding: 3px 15px;
    border-radius: 20px;
    border: 1px solid #a5d6a7;
    margin: 0px 15px;
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 1px;
    font-style: italic;
}
.fd-alert-success::before {
    content: '\2713';
    font-weight: 700;
}
[data-theme="dark"] .fd-alert-success {
    background: #0d2e1400;
    color: #6be771;
    border-color: #a3e6a82b;
}

.fd-grid {
    font-size: 14px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 5px;
    margin-bottom: 42px;
}

@media (max-width: 700px) {
    .fd-grid {
        font-size: 15px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 5px;
        margin-bottom: 42px;
    }
}
.fd-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    margin-bottom: 42px;
    font-size: 14px;
}

@media (max-width: 700px) {
    .fd-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.fd-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    font-size: 14px;
    padding: 10px;
    gap: 8px;
    margin-bottom: 42px;
}
@media (max-width: 700px) {
    .fd-grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 2px;
        width: 100%;
        box-sizing: border-box;
    }
}

.fd-link-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 14px 16px;
    border: 1px solid var(--fd-border-light);
    border-radius: 8px;
    background: var(--fd-card-bg);
    text-decoration: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
    transition: transform .15s, box-shadow .15s;
}
.fd-link-card:hover {
    background: var(--fd-body-bg);
    border-color: var(--fd-btn-active);
}
.fd-link-card:focus-visible {
    outline: 2px solid var(--fd-primary);
    outline-offset: 2px;
}
.fd-link-card h4 {
    margin: 0;
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: left;
    color: var(--fd-text);
}
.fd-link-card p {
    padding: 0;
    margin: 0;
    font-size: .8rem;
    text-align: left;
    color: var(--fd-text-muted);
    font-weight: 400;
    line-height: 1.4;
    word-break: break-word;
}
[data-theme="dark"] .fd-link-card {
    box-shadow: 0 1px 4px rgba(0, 0, 0, .4);
}
[data-theme="dark"] .fd-link-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, .55);
}

.fd-button {
    display: inline-block;
    margin: 0;
    padding: 7px 11px;
    background: var(--fd-btn-bg);
    border-radius: 4px;
    border: none;
    text-decoration: none;
    color: var(--fd-btn-text);
    font-size: 13px;
    font-weight: 500;
}

.fd-button:hover {
    background: var(--fd-btn-hover);
    color: var(--fd-text);
}

@media (max-width: 768px) {
    .fd-button, a.fd-main-button-2{
        font-size: 13px;
        margin: 4px;
        border: none;
        padding: 5px 7px;
        text-align: center;
    }
}

.fd-card textarea {
    width: 100%;
    padding: 12px;
    margin-top: 6px;
    border-radius: 6px;
    box-sizing: border-box;
    resize: vertical;
}

.fd-card select {
    width: 100%;
    padding: 4px;
    margin-top: 2px;
    box-sizing: border-box;
}

.fd-measure-grid {
    padding: 0px;
    margin: 3px;
    align-items: stretch;
    width: auto;
    min-width: 0;
}
.fd-measure-card label {
    font-size: 20px;
        padding: 0;
    text-align: center;
}

@media (max-width: 700px) {
.fd-measure-card label {
    font-size: 12px;
}
}
.fd-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.fd-input-row input {
    flex: 1;
}

.fd-input-row span {
    font-weight: 700;
    color: var(--fd-primary);
}

.fd-main-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: auto;
    margin: 22px 0;
    padding: 8px 14px;

    border: 0;
    border-radius: 6px;
    background: var(--fd-primary-solid);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}
.fd-main-button:hover {
    background: var(--fd-primary-solid-hover);
    color: #fff;
}
.fd-main-button span {
    color: inherit;
    font-size: 16px;
    padding: 0;
    margin: 0;
    background: transparent;
}

.fd-btn-save {
    display: inline-block;
    margin: 4px 0 !important;
    padding: 7px 12px !important;
    border: 0 !important;
    border-radius: 4px !important;
    background: #76f0b3 !important;
    color: #111e3b !important;
    font-size: 12px;
    font-weight: 600 !important;
    cursor: pointer;
}
.fd-btn-save:hover {
    background: #5fe0a0 !important;
    color: #111e3b !important;
}

.fd-main-button-inline {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: auto;
    margin: 0;
    padding: 8px 14px;
    text-decoration: none;
}
@media (max-width: 600px) {
    .fd-card-actions {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }
    .fd-main-button-inline {
        width: 54%;
        margin: 4px;
        box-sizing: border-box;
        font-size: 12px;
    }
}

.fd-main-button-auto {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: auto;
    margin: 0;
    border-radius: 4px;
    padding: 10px 10px;
    font-size: 12px;
    text-decoration: none;
}
.fd-main-button.fd-bil-btn-nouveau {
    box-sizing: border-box;
    height: calc(.9rem * 1.2 + 12px);
    margin: 4px;
    padding: 0 12px;
    gap: 7px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
}

.fd-main-button-2 {
    display: inline-flex;
    align-items: center;
    margin: 0 10px;
    padding: 6px 12px;
    background: linear-gradient(344deg, #ff00008c, #d53c47bf);
    border-radius: 4px;
    border: none;
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    /* line-height: 1.4; */
}
.fd-main-button-2:hover {
    background: linear-gradient(344deg, #ab0000, #ac2f38);
    color: #fff;
}
.fd-card-actions-form {
    display: contents;
}

.fd-main-button-3 {
    display: block;
    width: 80px;
    padding: 4px 8px !important;
    margin: 0px auto !important;
    text-align: center;
    border-radius: 8px;
    background:#fbe3d5;
    color: #010101;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.fd-table-wrap {
    overflow-x: auto;
    margin: 10px;
}

.fd-table {
    margin-top: 10px;
    width: 100%;
    border-collapse: collapse;
}

.fd-table th,
.fd-table td {
    padding: 3px 5px;
    color: var(--fd-table-text);
    border-bottom: 1px solid var(--fd-border-light);
    text-align: left;
    font-size: 13px;
}

.fd-table th {
    color: var(--fd-table-th);
}

.fd-analysis {
    border-left: 6px solid #14213d;
}

.fd-analysis-ok {
    border-left-color: #1f8f4d;
}

.fd-analysis-warning {
    border-left-color: #f0a500;
}

.fd-analysis-danger,
.fd-analysis-critical {
    border-left-color: #c0392b;
}

.fd-badge-global {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    background: #14213d;
    color: #fff;
    font-size: .85rem;
    font-weight: 700;
}

.fd-badge-line {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    background: #f2ede6;
    color: var(--fd-primary);
    font-size: .85rem;
    font-weight: 700;
}

.fd-top-separator td {
    background: #efe8df;
    font-weight: 800;
    color: var(--fd-primary);
    border-top: 2px solid #14213d;
}

.fd-top-block {
    margin-bottom: 0px;
}

.fd-top-block h3 {
    font-size: 15px;
    margin: 10px 3px 3px;
    color: var(--fd-primary);
}

.fd-top-table th,
.fd-top-table td {
    text-align: center;
    white-space: nowrap;
}

.fd-top-block {
    overflow: hidden;
}
.fd-top-block .fd-table-wrap {
    max-width: 100%;
}

.fd-top-table th {
    padding: 3px 2px;
    font-size: 13px;
    background: #f7f4ef;
}
.fd-measure-card {
    padding: 10px 12px 16px 12px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #eae3d9;
    position: relative;
    min-width: 0;
    overflow: hidden;
}

@media (max-width: 700px) {
    .fd-measure-card {
        padding: 8px 8px 12px 8px;
        border-radius: 8px;
    }
}
.fd-measure-muted {
    opacity: .45;
    background: #eef2f4;
}

.fd-measure-muted input {
    cursor: not-allowed;
}

.fd-success {
    background: #f1f8f2;
    border-left: 4px solid #2e7d32;
}

.fd-mode-card {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 10px 16px;
}
.fd-mode-card strong {
    flex-shrink: 0;
    color: var(--fd-primary);
    font-size: .95rem;
}
.fd-mode-card label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .95rem;
    cursor: pointer;
    margin: 0;
    font-weight: 400;
}
.fd-mode-card input[type=radio] {
    width: 16px;
    height: 16px;
    accent-color: var(--fd-primary);
    cursor: pointer;
    margin: 0;
}
.fd-mode-locked {
    font-weight: 700;
    color: var(--fd-primary);
    font-size: .95rem;
}
@media (max-width: 600px) {
    .fd-mode-card {
        gap: 12px;
    }
}

.fd-chart-buttons {
    padding: 10px 5px 15px 5px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
}
.fd-chart-wrap {
    position: relative;
    height: clamp(320px, 46vh, 480px);
    margin: 6px 4px 14px;
}
@media (max-width: 600px) {
    .fd-chart-wrap {
        height: clamp(280px, 52vh, 380px);
        margin: 4px 0 10px;
    }
}

.fd-chart-toggle {
    padding: 6px 12px;
    border: 1px solid #e7e9eb;
    border-radius: 20px;
    background: #fff;
    color: var(--fd-primary);
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: .2s;
}

.fd-chart-toggle:hover {
    background: #2cf19b5e;
}

button.fd-chart-toggle.active {
    background: #4fffb3;
    color: #000000;
    border-color: #d8d6d6;

    box-shadow: inset 0 2px 2px rgb(0 0 0 / 21%);
}

.fd-chart-toggle.active::before {
     content: "";
}
@media (max-width: 600px) {
    .fd-chart-toggle {
        font-size: 12px;
        padding: 5px 9px;
    }
}

.fd-chart-disabled {
    opacity: .4;
    cursor: not-allowed;
}

.fd-header {
    height: 50px;
    background: var(--fd-header-bg);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

@media (max-width: 900px) {
    .fd-header {
     padding: 0 15px 0 15px;
    }
}

.fd-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    line-height: 0;
}
.fd-logo img {
    height: 44px;
    width: auto;
    display: block;
}
@media (max-width: 600px) {
    .fd-logo img {height: 40px;}
    .fd-header-user-name { display: none; }
    .fd-header-right,
    .fd-agency-switch,
    .fd-agency-select { min-width: 0; }
    .fd-agency-select { flex: 0 1 auto; }
    .fd-header-user .fd-badge-suspended { font-size: .62rem; padding: 2px 6px; letter-spacing: 0; }
}
@media (max-width: 360px) {
    .fd-logo img { height: 34px; }
    .fd-header-right { gap: 8px; }
    .fd-agency-select { max-width: 92px; }
}

.fd-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.fd-header-onglet {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    margin-left: auto;
    margin-right: 12px;
    border-radius: 50%;
    background: rgb(255 255 255 / 5%);
    color: rgba(255, 255, 255, .75);
    transition: background .2s, color .2s;
}
.fd-header-onglet svg {
    width: 16px;
    height: 16px;
    display: block;
}
.fd-header-onglet:hover {
    background: rgba(255, 255, 255, .18);
    color: #ffffff;
}
.fd-header-onglet:focus-visible {
    outline: 2px solid #f6a06e;
    outline-offset: 2px;
}
@media (max-width: 600px) {
    .fd-header:has(.fd-agency-switch) .fd-header-onglet {
        display: none;
    }
}

.fd-header-user {
    font-size: .95rem;
    opacity: .9;
}

.fd-upgrade-card { max-width: 560px; }
.fd-upgrade-lead { font-size: 1.05rem; color: var(--fd-text); margin-bottom: 10px; }
.fd-upgrade-sub { color: var(--fd-text-muted); font-size: .92rem; line-height: 1.6; margin-bottom: 20px; }
.fd-upgrade-actions {display: flex;gap: 10px;margin: 5px 10px;flex-wrap: wrap;align-items: center;}

.fd-export-form { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fd-export-date { width: auto; padding: 6px 8px; }

.fd-site-reassign { margin-top: 12px; }
.fd-site-reassign-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fd-site-reassign-row .fd-input { width: auto; min-width: 180px; }

.fd-agency-switch { margin: 0; display: flex; align-items: center; }
.fd-agency-select {
    max-width: 180px;
    padding: 5px 9px;
    border-radius: 6px;
    border: 1px solid var(--fd-border);
    background: var(--fd-card-bg);
    color: var(--fd-text);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.fd-header-login {
    color: #fff;
    text-decoration: none;
    font-size: .9rem;
    font-weight: 500;
    padding: 7px 14px;
    border: 1px solid rgba(255,255,255,.45);
    border-radius: 8px;
}
.fd-header-login:hover {
    background: rgba(255,255,255,.14);
}

.fd-theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 0px;
    border: none;
    border-radius: 999px;
    background: rgb(255 255 255 / 5%);
    cursor: pointer;
    font-family: inherit;
}
.fd-tt-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    transition: background .2s;
    color: rgba(255,255,255,.5);
}
.fd-tt-pill svg {
    width: 16px;
    height: 16px;
    display: block;
}
.fd-tt-pill[data-theme-pill="light"] { color: rgba(249,199,79,.6); }
.fd-tt-pill[data-theme-pill="dark"]  { color: rgba(200,221,232,.8); }
.fd-tt-pill.active {
    background: rgba(255,255,255,.22);
}
.fd-tt-pill[data-theme-pill="light"].active {
    color: #f9c74f;
    background: rgba(0,0,0,.28);
}
.fd-tt-pill[data-theme-pill="dark"].active  {color: #ffffffb5;}

.fd-layout {
    display: flex;
    flex: 1;
}

.fd-leftbar {
    width: 190px;
    flex: 0 0 auto;
    background: var(--fd-sidebar-bg);
    padding: 20px 5px;
    display: flex;
    flex-direction: column;
}

.fd-sidebar {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

@media (min-width: 901px) {
    .fd-sidebar a,
    .fd-nav-logout {
        white-space: normal;
        overflow-wrap: break-word;
    }
}

.fd-sidebar a {
    color: #f7f1f1;
    text-decoration: none;
    padding: 4px 12px;
    border-radius: 2px;
    white-space: nowrap;
    font-weight: 600px;
}

.fd-sidebar a:hover {
    background: #f26b21c2;
}

.fd-sidebar-active {
    background: #f26b21;
    color: #14213d !important;
    padding-left: 12px !important;
}

.fd-nav-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.fd-nav-group-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    padding: 6px 12px 6px;
    background: #ffffff00;
    border-radius: 2px;
    border: none;
    color: rgb(255 255 255);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    text-align: left;
    cursor: pointer;
}
.fd-nav-group-title:hover {color: rgba(255,255,255,.85);background: rgba(242,107,33,.35);}
.fd-nav-open > .fd-nav-group-title {color: #14213d;background: rgb(242 107 33) !important;}
.fd-nav-group-title:focus-visible {
    outline: 1px solid #f8caa9;
    outline-offset: 2px;
    border-radius: 3px;
}
.fd-nav-caret {
    font-size: .7rem;
    transition: transform .15s;
    transform: rotate(-90deg);
}
.fd-nav-open .fd-nav-caret { transform: none; }
.fd-nav-group-links {
    display: none;
    flex-direction: column;
    gap: 2px;
}
.fd-nav-open .fd-nav-group-links { display: flex; }
.fd-nav-group-links a {margin: 0px 17px 0 9px;padding-left: 14px;}
.fd-nav-group-links a.fd-sidebar-active {padding-left: 14px !important;color: #14213d;background: #f26b21;}
.fd-nav-logout-form {
    margin-top: auto;
    border-top: 1px solid rgba(255,255,255,.14);
    padding-top: 14px;
}
.fd-nav-logout {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    font: inherit;
    cursor: pointer;
    color: #fff;
    padding: 10px 12px;
    border-radius: 2px;
    white-space: nowrap;
}
.fd-nav-logout:hover {
    background: rgba(255,255,255,.12);
}

.fd-content {
    flex: 1;
    min-width: 0;
    padding: 20px 12px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.fd-content > .fd-footer {
    margin-top: 80px;
}

.fd-footer {
    text-align: center;
    padding: 14px 14px 6px 14px;
    color: var(--fd-text-muted);
    font-size: .9rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}
.fd-footer a {
    text-decoration: none;
}
.fd-bug-link {
    background: none;
    border: none;
    color: var(--fd-text-muted);
    font-size: .82rem;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}
.fd-bug-link:hover { color: var(--fd-primary); }
@media (max-width: 600px) {
    .fd-footer {
        gap: 12px;
        padding: 12px 10px 4px;
        font-size: .82rem;
    }
}

@media (max-width: 900px) {
    .fd-layout {
        flex-direction: column;
        min-height: unset;
    }

    .fd-leftbar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 264px;
        max-width: 82vw;
        z-index: 1300;
        overflow-y: auto;
        transform: translateX(-105%);
        transition: transform .22s ease;
        box-shadow: 4px 0 24px rgba(0, 0, 0, .35);
    }
    body.fd-nav-mobile-open .fd-leftbar {
        transform: none;
    }
    body.fd-nav-mobile-open {
        overflow: hidden;
    }
    .fd-sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(4, 20, 30, .5);
        z-index: 1250;
    }
    body.fd-nav-mobile-open .fd-sidebar-overlay {
        display: block;
    }

    .fd-leftbar {
        padding: 14px 10px;
    }
    .fd-sidebar {
        gap: 4px;
    }
    .fd-sidebar a,
    .fd-nav-logout {
        display: flex;
        align-items: center;
        box-sizing: border-box;
        min-height: 34px;
        padding: 7px 14px;
        font-size: 1rem;
        border-radius: 6px;
    }
    .fd-nav-group-title {
        min-height: 44px;
        padding: 6px 14px;
        font-size: .82rem;
        border-radius: 6px;
    }
    .fd-nav-group,
    .fd-nav-group-links {
        gap: 4px;
    }
    .fd-nav-group-links a { padding-left: 28px; }
    .fd-sidebar a.fd-sidebar-active { padding-left: 11px !important; }
    .fd-nav-group-links a.fd-sidebar-active { padding-left: 25px !important; }
    .fd-nav-logout-form { padding-top: 12px; }

    .fd-content {
        padding: 18px 4px;
    }
}

.fd-burger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    margin-right: 2px;
}
.fd-burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    margin: 5px 0;
    border-radius: 2px;
}
@media (max-width: 900px) {
    .fd-burger { display: block; }
}

.fd-tree {
    padding: 0 0px 25px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    margin: 25px 0px 5px;
    gap: 4px 7px;
}
.fd-tree-group {
    flex: 0 0 calc(50% - 4px);
}
.fd-tree > .fd-tree-site {
    flex: 0 0 100%;
}
@media (max-width: 767px) {
    .fd-tree-group {
        flex: 0 0 100%;
    }
}

.fd-tree-site {
    background: #fff;
    margin: 0;
    border-radius: 2px;
    box-shadow: 0px 1px 2px rgb(0 0 0 / 59%);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.fd-tree-site summary {
    list-style: none;
}
.fd-tree-site summary::-webkit-details-marker {
    display: none;
}

.fd-tree-site-summary-com {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 6px 9px 6px 15px;
    font-weight: 800;
    background: var(--fd-summary-com-bg);
    color: var(--fd-summary-com-text);
}
.fd-tree-site-summary-com::-webkit-details-marker {
    display: none;
}
.fd-tree-site-summary-ue {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    cursor: pointer;
    padding: 6px 9px 6px 15px;
    font-weight: 800;
    background: var(--fd-summary-com-bg);
    color: var(--fd-summary-com-text);
}
.fd-tree-site-summary-ue::-webkit-details-marker {
    display: none;
}
.fd-tree-site-summary-ue .fd-dash-summary-toggle {
    flex-shrink: 0;
    margin-left: 8px;
}
.fd-summary-name {
    flex-shrink: 0;
    margin-right: auto;
}
.fd-summary-email {
    min-width: 0;
    flex-shrink: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 400;
    font-size: .85rem;
    opacity: .8;
    margin-left: auto;
    margin-right: 8px;
}
@media (max-width: 440px) {
    .fd-tree-site-summary-ue {
        flex-wrap: wrap;
    }
    .fd-tree-site-summary-ue .fd-summary-name {
        flex: 0 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .fd-tree-site-summary-ue .fd-dash-summary-toggle {
        order: 2;
    }
    .fd-tree-site-summary-ue .fd-summary-email {
        order: 3;
        flex: 1 1 100%;
        margin-left: 0;
        margin-right: 0;
    }
}

.fd-tree-site summary:not(.fd-tree-site-summary-ue):not(.fd-accordion-summary-com):not(.fd-equip-summary) > span:first-of-type {
    font-size: 17px;
    text-align: right;
    font-weight: 600;
    color: var(--fd-tree-addr);
    margin-left: auto;
    margin-right: 8px;
}
.fd-tree-site summary:not(.fd-tree-site-summary-ue):not(.fd-accordion-summary-com):not(.fd-equip-summary) > span:first-of-type + .fd-dash-summary-toggle {
    margin-left: 0;
}

@media (max-width: 700px) {
    .fd-tree-site summary:not(.fd-tree-site-summary-ue):not(.fd-accordion-summary-com):not(.fd-equip-summary) > span:first-of-type {
        font-size: .9rem;
        text-align: right;
        font-weight: 400;
        color: var(--fd-tree-addr);
        margin-left: auto;
        margin-right: 8px;
        flex-shrink: 0;
    }
}
.fd-tree-content {
    display: none;
}

.fd-tree-site[open] .fd-tree-content {
    background: transparent;
    display: block;
    margin-bottom: 12px;
}

.fd-tree-fiche,
.fd-tree-action {
    display: block;
    padding: 7px 5px 5px 15px;
    margin: 1px 90px 1px 10px;
    border-radius: 4px;
    text-decoration: none;
    color: var(--fd-primary);
    font-weight: 700;
}
button.fd-tree-action {
    width: 100%;
    text-align: left;
    background: none;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

.fd-tree-fiche:hover,
.fd-tree-action:hover {
    background: rgba(20,33,61,.08);
}

.fd-tree-equipment {
    display: block;
    margin: 0 10px;
    padding: 3px 10px;
    border-radius: 2px;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(45deg, #a4460f, #1f3259);
    margin-top: 8px;
}

.fd-tree-equipment small {
    display: block;
    margin-left: 24px;
    color: rgba(255,255,255,.75);
    font-size: .85rem;
}

.fd-tree-equipment:hover {
    background: linear-gradient(45deg, #c9520d, #1b305f);
}

.fd-equip-summary {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 4px;
    padding: 3px 4px 4px 8px;
    background: linear-gradient(45deg, #a4460f, #1f3259);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: filter .15s;
    text-decoration: none;
}
.fd-equip-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; margin-bottom: 12px; }
.fd-equip-summary:hover { filter: brightness(1.1); }
.fd-equip-summary::-webkit-details-marker { display: none; }
.fd-equip-summary-name {
    flex: 1;
    min-width: 8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 15px;
}
.fd-equip-summary .fd-dash-summary-toggle {
    flex-shrink: 0;
    margin-left: 4px;
}
.fd-equip-summary-sub {
    width: 100%;
    order: 2;
    font-size: .82rem;
    font-weight: 400;
    opacity: .85;
}

.fd-tree-empty {
    color: var(--fd-text-muted);
    font-size: 15px;
    margin: 6px 0px 4px 8px;
}

.fd-tree-group {
    margin: 0;
    border-radius: 7px;
    color: #ffffff;
    overflow: hidden;
    /* box-shadow: 0 1px 4px rgb(0 0 0 / 41%); */
}

.fd-tree-group > summary {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 1px 0;
    padding: 4px 2px 4px 20px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    list-style: none;
    user-select: none;
    background: var(--grp, #4a616d);
    color: var(--grp-text, #fff);
}

.fd-tree-group > summary::-webkit-details-marker { display: none; }

.fd-tree-group > summary .fd-accordion-counts {
    margin-left: auto;
    margin-right: 4px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--grp-text, #fff);
}
.fd-tree-group > summary .fd-dash-summary-toggle {
    color: var(--grp-text, #fff);
    background: var(--grp-veil, rgba(255,255,255,.15));
    border-radius: 4px;
    padding: 5px 5px 3px 5px;
    font-size: .8rem;
    margin: 0 4px 0 5px;
    box-shadow: 0px 0px 1px black;
}
[data-theme="dark"] .fd-tree-group > summary .fd-dash-summary-toggle {
    color: var(--grp-text, #fff);
    background: var(--grp-veil, rgba(180,210,230,.1));
}

.fd-tree-group-content {
    padding: 8px 10px 12px;
    background: #faf8f5;
    columns: 2;
    column-gap: 6px;
}
[data-theme="dark"] .fd-tree-group-content {
    background: #0e1628;
}
.fd-tree-group-content > .fd-tree-site {
    break-inside: avoid;
    margin-bottom: 6px;
}
@media (max-width: 767px) {
    .fd-tree-group-content {
        columns: 1;
    }
}

.fd-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 700;
}

.fd-badge-success {
    background: #e8f5e9;
    color: #2e7d32;
}

.fd-badge-warning {
    border-radius: 12px;
    background: #fdecea;
    color: #b3261e;
    margin: 10px;
    font-weight: 500;
}

.fd-reading-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fd-reading-list li {
    margin-bottom: 10px;
}

.fd-reading-list a {
    display: block;
    padding: 12px 14px;
    border-radius: 10px;
    background: #fbfaf8;
    color: #1f2933;
    text-decoration: none;
}
.fd-reading-list a:hover {
    background: #f8f5f0;
}
.fd-reading-list strong {
    color: var(--fd-primary);
}
@media (max-width: 700px) {
    .fd-reading-list a {
        padding: 14px;
        font-size: .95rem;
    }
    .fd-reading-list li {
        margin-bottom: 12px;
    }
}

.fd-grid-2 {
    text-align: center;
    max-width: 300px;
    margin: 18px auto 0;
    background: 198748;
    color: red;
}
.fd-grid-2 .fd-link-card {
    transition: transform .15s ease, box-shadow .15s ease;
}
.fd-grid-2 .fd-link-card:hover {
    background: #198748;;
    color: black;
    transform: translateY(-2px);
}
.fd-grid-2:hover {
    transform: translateY(-2px);
}
.fd-grid-2 .fd-link-card h2 {
    margin: 0 0 10px;
}
.fd-grid-2 .fd-link-card p {
    margin: 0;
    color: #000000;
}
@media (max-width: 768px) {
    .fd-grid-2 {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

.fd-status-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.fd-status-actions a,
.fd-status-actions button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    padding: 6px 12px !important;
    border-radius: 8px !important;
    text-decoration: none;
    font-size: .85rem;
    font-weight: 700 !important;
    transition: .2s;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.fd-status-actions a:hover,
.fd-status-actions button:hover {
    transform: translateY(-1px);
}

.fd-status-draft {
    background: #fff3e0 !important;
    color: #a04700 !important;
}

.fd-status-completed {
    background: #fbe3d5 !important;
    color: #c9520d !important;
}

.fd-status-validated {
    background: #e8f5e9 !important;
    color: #2e7d32 !important;
}

.fd-status-archived {
    background: #eceff1 !important;
    color: #455a64 !important;
}

.fd-status-deleted {
    background: #ffcfcf !important;
    color: #8e2c2c !important;
}

@media (max-width: 768px) {
    .fd-status-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        justify-content: flex-start;
    }

    .fd-status-actions a,
    .fd-status-actions button {
        width: auto;
        padding: 8px 12px !important;
        margin: 0 !important;
    }
}

.fd-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: .78rem;
    text-align: center;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1.3;
}

.fd-status-badge-draft {
    background: #ededed;
    color: #6d6967;
}

.fd-status-badge-completed {
    background: #fbe3d5;
    color: #c9520d;
}

.fd-status-badge-validated {
    background: #e8f5e9;
    color: #2e7d32;
}

.fd-status-badge-archived {
    background: #eceff1;
    color: #455a64;
}

.fd-user-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .02em;
    white-space: nowrap;
}
.fd-user-status::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.fd-user-status-active {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}
.fd-user-status-active::before {
    background: #43a047;
}
.fd-user-status-inactive {
    background: #eceff1;
    color: #546e7a;
    border: 1px solid #cfd8dc;
}
.fd-user-status-inactive::before {
    background: #90a4ae;
}
[data-theme="dark"] .fd-user-status-active {
    background: #0d2e14;
    color: #66bb6a;
    border-color: #2e5e32;
}
[data-theme="dark"] .fd-user-status-active::before { background: #66bb6a; }
[data-theme="dark"] .fd-user-status-inactive {
    background: #1e2432;
    color: #90a4ae;
    border-color: #2e3d48;
}
[data-theme="dark"] .fd-user-status-inactive::before { background: #546e7a; }

.fd-status-badge-en-cours {
    background: #fff3e0;
    color: #a85913;
}
.fd-status-badge-termine {
    background: #fbe3d5;
    color: #c9520d;
}
.fd-status-badge-valide {
    background: #e8f5e9;
    color: #1c7c44;
}
.fd-status-badge-archive {
    background: #eceff1;
    color: #616d6d;
}

.fd-status-badge-default {
    background: #f5f5f5;
    color: #666;
}
.fd-status-badge-signe {
    background: #e8f5e9;
    color: #1c7c44;
}

[data-theme="dark"] .fd-status-badge-draft     { background: #2a2a2a; color: #a0a0a0; }
[data-theme="dark"] .fd-status-badge-completed { background: #0f1a33; color: #f38546; }
[data-theme="dark"] .fd-status-badge-validated { background: #0d2a18; color: #4fc87a; }
[data-theme="dark"] .fd-status-badge-archived  { background: #1e2a30; color: #8aabb8; }
[data-theme="dark"] .fd-status-badge-en-cours  { background: #3a200a; color: #f0a05a; }
[data-theme="dark"] .fd-status-badge-valide    { background: #0d2a18; color: #4fc87a; }
[data-theme="dark"] .fd-status-badge-archive   { background: #1e2a30; color: #8aabb8; }
[data-theme="dark"] .fd-status-badge-signe     { background: #0d2a18; color: #4fc87a; }
[data-theme="dark"] .fd-status-badge-default   { background: #1e2a30; color: #8aabb8; }

.fd-page-id {
    font-size: .85em;
    font-weight: 700;
    color: #f26b21;
    margin-left: .15em;
}
[data-theme="dark"] .fd-page-id { color: #f38546; }

.fd-page-subtitle {
    font-size: .65em;
    color: var(--fd-text-muted);
    font-weight: 400;
}

.fd-card-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.fd-card-title {
    margin: 0;
    font-weight: 700;
}
.fd-card-meta {
    margin: 3px 0 8px;
    font-size: .82rem;
    color: var(--fd-text-muted);
}

.fd-inline-form {
    display: flex;
    align-items: center;
    gap: 8px;
}
.fd-confier-label {
    white-space: nowrap;
    flex: 0 0 auto;
}
.fd-select-status {
    border: 1px solid #e6daca;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: .85rem;
    cursor: pointer;
    background: var(--fd-card-bg, #fff);
    color: var(--fd-text, #111);
}

.fd-section-title {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--fd-muted);
    margin: 28px 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--fd-border);
}
.fd-section-title:first-of-type {
    margin-top: 20px;
}

.fd-section-title-note {
    font-size: .8em;
    font-weight: 400;
    color: var(--fd-text-muted);
}
.fd-accordion-note {
    font-size: .82rem;
    font-weight: 400;
    color: var(--fd-text-muted);
}
.fd-link-muted {
    color: var(--fd-text-muted);
    text-decoration: none;
    float: right;
}
.fd-link-muted:hover { color: var(--fd-accent); }

.fd-equip-info-block {
    margin-top: 10px;
    padding: 12px 14px;
    background: var(--fd-bg-alt, #faf8f5);
    border: 1px solid var(--fd-border);
    border-radius: 6px;
}
.fd-equip-info-name {
    font-size: .95rem;
    font-weight: 700;
    color: var(--fd-text);
    margin: 0 0 8px;
}
.fd-equip-info-rows { display: flex; flex-direction: column; gap: 4px; }
.fd-equip-info-row  { display: flex; align-items: baseline; gap: 8px; font-size: .82rem; }
.fd-equip-info-label { flex-shrink: 0; width: 52px; color: var(--fd-text-muted); font-weight: 600; }
.fd-equip-info-val   { color: var(--fd-text); }
.fd-equip-info-cache { display: none !important; }
[data-theme="dark"] .fd-equip-info-block { background: #1a2540; }

.fd-addr-name {
    margin: 0;
    font-weight: 700;
}
.fd-addr-line {
    margin: 2px 0 0;
}
.fd-addr-meta {
    margin: 4px 0 0;
    font-size: .85rem;
    color: var(--fd-text-muted);
}

.fd-detail-line {
    margin: 2px 0 0;
    font-size: .85rem;
}

.fd-sig-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}
.fd-sig-block {
    border: 1px solid #f2ece3;
    border-radius: 10px;
    padding: 16px;
    display: grid;
    grid-row: span 3;
    grid-template-rows: subgrid;
    row-gap: 0;
    align-content: start;
}
.fd-sig-corps {
    min-width: 0;
}
.fd-sig-label {
    margin: 0 0 4px;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--fd-text-muted);
    font-weight: 700;
}
.fd-sig-signer {
    margin: 0 0 12px;
    font-weight: 600;
}
.fd-sig-img-wrap {
    border: 1px solid #e6daca;
    border-radius: 8px;
    padding: 6px;
    background: #fcfbf9;
    display: inline-block;
    margin-bottom: 8px;
}
.fd-sig-img {
    max-width: 100%;
    height: 80px;
    display: block;
}
.fd-sig-ok {
    margin: 0 0 8px;
    font-size: .82rem;
    color: #1d8047;
}
.fd-sig-none {
    margin: 0;
    color: var(--fd-text-muted);
    font-size: .85rem;
}
.fd-sig-prompt {
    margin: 0 0 8px;
    font-size: .85rem;
    color: var(--fd-text-muted);
}
.fd-sig-canvas-wrap {
    position: relative;
    border: 2px dashed #e6daca;
    border-radius: 8px;
    background: #fdfcfb;
    touch-action: none;
    max-width: 480px;
}
[data-theme="dark"] .fd-sig-canvas-wrap {
    border-color: var(--fd-border);
    background: var(--fd-card-bg);
}
.fd-sig-canvas {
    display: block;
    width: 100%;
    height: 160px;
    border-radius: 6px;
    cursor: crosshair;
    touch-action: none;
}
.fd-sig-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #5f747e;
    font-size: .9rem;
    pointer-events: none;
    user-select: none;
}
.fd-sig-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 480px;
}
.fd-sig-actions button {
    margin: 0 !important;
}
.fd-sig-block p {
    padding-left: 0;
    padding-right: 0;
}
.fd-sig-entete {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    min-height: 34px;
    margin: 0 0 12px;
}
.fd-sig-entete .fd-sig-signer,
.fd-sig-entete .fd-sig-apply {
    margin: 0;
}
.fd-sig-apposer {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: auto !important;
    margin: 0 !important;
    padding: 6px 12px 6px 7px !important;
    background: var(--fd-btn-bg) !important;
    color: var(--fd-btn-text) !important;
    border: 0 !important;
    border-radius: 6px !important;
    font-size: .85rem !important;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
}
.fd-sig-apposer:hover {
    background: var(--fd-btn-hover) !important;
}
.fd-sig-apposer:focus-visible {
    outline: 2px solid var(--fd-primary);
    outline-offset: 2px;
}
.fd-sig-apposer-plus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--fd-primary);
}
.fd-sig-apposer-plus svg {
    width: 10px;
    height: 10px;
    stroke: #ffffff;
    stroke-width: 2;
    stroke-linecap: round;
    fill: none;
}
@media (max-width: 600px) {
    .fd-sig-entete {
        flex-direction: column;
        align-items: stretch;
        min-height: 0;
    }
    .fd-sig-apposer {
        width: 100% !important;
        padding: 9px 12px !important;
    }
}

.fd-accordion-body-card {
    border-top: none;
    border-radius: 0 0 var(--fd-radius, 2px) var(--fd-radius, 2px);
}
.fd-cf-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.fd-cf-row .fd-drag-handle {
    flex-shrink: 0;
    padding-top: 4px;
    cursor: grab;
}
.fd-cf-body {
    flex: 1;
    min-width: 0;
}
.fd-cf-body label,
.fd-cf-body .fd-label {
    display: block;
    margin-top: 0 !important;
    margin-bottom: 4px;
    font-weight: 600;
}
.fd-cf-body input.fd-input,
.fd-cf-body select.fd-input {
    width: 100%;
    box-sizing: border-box;
    margin-top: 0;
}
.fd-label-mt {
    margin-top: 14px !important;
}
.fd-hidden {
    display: none !important;
}

.fd-sr-only {
    display: inline-block;
    width: 1px;
    height: 1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
.fd-radio-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.fd-radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .93rem;
    cursor: pointer;
}
.fd-client-type {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin: 2px 0 4px;
}
.fd-checkbox-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: .93rem;
    cursor: pointer;
    margin-top: 6px;
}

.fd-dashboard {
    padding: 8px 4px 40px;
}

.fd-dash-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 26px;
    padding: 0 15px;
}
.fd-dash-welcome h1 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--fd-primary);
}
[data-theme="dark"] .fd-dash-welcome h1 {
    color: var(--fd-text);
}
.fd-dash-date {
    margin: 4px 0 0;
    font-size: .9rem;
    color: var(--fd-text-muted);
    padding: 0;
    text-transform: capitalize;
}

.fd-dash-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #444;
    margin: 24px 0 8px 4px;
    text-transform: uppercase;
    letter-spacing: .05em;
}
[data-theme="dark"] .fd-dash-section-title {
    color: var(--fd-text-muted);
}

summary.fd-dash-section-title {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
    font-size: 15px;
    font-weight: 800;
    margin: -12px -16px;
    padding: 10px 16px;
    border-radius: 2px;
    background: var(--fd-summary-bg);
    color: var(--fd-summary-text);
    overflow: hidden;
}
summary.fd-dash-section-title > span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
summary.fd-dash-section-title .fd-dash-summary-count {
    margin-left: auto;
    margin-right: 10px;
    flex-shrink: 0;
}
summary.fd-dash-section-title .fd-dash-summary-count + .fd-dash-summary-toggle {
    margin-left: 0;
}
@media (max-width: 600px) {
    summary.fd-dash-section-title { font-size: 13px; padding: 9px 12px; }
    summary.fd-dash-section-title .fd-dash-summary-count { display: none; }
}
summary.fd-dash-section-title::-webkit-details-marker { display: none; }

details.fd-card[open] > summary.fd-dash-section-title {
    margin-bottom: 12px;
    border-radius: 2px 2px 0 0;
}

.fd-dash-summary-count {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255,255,255,.8);
}
[data-theme="dark"] .fd-dash-summary-count {
    color: rgba(180,210,230,.8);
}

.fd-dash-summary-toggle {
    margin-left: auto;
    font-size: 12px;
    color: inherit;
    background: rgb(215 214 214 / 15%);
    border-radius: 4px;
    box-shadow: 0px 0px 1px #00000070;
    padding: 3px 3px 1px 3px;
    margin: 1px;
    flex-shrink: 0;
    display: inline-block;
    transition: transform .2s ease;
    transform: rotate(-90deg);
}
[data-theme="dark"] .fd-dash-summary-toggle {
    background: rgba(180,210,230,.12);
}
details[open] > summary .fd-dash-summary-toggle {
    transform: rotate(0deg);
}

.fd-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
    margin: 20px 0 20px;
}

.fd-stat-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid var(--fd-border);
    border-radius: 9px;
    padding: 6px 15px 6px 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    text-decoration: none;
    color: inherit;
    transition: transform .15s, box-shadow .15s;
}
.fd-stat-card .fd-stat-label {
    order: 1;
    margin-right: auto;
}
.fd-stat-card .fd-stat-value {
    order: 2;
}
.fd-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
}

.fd-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 46px;
    height: 32px;
    border-radius: 8px;
    background: var(--ico-bg);
    color: var(--ico-c);
}
[data-theme="dark"] .fd-stat-icon {
    opacity: 1;
}

.fd-stat-icon-sites     { --ico-bg: #fbe3d5; --ico-c: #14213d; }
.fd-stat-icon-equip     { --ico-bg: #f3eee7; --ico-c: #c9520d; }
.fd-stat-icon-reports   { --ico-bg: #fff3e0; --ico-c: #e65100; }
.fd-stat-icon-rapides   { --ico-bg: #f3e5f5; --ico-c: #6a1b9a; }
.fd-stat-icon-planning  { --ico-bg: #e8f5e9; --ico-c: #2e7d32; }
.fd-stat-icon-devis     { --ico-bg: #f1eae1; --ico-c: #00695c; }
.fd-stat-icon-companies { --ico-bg: #fce4ec; --ico-c: #880e4f; }

.fd-stat-value {
    font-size: 21px;
    font-weight: 800;
    color: var(--fd-primary);
    line-height: 1;
}

.fd-dash-details { margin-top: 16px; }
.fd-time-muted   { color: var(--fd-text-muted); font-size: .82rem; }
.fd-quick-badge  { color: #ad5c14; font-weight: 600; }
[data-theme="dark"] .fd-quick-badge { color: #f0a040; }

.fd-stat-label {
    font-size: .95rem;
    color: var(--fd-text);
    text-align: left;
    font-weight: 500;
}
[data-theme="dark"] .fd-stat-label {
    color: var(--fd-text-muted);
}

@media (max-width: 700px) {
    .fd-stat-grid {
        margin: 12px 0 16px;
        grid-template-columns: 1fr;
    }
    .fd-dash-welcome h1 {
        font-size: 1.2rem;
    }
}

.fd-chart-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.fd-chart-tab {
    padding: 3px 11px;
    font-size: .76rem;
    font-weight: 600;
    font-family: inherit;
    border: 1.5px solid var(--fd-border);
    border-radius: 20px;
    background: transparent;
    color: var(--fd-text-muted);
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
    line-height: 1.5;
}
.fd-chart-tab:hover { border-color: #f26b21; color: #f26b21; }
.fd-chart-tab.active { background: #a4460f !important; border-color: #a4460f !important; color: #fff !important; }
[data-theme="dark"] .fd-chart-tab { border-color: #2a3a5e; color: #97a1b7; }
[data-theme="dark"] .fd-chart-tab:hover { border-color: #f38546; color: #f38546; }
[data-theme="dark"] .fd-chart-tab.active { background: #a4460f !important; border-color: #a4460f !important; color: #fff !important; }

.fd-dash-charts {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}
.fd-dash-chart-card { padding: 16px 20px; }
.fd-dash-chart-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 8px;
    flex-wrap: wrap;
}
.fd-dash-chart-title {
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--fd-text-muted);
}
.fd-dash-chart-total {
    font-size: .78rem;
    color: var(--fd-text-muted);
}
.fd-chart-header-right {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.fd-chart-tab,
.fd-isel-trigger,
.fd-dash-chart-total {
    white-space: nowrap;
}
.fd-dash-chart-card .fd-chart-wrap {
    position: relative;
    height: 200px;
    overflow: hidden;
    max-width: 100%;
}
.fd-dash-chart-card .fd-chart-wrap canvas {
    max-width: 100% !important;
}

.fd-chart-legend {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px 10px;
    margin-top: 10px;
}
.fd-chart-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.fd-chart-legend-swatch {
    width: 11px;
    height: 11px;
    border-radius: 2px;
    flex-shrink: 0;
}
.fd-chart-legend-label {
    font-size: .74rem;
    color: var(--fd-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 700px) {
    .fd-dash-charts { grid-template-columns: 1fr; }
    .fd-dash-chart-card .fd-chart-wrap { height: 200px; }
}

#fd-dash-blocks {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.fd-dash-block {
    margin: 5px 0;
    position: relative;
}
.fd-dash-drag-handle {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    color: #b0bec5;
    opacity: 0;
    transition: opacity .15s, color .15s, background .15s;
    z-index: 20;
    border-radius: 5px;
    user-select: none;
}
.fd-dash-block:hover .fd-dash-drag-handle { opacity: 1; }
.fd-dash-drag-handle:hover { color: var(--fd-primary); background: rgba(20,33,61,.08); }
.fd-dash-block.fd-dragging { opacity: .45; cursor: grabbing; }
.fd-dash-block.fd-drag-over { outline: 2px dashed #f26b21; outline-offset: 4px; border-radius: 6px; }
.fd-dash-block-accordion > .fd-accordion {
    margin-top: 0;
    margin-bottom: 0;
}
[data-theme="dark"] .fd-dash-drag-handle:hover { color: #f38546; background: rgba(242,107,33,.12); }
[data-theme="dark"] .fd-dash-block.fd-drag-over { outline-color: #f38546; }
.fd-dash-pinned-wrap {
    flex: 0 0 33%;
    max-width: 33%;
    max-height: 72px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.fd-dash-pinned-notice {
    background: #fff8e1;
    border-left: 3px solid #f9a825;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: .88rem;
    color: #5d4037;
    flex-shrink: 0;
}
[data-theme="dark"] .fd-dash-pinned-notice {
    background: #2a2000;
    border-left-color: #f9a825;
    color: #f5d87a;
}

.fd-dash-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px 0 8px 2px;
}
.fd-dash-see-all {
    font-size: .82rem;
    color: var(--fd-primary);
    text-decoration: none;
    font-weight: 500;
}
.fd-dash-see-all:hover { text-decoration: underline; }

.fd-dash-readings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}
@media (max-width: 900px) {
    .fd-dash-readings-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
    .fd-dash-readings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .fd-dash-pinned-wrap {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.fd-dash-reading-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: var(--fd-card-bg);
    border: 1px solid var(--fd-border);
    border-radius: 10px;
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .15s, transform .15s;
}
.fd-dash-reading-card:hover {
    box-shadow: 0 3px 10px rgba(0,0,0,.10);
    transform: translateY(-2px);
}
.fd-dash-reading-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}
.fd-dash-reading-name {
    font-weight: 600;
    font-size: .9rem;
    color: var(--fd-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fd-dash-quick-tag {
    font-size: .7rem;
    flex-shrink: 0;
}
.fd-dash-reading-site {
    font-size: .78rem;
    color: var(--fd-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fd-dash-reading-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2px;
}
.fd-dash-reading-fluid {
    font-size: .78rem;
    font-weight: 600;
    color: var(--fd-primary);
    background: rgba(242,107,33,.10);
    border-radius: 4px;
    padding: 1px 6px;
}
.fd-dash-reading-date {
    font-size: .75rem;
    color: var(--fd-text-muted);
}
.fd-dash-reading-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 6px;
}
.fd-dash-reading-co {
    font-size: .72rem;
    color: var(--fd-text-muted);
}

.fd-dash-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 10px;
    margin: 21px 0;
}

.fd-dash-inactive-list,
.fd-dash-activity-list {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
}

.fd-isel-wrap {
    position: relative;
    display: inline-block;
    vertical-align: baseline;
}
.fd-isel-trigger {
    background: none;
    border: none;
    border-bottom: 1px dashed var(--fd-primary, #f26b21);
    color: var(--fd-primary, #f26b21);
    font-size: inherit;
    font-weight: 600;
    cursor: pointer;
    padding: 0 1px;
    outline: none;
    line-height: inherit;
}
.fd-isel-trigger:hover { border-bottom-style: solid; }
.fd-isel-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--fd-card-bg, #fff);
    border: 1px solid var(--fd-border, #dde3ea);
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,.12);
    padding: 4px 0;
    z-index: 300;
    white-space: nowrap;
    min-width: 80px;
    overflow: hidden;
}
.fd-isel-opt {
    display: block;
    width: 100%;
    padding: 7px 18px;
    font-size: .82rem;
    cursor: pointer;
    color: var(--fd-text);
    text-align: center;
    border-radius: 0;
    transition: background .12s;
}
.fd-isel-opt:hover { background: var(--fd-hover-bg, #f9f6f2); }
.fd-isel-opt input[type="radio"] { display: none; }
.fd-isel-opt.fd-isel-checked {
    color: var(--fd-primary, #f26b21);
    font-weight: 700;
    background: rgba(242,107,33,.07);
}

.fd-dash-inactive-list li {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 0 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--fd-border);
}
.fd-dash-inactive-list li:last-child { border-bottom: none; }
.fd-dash-inactive-name {
    font-size: .88rem;
    font-weight: 600;
    color: var(--fd-primary);
    text-decoration: none;
    grid-column: 1;
}
.fd-dash-inactive-name:hover { text-decoration: underline; }
.fd-dash-inactive-co {
    font-size: .75rem;
    color: var(--fd-text-muted);
    grid-column: 1;
}
.fd-dash-inactive-date {
    font-size: .75rem;
    color: var(--fd-text-muted);
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
    white-space: nowrap;
}

.fd-dash-activity-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid var(--fd-border);
}
.fd-dash-activity-list li:last-child { border-bottom: none; }
.fd-dash-act-ico {
    width: 28px; height: 28px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: .72rem; font-weight: 800;
    flex-shrink: 0;
    background: #88888820; color: #5f5f5f;
}

.fd-dash-act-ico-bon        { background: #e67e2220; color: #a25512; }
.fd-dash-act-ico-devis      { background: #00897b20; color: #00695c; }
.fd-dash-act-ico-facture    { background: #c2185b20; color: #9c1248; }

[data-theme="dark"] .fd-dash-act-ico            { color: #a8a8a8; }
[data-theme="dark"] .fd-dash-act-ico-bon        { color: #d48948; }
[data-theme="dark"] .fd-dash-act-ico-devis      { color: #4db6ac; }
[data-theme="dark"] .fd-dash-act-ico-facture    { color: #e8698f; }
.fd-dash-act-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.fd-dash-act-label {
    font-size: .85rem;
    font-weight: 500;
    color: var(--fd-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fd-dash-act-type {
    font-size: .72rem;
    font-weight: 700;
    color: var(--fd-text-muted);
    margin-right: 5px;
}
.fd-dash-act-sub {
    font-size: .75rem;
    color: var(--fd-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fd-dash-act-time {
    font-size: .72rem;
    color: var(--fd-text-muted);
    white-space: nowrap;
    text-decoration: none;
    flex-shrink: 0;
}
.fd-dash-act-time:hover { color: var(--fd-primary); }

.fd-dash-widget {
    display: flex;
    flex-direction: column;
    padding: 16px 20px;
}
.fd-dash-widget-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--fd-border);
}
.fd-wpn-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}
.fd-wpn-info {
    font-size: .75rem;
    color: var(--fd-text-muted);
    min-width: 56px;
    text-align: center;
}
.fd-wpn-perpage,
.fd-card .fd-wpn-perpage {
    font-size: .78rem !important;
    font-weight: 400;
    padding: 0 4px 0 6px !important;
    border: 1.5px solid #e6daca !important;
    border-radius: 2px;
    background: #fff !important;
    color: var(--fd-primary) !important;
    cursor: pointer;
    width: 62px !important;
    height: 30px !important;
    margin: 0 !important;
    line-height: 30px;
    transition: background .12s, border-color .12s;
    appearance: auto;
}
.fd-wpn-perpage:hover,
.fd-card .fd-wpn-perpage:hover { background: #f4efe7 !important; }
[data-theme="dark"] .fd-wpn-perpage,
[data-theme="dark"] .fd-card .fd-wpn-perpage {
    background: #1a2540 !important;
    border-color: #2a3a5e !important;
    color: #e6daca !important;
}
[data-theme="dark"] .fd-wpn-perpage:hover,
[data-theme="dark"] .fd-card .fd-wpn-perpage:hover {
    background: #223052 !important;
    border-color: #5e6a87 !important;
}

.fd-report-number {
    font-family: monospace;
    font-size: .82rem;
    background: #f7f3ee;
    color: var(--fd-primary);
    padding: 2px 7px;
    border-radius: 6px;
    white-space: nowrap;
}

.fd-report-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.fd-btn-sm {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: .78rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    border: none;
}

.fd-btn-view   { background: #fbe3d5; color: var(--fd-primary); }
.fd-btn-dl     { background: #e8f5e9; color: #2e7d32; }
.fd-btn-regen  { background: #fff3e0; color: #e65100; }

.fd-btn-view:hover  { background: #e8ddce; }
.fd-btn-dl:hover    { background: #c8e6c9; }
.fd-btn-regen:hover { background: #ffe0b2; }

.fd-inline-alert {
    display: inline-block;
    margin: 0 0 15px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #fff3cd;
    color: #856404;
    font-size: .9rem;
    font-weight: 700;
}

.fd-pdf-card {
    margin-top: 18px;
    text-align: center;
    background: none;
    box-shadow: none;
}

.fd-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0px 20px 14px;
    padding-top: 11px;
}
.fd-card-actions-row {
    flex-direction: row !important;
    justify-content: flex-start;
}
.fd-bon-rail-bas {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
}
.fd-equipment-actions {
    flex-direction: column;
    align-items: flex-start;
}
.fd-equipment-actions .fd-main-button-inline {
    width: 200px;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
    justify-content: center;
}
@media (min-width: 901px) {
    .fd-equipment-actions {
        flex-direction: row;
        flex-wrap: nowrap;
    }
}
.fd-card-actions form {
    display: contents;
}

.fd-card-actions .fd-button,
.fd-card-actions .fd-main-button-inline {
    box-sizing: border-box;
    min-height: 32px;
}

.fd-button-sm {
    font-size: .82rem;
    padding: 6px 12px;
    min-width: 30px;
    white-space: nowrap;
    text-align: center;
    margin: 1px 0;
}

.fd-accordion-empty {
    padding: 16px;
    color: var(--fd-text-muted);
    text-align: center;
}

.fd-analyse-month {
    margin: 16px 0 8px;
}
.fd-analyse-month-past .fd-analyse-month-title {
    color: var(--fd-text-muted);
}
.fd-analyse-month-title {
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--fd-primary);
    padding: 6px 0 4px;
    border-bottom: 1px solid #eae1d4;
    margin: 0 0 10px;
}
.fd-analyse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
}
.fd-analyse-card {
    display: block;
    background: #fafafa;
    border-radius: 6px;
    border-left: 4px solid #b9c0cf;
    padding: 12px 14px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 4px rgba(20,33,61,.08);
    transition: box-shadow .15s;
}
.fd-analyse-card:hover {
    box-shadow: 0 3px 10px rgba(20,33,61,.14);
}
.fd-analyse-card-overdue  { border-left-color: #e53935; background: #fff5f5; }
.fd-analyse-card-urgent   { border-left-color: #f57c00; background: #fff8f0; }
.fd-analyse-card-ok       { border-left-color: #43a047; background: #f4fbf4; }
.fd-analyse-card-site {
    font-size: .75rem;
    font-weight: 600;
    color: var(--fd-text-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 2px;
}
.fd-analyse-card-name {
    font-size: .95rem;
    font-weight: 700;
    color: var(--fd-primary);
    margin-bottom: 4px;
}
.fd-analyse-card-meta {
    font-size: .78rem;
    color: var(--fd-text-muted);
    margin-bottom: 8px;
}
.fd-analyse-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}
.fd-analyse-interval {
    font-size: .72rem;
    font-weight: 600;
    background: #fbe3d5;
    color: var(--fd-primary);
    border-radius: 4px;
    padding: 2px 7px;
}
.fd-analyse-days {
    font-size: .8rem;
    font-weight: 700;
    border-radius: 4px;
    padding: 2px 8px;
}
.fd-analyse-card-overdue-badge { background: #fde8e8; color: #c62828; }
.fd-analyse-card-urgent-badge  { background: #fef0e0; color: #bd4300; }
.fd-analyse-card-ok-badge      { background: #e8f5e9; color: #2e7d32; }
.fd-analyse-card-lastdate {
    font-size: .72rem;
    color: var(--fd-text-muted);
    margin-top: 6px;
}
.fd-analyse-loss { color: #c62828; font-weight: 600; }

.fd-dormants-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 16px;
    background: #faf8f5;
    border-bottom: 1px solid #dde3ea;
    flex-wrap: wrap;
}
.fd-dormants-toolbar-label {
    font-size: .82rem;
    font-weight: 700;
    color: var(--fd-text-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
}
.fd-dormants-radio {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .9rem;
    cursor: pointer;
    font-weight: 400;
}
.fd-dormants-radio input[type="radio"] {
    accent-color: #14213d;
    cursor: pointer;
}
.fd-analyse-gain { color: #2e7d32; font-weight: 600; }
.fd-toolbar-label {
    font-size: .82rem;
    font-weight: 600;
    color: var(--fd-text-muted);
}
.fd-toolbar-scope {
    font-size: .75rem;
    color: var(--fd-text-muted);
    font-style: italic;
    white-space: nowrap;
}
@media (max-width: 600px) {
    .fd-toolbar-scope { display: none; }
}
@media (max-width: 600px) {
    .fd-analyse-grid {
        grid-template-columns: 1fr;
    }
}

.fd-th-sort {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
.fd-table th.fd-th-sort {
    padding-top: 2px;
    padding-bottom: 2px;
}
.fd-th-sort-btn {
    all: unset !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    min-height: 24px !important;
}
.fd-th-sort-btn:focus-visible {
    outline: 2px solid var(--fd-primary) !important;
    outline-offset: 2px !important;
}
.fd-th-sort:hover {
    color: #f26b21;
}
.fd-th-sort::after {
    content: ' \2195';
    opacity: .35;
    font-size: .8em;
}
.fd-th-sort[data-sort-dir="asc"]::after {
    content: ' \2191';
    opacity: 1;
    color: var(--fd-primary);
}
.fd-th-sort[data-sort-dir="desc"]::after {
    content: ' \2193';
    opacity: 1;
    color: var(--fd-primary);
}

.fd-td-id {
    font-weight: 600;
    color: var(--fd-primary);
    white-space: nowrap;
}
.fd-td-date {
    white-space: nowrap;
    font-size: .88rem;
}
.fd-td-sm {
    font-size: .85rem;
}

.fd-td-muted {
    font-size: .82rem;
    color: var(--fd-text-muted);
}

.fd-meta-info {
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
    font-size: .85rem;
    color: var(--fd-text-muted);
}

.fd-card-danger {
    border-left: 4px solid #dc2626;
}
.fd-card-danger h2 {
    color: #dc2626;
    margin-bottom: 14px;
}
.fd-card-danger .fd-danger-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.fd-card-danger .fd-danger-actions form {
    margin: 0;
}
.fd-card-danger .fd-danger-actions button,
.fd-card-danger .fd-danger-actions .fd-button {
    margin: 0;
}

.fd-company-title {
    margin-top: 28px;
    margin-bottom: 12px;
}

.fd-user-card {
    margin-bottom: 12px;
}
.fd-admin-stat-line {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    padding: 10px 18px;
    background: #f7f4ef;
    border-radius: 6px;
    margin-bottom: 16px;
}
.fd-admin-stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--fd-primary);
}
.fd-admin-stat-label {
    font-size: .9rem;
    color: var(--fd-text-muted);
}

.fd-folder-hint {
    font-size: .82rem;
    color: var(--fd-text-muted);
    margin: 2px 0 8px;
    line-height: 1.5;
}
[data-theme="dark"] .fd-folder-hint {
    color: #9ca5ba;
}

.fd-sig-apply {
    margin-bottom: 8px;
}
.fd-sig-or {
    font-size: .82rem;
    color: var(--fd-text-muted);
    margin: 4px 0 8px;
}
[data-theme="dark"] .fd-sig-or {
    color: #9ca5ba;
}

.fd-photo-trashed .fd-photo-img {
    filter: grayscale(35%);
}
.fd-photo-trash-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}
.fd-photo-trash-actions form {
    display: inline;
    margin: 0;
}

.fd-trash-cat-list {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
}
.fd-trash-cat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 8px 0;
    border-bottom: 1px solid #efe9e0;
}
[data-theme="dark"] .fd-trash-cat-item {
    border-bottom-color: #1e2e54;
}
.fd-trash-cat-item:last-child {
    border-bottom: none;
}
.fd-trash-cat-name {
    flex: 1;
    min-width: 160px;
    font-weight: 600;
}
.fd-trash-cat-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.fd-trash-cat-actions form {
    display: inline;
}

.fd-trash-item {
    border-left: 3px solid #e74c3c;
}

.fd-tr-node {
    display: block;
    margin-bottom: 10px;
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgb(0 0 0 / 22%);
}
.fd-tr-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    list-style: none;
    font-weight: 700;
}
.fd-tr-head::-webkit-details-marker {
    display: none;
}
.fd-tr-head::after {
    content: '\25B8';
    margin-left: auto;
    font-size: 1rem;
    line-height: 1;
    transition: transform .15s ease;
}
.fd-tr-node[open] > .fd-tr-head::after {
    transform: rotate(90deg);
}
.fd-tr-count {
    font-size: .8rem;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 999px;
    background: rgb(0 0 0 / 22%);
}
.fd-tr-body {
    padding: 10px 12px;
    background: #faf8f5;
}
[data-theme="dark"] .fd-tr-body {
    background: #0e1628;
}

.fd-tr-company > .fd-tr-head {
    background: linear-gradient(45deg, #2c3750, #1a202f);
    color: #fff;
}

.fd-tr-cat > .fd-tr-head           { color: #fff; }
.fd-tr-cat-users > .fd-tr-head     { background: linear-gradient(45deg, #5d4e8a, #3d3060); }
.fd-tr-cat-sites > .fd-tr-head     { background: linear-gradient(45deg, #c9520d, #1e3569); }
.fd-tr-cat-equips > .fd-tr-head    { background: linear-gradient(45deg, #1a7a6e, #0f5248); }
.fd-tr-cat-readings > .fd-tr-head  { background: linear-gradient(45deg, #6b7280, #4b5563); }

.fd-tr-item {
    margin-bottom: 6px;
    box-shadow: 0 1px 2px rgb(0 0 0 / 16%);
}
.fd-tr-item > .fd-tr-head {
    background: #fff;
    color: #14213d;
    font-weight: 600;
    padding: 9px 14px;
}
.fd-tr-date {
    font-size: .85rem;
    font-weight: 400;
    color: var(--fd-text-muted);
    margin-left: auto;
}
.fd-tr-item > .fd-tr-head::after {
    margin-left: 12px;
    color: var(--fd-text-muted);
}
.fd-tr-item-body {
    padding: 2px 14px 12px;
    background: #fff;
}
[data-theme="dark"] .fd-tr-item > .fd-tr-head,
[data-theme="dark"] .fd-tr-item-body {
    background: #16213a;
}
[data-theme="dark"] .fd-tr-item > .fd-tr-head {
    color: #e6daca;
}
[data-theme="dark"] .fd-tr-date,
[data-theme="dark"] .fd-tr-item > .fd-tr-head::after {
    color: #9ca5ba;
}

@media (max-width: 600px) {
    .fd-tr-head {
        flex-wrap: wrap;
    }
    .fd-tr-date {
        width: 100%;
        margin-left: 0;
    }
}
.fd-trash-meta {
    font-size: .85rem;
    color: var(--fd-text-muted);
    margin: 3px 0px 16px 0px;
}
.fd-trash-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
    flex-wrap: wrap;
}
.fd-trash-actions form {
    display: flex;
}
@media (max-width: 600px) {
    .fd-trash-actions { flex-direction: column; }
    .fd-trash-actions form { width: 100%; }
    .fd-trash-actions form button { width: 100%; }
}

.fd-archivage-title {
    margin-top: 32px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #efe9e0;
    color: #14213d;
    font-size: 1.25rem;
}
[data-theme="dark"] .fd-archivage-title {
    border-bottom-color: #2a395c;
    color: #e6daca;
}

.fd-role-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 700;
    margin-right: 6px;
}

.fd-role-super-admin {
    background: #fde2e2;
    color: #b91c1c;
}

.fd-role-admin {
    background: #fbe3d5;
    color: #c9520d;
}

.fd-role-user {
    background: #e8f5e9;
    color: #2e7d32;
}

.fd-role-default {
    background: #f3f4f6;
    color: #4b5563;
}

.fd-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 10px 14px;
    background: #f5f7f9;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.95rem;
}

.fd-breadcrumb a {
    color: var(--fd-primary);
    text-decoration: none;
    font-weight: 500;
}

.fd-breadcrumb a:hover {
    text-decoration: underline;
}

.fd-breadcrumb span {
    color: #5a6b7d;
    font-weight: 600;
}

.fd-breadcrumb strong {
    color: #111827;
    font-weight: 700;
}

[data-theme="dark"] .fd-breadcrumb {
    background: var(--fd-card-bg);
    border-color: var(--fd-border);
    --fd-bc-link: #f48d52;
}
[data-theme="dark"] .fd-breadcrumb a {
    color: var(--fd-bc-link);
}
[data-theme="dark"] .fd-breadcrumb span {
    color: #94a3b8;
}
[data-theme="dark"] .fd-breadcrumb strong {
    color: var(--fd-text);
}

@media (max-width: 700px) {
    .fd-breadcrumb {
        gap: 6px;
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

.fd-back-stack {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin: 10px;
}
.fd-back-stack .fd-back-button {
    margin: 0;
}
.fd-actions-top {
    min-height: 44px;
    margin: 6px 0px 0 17px;
    display: flex;
    align-items: center;
}
@media (max-width: 600px) {
    h1 {
        text-align: center;
        margin: 4px 0 14px;
    }
}
.fd-back-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 9px 2px 2px;
    margin: 10px;
    background: var(--fd-btn-bg);
    border-radius: 4px;
    text-decoration: none;
    color: var(--fd-btn-text);
    font-size: 13px;
    font-weight: 500;
}
.fd-back-secondary {
    background: var(--fd-body-bg);
    color: var(--fd-text-muted);
    font-weight: 400;
    font-size: 13px;
}
.fd-back-secondary .fd-back-icon {
    background: var(--fd-border);
    color: var(--fd-primary);
}
.fd-back-icon {
    display: inline-block;
    font-size: 12px;
    background: var(--fd-border);
    padding: 5px 6px 3px 5px;
    border-radius: 4px;
    transform: rotate(90deg);
    color: var(--fd-primary);
}
[data-theme="dark"] .fd-back-icon {
    color: #f48d52;
}

#fd-offline-banner {
    display: none;
}
.fd-offline-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    font-size: .85rem;
    font-weight: 600;
}

.fd-offline-banner--offline {
    background: #fff3cd;
    color: #856404;
}

.fd-offline-banner--pending {
    background: #fbe3d5;
    color: #c9520d;
}

.fd-offline-banner--offline #fd-offline-label::before {
    content: '\26A0  Mode hors ligne';
}

.fd-offline-banner--pending #fd-offline-label::before {
    content: '\2191 Synchronisation en cours';
}

.fd-stepper {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #ded4c5;
    border-radius: 6px;
    background: #f9f6f2;
    color: var(--fd-primary);
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 32px;
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    box-shadow: none;
}

.fd-stepper:active {
    background: #fbe3d5;
    transform: scale(0.95);
}

.fd-stepper:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.fd-measure-range {
    display: block;
    font-size: 11px;
    color: #5a7080;
    margin-top: 2px;
    margin-bottom: 4px;
    font-weight: 400;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
}

.fd-measure-card--ok {
    border-color: #2e7d32;
    border-width: 1px 1px 1px 4px;
}

.fd-measure-card--warn {
    border-color: #f0a500;
    border-width: 1px 1px 1px 4px;
    background: #fffdf0;
}

@media (max-width: 700px) {
    .fd-stepper {
        width: 30px;
        height: 36px;
        line-height: 36px;
        font-size: 1.2rem;
    }
    .fd-input-row {
        gap: 4px;
    }
    .fd-input-row span {
        font-size: .78rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 28px;
    }
}

.fd-accordion {
    border: 1px solid var(--fd-border);
    border-radius: 6px;
    margin: 1px 0px;
    background: var(--fd-card-bg);
    box-shadow: 0 1px 4px rgba(20,33,61,.07);
}
.fd-summary {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    padding: 8px 11px 8px 15px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    color: var(--fd-text);
    background: var(--fd-card-bg);
    border-radius: 2px;
    border-bottom: 1px solid var(--fd-border-light);
    list-style: none;
    user-select: none;
    overflow: hidden;
    transition: background .15s;
}
.fd-summary:hover {
    background: var(--fd-btn-bg);
}
.fd-summary > span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fd-summary::-webkit-details-marker { display: none; }
details[open] > .fd-summary {
    border-radius: 4px 4px 0 0;
}

.fd-accordion-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 11px 8px 22px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    color: var(--fd-accordion-com-text);
    background: var(--fd-accordion-com-bg);
    border-radius: 2px;
    list-style: none;
    user-select: none;
    border-left: none;
    transition: filter .15s;
    overflow: hidden;
}
.fd-accordion-group {
    display: flex;
    flex-direction: column;
    gap: 0px;
    margin-top: 3px;
}
.fd-accordion-summary > span:first-child {
    min-width: 0;
    flex: 1 1 auto;
    white-space: normal;
    overflow-wrap: anywhere;
}
.fd-accordion-right {
    flex-shrink: 0;
    min-width: 0;
}
@media (max-width: 600px) {
    .fd-accordion-summary {
        font-size: .9rem;
        padding: 8px 8px 8px 22px;
        flex-wrap: nowrap;
    }
    .fd-accordion-summary .fd-accordion-counts {
        display: none;
    }
    .fd-accordion-summary > span:first-child:not(.fd-accordion-note) {
        font-size: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        overflow-wrap: normal;
    }
}
.fd-accordion-summary:hover {
    filter: brightness(1.08);
}
.fd-accordion-toggle {
    margin-left: auto;
    font-size: 16px;
    color: #10182b;
    background: rgba(255, 255, 255, .15);
    box-shadow: 0px 0px 1px #282828;
    border-radius: 4px;
    padding: 4px 3px 0px 3px;
    flex-shrink: 0;
    display: inline-block;
    transition: transform .2s ease;
    transform: rotate(-90deg);
}
details[open] > summary .fd-accordion-toggle {
    transform: rotate(0deg);
}

.fd-accordion-summary.fd-accordion-summary-dark {
    background: linear-gradient(45deg, #172850, #0c152b);
}
[data-theme="dark"] .fd-accordion-summary.fd-accordion-summary-dark {
    background: linear-gradient(45deg, #101c37, #090f1d);
}
.fd-accordion-summary::-webkit-details-marker { display: none; }
details[open] > .fd-accordion-summary {
    border-radius: 4px 4px 0 0;
}

.fd-accordion-summary-com {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2px;
    padding: 2px 3px 2px 17px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    color: var(--fd-accordion-com-text);
    background: var(--fd-accordion-com-bg);
    border-radius: 6px;
    list-style: none;
    user-select: none;
    border-left: none;
    transition: filter .15s;
    flex-wrap: wrap;
}
.fd-accordion-summary-com .fd-sum-name {
    flex: 1;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-left: 0;
    margin-right: 0;
    font-size: 14px;
    color: inherit;
    text-align: left;
}
.fd-accordion-summary-com .fd-sum-addr {
    width: 100%;
    order: 2;
    font-weight: 400;
    font-size: .85rem;
    opacity: .75;
}
.fd-accordion-summary-com .fd-sum-cpcity {
    width: 100%;
    order: 3;
    font-weight: 400;
    font-size: .85rem;
    opacity: .75;
}
.fd-accordion-summary-com .fd-dash-summary-toggle {
    order: 1;
    margin-left: auto;
    flex-shrink: 0;
    align-self: flex-start;
}
.fd-accordion-summary-com .fd-accordion-right {
    order: 1;
    margin-left: auto;
    flex-shrink: 0;
    align-self: flex-start;
    display: flex;
    align-items: center;
    gap: 6px;
}
.fd-accordion-summary-com:hover {
    background: #6d859c36;
}
.fd-accordion-summary-com::-webkit-details-marker { display: none; }
details[open] > .fd-accordion-summary-com {
    border-radius: 4px 4px 0 0;
}
@media (max-width: 600px) {
    .fd-accordion-summary-com {
        font-size: .9rem;
        padding: 4px 5px 4px 22px;
    }
    .fd-accordion-summary-com .fd-accordion-counts {
        display: none;
    }
    .fd-flat-accordion > .fd-accordion-summary-com .fd-accordion-counts,
    .fd-flat-accordion > .fd-accordion-summary .fd-accordion-counts {
        display: inline;
        font-size: .78rem;
    }
    .fd-flat-accordion > .fd-accordion-summary-com {
        flex-wrap: nowrap;
    }
    .fd-flat-accordion > .fd-accordion-summary-com > span:first-child {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .fd-flat-accordion > .fd-accordion-summary-com .fd-accordion-right,
    .fd-flat-accordion > .fd-accordion-summary .fd-accordion-right {
        flex-shrink: 0;
    }
}

.fd-accordion-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}
.fd-accordion-right .fd-accordion-toggle {
    margin-left: 0;
}

.fd-accordion-counts {
    font-size: .82rem;
    font-weight: 500;
    color: #0e1628;
    font-size: 16px;
    margin-right: 12px;
    margin-left: 12px;
    min-width: 0;
    overflow-wrap: anywhere;
}
[data-theme="dark"] .fd-accordion-counts {
    color: #dfd0bc;
}

.fd-quota-badge {
    display: inline-block;
    font-size: 15px;
    font-weight: 700;
    padding: 7px 13px;
    border-radius: 20px;
    background: #f3eee7;
    color: #c9520d;
    border: 1px solid #e2d5c2;
    vertical-align: middle;
    margin-left: 8px;
}
.fd-quota-badge.fd-quota-full {
    background: #fde8e8;
    color: #c0392b;
    border-color: #f5c6c6;
}

.fd-nav-card {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 36px 14px 17px;
    padding: 4px 14px 4px 2px;
    background: #c9520d;
    border-radius: 3px;
    text-decoration: none;
    color: #ffffff;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: filter .15s;
}
.fd-nav-card:hover {
    filter: brightness(1.06);
    color: #111e3b;
}
.fd-nav-card span {
    color: #ffffff;
    font-size: 22px;
    padding: 0px 8px 3px;
    margin: 0px 5px 0px 4px;
    background: #1b2e5c;
    border-radius: 5px;
}

.fd-accordion-sub {
    margin: 6px 12px;
    border-color: #ebe2d5;
    box-shadow: none;
}
.fd-accordion-summary-sub .fd-accordion-counts {
    color: #6a7898;
    font-weight: 400;
}

.fd-accordion-summary-sub {
    font-size: .9rem;
    color: #0c1428;
    font-weight: 600;
    padding: 10px 14px;
    background: linear-gradient(90deg, #f9f6f2 0%, #fcfbf9 100%);
    border-left-color: #f3813f;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.fd-accordion-summary-sub .fd-accordion-toggle {
    color: #fff;
    background: rgba(0, 0, 0, .22);
}
.fd-accordion-summary-sub:hover {
    background: linear-gradient(90deg, #f3ede5 0%, #f9f6f2 100%);
}
details[open] > .fd-accordion-summary-sub {
    background: linear-gradient(90deg, #f3ede5 0%, #f9f6f2 100%);
}

[data-theme="dark"] .fd-accordion-summary-sub {
    color: var(--fd-text);
    background: linear-gradient(90deg, #121b30 0%, #1a2540 100%);
    border-left-color: #c9520d;
}
[data-theme="dark"] .fd-accordion-summary-sub .fd-accordion-counts {
    color: var(--fd-text-muted);
}
[data-theme="dark"] .fd-accordion-summary-sub:hover,
[data-theme="dark"] details[open] > .fd-accordion-summary-sub {
    background: linear-gradient(90deg, #1a2540 0%, #1e2d50 100%);
}

.fd-accordion-sub:not([data-doc-type]) > .fd-accordion-summary-sub {
    background: linear-gradient(45deg, #a4460f, #1f3259);
    color: #fff;
    border-left-color: #1b305f;
}
.fd-accordion-sub:not([data-doc-type]) > .fd-accordion-summary-sub .fd-accordion-counts {
    color: rgba(255,255,255,.88);
}
.fd-accordion-sub:not([data-doc-type]) > .fd-accordion-summary-sub:hover,
.fd-accordion-sub:not([data-doc-type])[open] > .fd-accordion-summary-sub {
    background: linear-gradient(45deg, #c9520d, #1b305f);
}
[data-theme="dark"] .fd-accordion-sub:not([data-doc-type]) > .fd-accordion-summary-sub {
    background: linear-gradient(45deg, #c9520d, #152549);
    color: #eae0d3;
    border-left-color: #182952;
}
[data-theme="dark"] .fd-accordion-sub:not([data-doc-type]) > .fd-accordion-summary-sub:hover,
[data-theme="dark"] .fd-accordion-sub:not([data-doc-type])[open] > .fd-accordion-summary-sub {
    background: linear-gradient(45deg, #c9520d, #192c58);
}

#fd-report-sites [data-doc-type="releves"] { --doc-c: #f26b21; --doc-bg: #f26b2120; --doc-bg2: #f26b2136; }
#fd-report-sites [data-doc-type="cerfas"]  { --doc-c: #7b68ee; --doc-bg: #7b68ee20; --doc-bg2: #7b68ee36; }
#fd-report-sites [data-doc-type="bons"]    { --doc-c: #e67e22; --doc-bg: #e67e2220; --doc-bg2: #e67e2236; }
#fd-report-sites [data-doc-type="assemblage"] { --doc-c: #16a085; --doc-bg: #16a08520; --doc-bg2: #16a08536; }
#fd-report-sites [data-doc-type="devis"]      { --doc-c: #b8860b; --doc-bg: #b8860b20; --doc-bg2: #b8860b36; }
#fd-report-sites [data-doc-type="factures"]   { --doc-c: #d6336c; --doc-bg: #d6336c20; --doc-bg2: #d6336c36; }

#fd-report-sites [data-doc-type] > .fd-accordion-summary-sub {
    background: var(--doc-bg);
    color: var(--fd-text);
    border-left: 3px solid var(--doc-c);
}
#fd-report-sites [data-doc-type] > .fd-accordion-summary-sub .fd-accordion-counts {
    color: var(--fd-text);
}
#fd-report-sites [data-doc-type] > .fd-accordion-summary-sub:hover,
#fd-report-sites [data-doc-type][open] > .fd-accordion-summary-sub {
    background: var(--doc-bg2);
}

#fd-report-sites .fd-report-equip > .fd-accordion-summary-sub {
    background: linear-gradient(45deg, #a4460f, #1f3259);
    color: #fff;
    border-left-color: #1b305f;
}
#fd-report-sites .fd-report-equip > .fd-accordion-summary-sub .fd-accordion-counts {
    color: rgba(255,255,255,.88);
}
#fd-report-sites .fd-report-equip > .fd-accordion-summary-sub:hover,
#fd-report-sites .fd-report-equip[open] > .fd-accordion-summary-sub {
    background: linear-gradient(45deg, #c9520d, #1b305f);
}
[data-theme="dark"] #fd-report-sites .fd-report-equip > .fd-accordion-summary-sub {
    background: linear-gradient(45deg, #c9520d, #152549);
    color: #eae0d3;
    border-left-color: #182952;
}
[data-theme="dark"] #fd-report-sites .fd-report-equip > .fd-accordion-summary-sub:hover,
[data-theme="dark"] #fd-report-sites .fd-report-equip[open] > .fd-accordion-summary-sub {
    background: linear-gradient(45deg, #c9520d, #192c58);
}

.fd-pagination {
    display: flex;
    gap: 4px;
    padding: 4px 10px 8px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.fd-period-pill {
    padding: 6px 14px;
    border-radius: 4px;
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    background: #f8f5f0;
    color: var(--fd-text-muted);
    transition: background .15s, color .15s;
}
.fd-period-pill.active,
.fd-period-pill:hover {
    background: var(--fd-primary);
    color: #fff;
}
.fd-period-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 12px;
}
.fd-period-nav a {
    text-decoration: none;
    color: var(--fd-primary);
    font-weight: 700;
    font-size: 1.1rem;
    padding: 2px 6px;
}
.fd-period-nav strong {
    font-size: .95rem;
    min-width: 120px;
    text-align: center;
    display: inline-block;
}
.fd-period-nav strong.fd-period-nav--year {
    min-width: 60px;
}

.fd-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    color: var(--fd-primary);
    background: #fbe3d5;
    border-radius: 6px;
    padding: 3px 6px;
    margin-bottom: 5px;
    text-decoration: none;
    vertical-align: middle;
    line-height: 1;
}
.fd-nav-link:hover {
    background: #e8ddce;
}
[data-theme="dark"] .fd-nav-link {
    background: rgba(246, 160, 110, .16);
}
@media (max-width: 768px) {
    .fd-nav-link {
        min-width: 40px;
        min-height: 40px;
    }
}
.fd-nav-link svg {
    display: block;
}

.fd-logo-preview-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #faf8f5;
    border: 1px solid #dde3ea;
    border-radius: 6px;
    padding: 10px 16px;
    margin: 6px 0 16px;
}
.fd-logo-preview {
    display: block;
    max-width: 140px;
    max-height: 56px;
    object-fit: contain;
}

.fd-form-row {
    display: flex;
    gap: 12px;
}
.fd-form-row > div {
    flex: 1;
    /* Colonne : le libellé prend la hauteur qui reste, si bien que les champs
       s'alignent par le bas même quand l'un des libellés passe sur deux lignes
       et l'autre non. Sans cela, « Email professionnel (affiché sur les
       documents PDF) » repliait sur deux lignes et son champ descendait seul. */
    display: flex;
    flex-direction: column;
}
.fd-form-row > div > label {
    flex: 1 0 auto;   /* grandit, mais jamais en deçà de son propre texte */
}
.fd-form-row label {
    display: block;
}
.fd-form-row-haut {
    align-items: flex-start;
}
/* Deux rangées qui se suivent se touchaient : il ne restait que les 8px de marge
   du libellé entre le champ du dessus et celui du dessous, si bien que les paires
   ne se lisaient plus comme des paires. Le sélecteur ne vise qu'une rangée
   précédée d'une autre : les pages qui n'en ont qu'une ne bougent pas. */
.fd-form-row + .fd-form-row {
    margin-top: 14px;
}
/* Une ligne à cocher qui suit une rangée de champs : même respiration que le
   reste du formulaire. Le sélecteur est le frère général et non l'adjacent : sur
   « Mon profil », le bloc de confirmation du mot de passe s'intercale entre les
   deux, et « + » ne trouvait rien. La règle ne vise pas .fd-label-mt, qui sert
   à plus de cent endroits de l'application. */
.fd-form-row ~ .fd-section-row {
    margin-top: 32px;
}
@media (max-width: 700px) {
    /* Deux champs côte à côte deviennent illisibles sur un téléphone : la rangée
       repasse en colonne, et l'espacement redevient celui des marges de libellé. */
    .fd-form-row {
        flex-direction: column;
        gap: 0;
    }
}

.fd-card-toggle-active[data-active="1"] {
    border-left: 4px solid #27ae60;
    margin-top: 14px;
}
.fd-card-toggle-active[data-active="0"] {
    border-left: 4px solid #7f0909;
    margin-top: 14px;
}
.fd-toggle-status {
    margin: 0 0 8px;
    font-weight: 600;
}

.fd-badge-suspended {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    background: #b71c1c;
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    vertical-align: middle;
    margin-left: 8px;
}

.fd-info-table {
    border-collapse: collapse;
    margin: 10px 0;
}
.fd-info-table th,
.fd-info-table td {
    padding: 3px 0;
    border: none;
    vertical-align: top;
    font-weight: 400;
    color: var(--fd-text);
    text-align: left;
}
.fd-info-table th {
    text-align: right;
    font-weight: 700;
    white-space: nowrap;
    padding-right: 13px;
    color: var(--fd-primary);
}

.fd-equip-header {
    /* display: flex; */
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 6px auto 6px;
}
.fd-equip-archived-badge {
    background: #f0f0f0;
    color: #7f8c8d;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 3px 10px;
    font-size: .82rem;
    font-weight: 600;
}
[data-theme="dark"] .fd-equip-archived-badge {
    background: #1e263a;
    color: #8a9aaa;
    border-color: #2a3754;
}
.fd-equipment-overview {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 0px;
}
.fd-equipment-description,
.fd-equipment-gallery { min-width: 0; }
.fd-equipment-overview-with-gallery .fd-info-table { width: 100%; table-layout: fixed; }
.fd-equipment-overview-with-gallery .fd-info-table th { width: 42%; white-space: normal; }
.fd-equipment-description .fd-info-table td,
.fd-equipment-description .fd-h1-flush { overflow-wrap: anywhere; }
.fd-equipment-card .fd-equipment-actions,
.fd-site-card + .fd-equipment-actions {
    align-content: center;
    margin: 15px 0 10px;
    padding-top: 16px;
    border-top: 1px solid var(--fd-border-light);
}
.fd-gallery-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 5px;
}
.fd-gallery-heading h2 {margin: 12px 0px 0px 15px;font-size: 1rem;color: var(--fd-primary);}
.fd-gallery-manage {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 30px;
    margin: 2px 0px;
    padding: 5px 8px;
    border-radius: 4px;
    background: var(--fd-btn-bg);
    color: var(--fd-btn-text);
    font-size: .82rem;
    font-weight: 500;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    transition: background .15s, border-color .15s;
}
.fd-gallery-manage:hover {background: var(--fd-btn-hover);color: var(--fd-btn-text);text-decoration: none;}
.fd-gallery-manage:active { background: var(--fd-btn-active); }
.fd-gallery-manage:focus-visible { outline: 2px solid var(--fd-primary); outline-offset: 3px; }
.fd-gallery-figure { margin: 0; }
.fd-equipment-gallery .fd-gallery-main {
    display: block;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 1px solid var(--fd-border-light);
    border-radius: 10px;
    background: var(--fd-input-bg);
    cursor: zoom-in;
}
.fd-gallery-main img { display: block; width: 100%; height: 100%; object-fit: contain; }
.fd-gallery-enlarge {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 6px 9px;
    border-radius: 6px;
    background: rgba(0, 0, 0, .65);
    color: #fff;
    font-size: .75rem;
}
.fd-gallery-caption {margin: 6px 15px;font-size: .85rem;font-weight: 600;color: var(--fd-text);overflow-wrap: anywhere;}
.fd-gallery-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    min-width: 0;
    padding: 4px;
    margin: 12px -4px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    user-select: none;
    -webkit-user-select: none;
}
.fd-gallery-thumbs::-webkit-scrollbar { display: none; }
.fd-gallery-strip { display: grid; grid-template-columns: 28px minmax(0, 1fr) 28px; align-items: center; gap: 4px; margin-top: 12px; }
.fd-gallery-strip .fd-gallery-thumbs { margin: 0; }
.fd-gallery-strip-static { grid-template-columns: minmax(0, 1fr); }
.fd-gallery-strip .fd-gallery-scroll-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 28px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--fd-border);
    border-radius: 7px;
    background: var(--fd-btn-bg);
    color: var(--fd-btn-text);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}
.fd-gallery-strip .fd-gallery-scroll-control:hover:not(:disabled) { background: var(--fd-btn-hover); }
.fd-gallery-strip .fd-gallery-scroll-control:disabled { opacity: .3; cursor: default; }
.fd-gallery-strip .fd-gallery-scroll-control:focus-visible { outline: 2px solid var(--fd-primary); outline-offset: 1px; }
.fd-gallery-strip .fd-gallery-scroll-control[hidden] { display: none; }
.fd-gallery-thumbs-scrollable,
.fd-equipment-gallery .fd-gallery-thumbs-scrollable .fd-gallery-thumb { cursor: grab; }
.fd-gallery-thumbs-dragging,
.fd-equipment-gallery .fd-gallery-thumbs-dragging .fd-gallery-thumb { cursor: grabbing; }
.fd-equipment-gallery .fd-gallery-thumb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 68px;
    width: 68px;
    height: 56px;
    box-sizing: border-box;
    padding: 3px;
    margin: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 7px;
    background: var(--fd-input-bg);
    cursor: pointer;
}
.fd-gallery-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 3px; }
.fd-equipment-gallery .fd-gallery-thumb:hover { border-color: var(--fd-border); }
.fd-equipment-gallery .fd-gallery-thumb[aria-pressed="true"] { border-color: var(--fd-primary); }
.fd-gallery-thumb:focus-visible,
.fd-gallery-main:focus-visible { outline: 2px solid var(--fd-primary); outline-offset: 2px; }
.fd-gallery-thumb-unavailable::after { content: '?'; color: var(--fd-text-muted); font-size: 1.3rem; }
.fd-gallery-position { margin: 8px 0 0; font-size: .75rem; color: var(--fd-text-muted); }
.fd-gallery-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    box-sizing: border-box;
    padding: 24px;
    border: 1px dashed var(--fd-border);
    border-radius: 10px;
    background: var(--fd-input-bg);
    color: var(--fd-text-muted);
    text-align: center;
    line-height: 1.5;
}
.fd-equipment-gallery .fd-gallery-main[hidden],
.fd-gallery-empty[hidden],
.fd-gallery-caption[hidden],
.fd-gallery-thumb img[hidden] { display: none; }
.fd-site-gallery { min-width: 0; box-sizing: border-box; }
.fd-site-gallery .fd-gallery-main {
    display: block;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 1px solid var(--fd-border-light);
    border-radius: 10px;
    background: var(--fd-input-bg);
    cursor: zoom-in;
}
.fd-site-gallery .fd-gallery-thumbs-scrollable .fd-gallery-thumb { cursor: grab; }
.fd-site-gallery .fd-gallery-thumbs-dragging .fd-gallery-thumb { cursor: grabbing; }
.fd-site-gallery .fd-gallery-thumb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 68px;
    width: 68px;
    height: 56px;
    box-sizing: border-box;
    padding: 3px;
    margin: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 7px;
    background: var(--fd-input-bg);
    cursor: pointer;
}
.fd-site-gallery .fd-gallery-thumb:hover { border-color: var(--fd-border); }
.fd-site-gallery .fd-gallery-thumb[aria-pressed="true"] { border-color: var(--fd-primary); }
.fd-site-gallery .fd-gallery-main[hidden] { display: none; }
@media (min-width: 901px) {
    .fd-site-gallery {
        width: 100%;
        max-width: 520px;
        margin-left: auto;
        margin-right: auto;
    }
    .fd-site-gallery .fd-gallery-thumbs { justify-content: center; }
    .fd-site-gallery .fd-gallery-caption {margin: 6px 15px;}
}
@media (max-width: 900px) {
    .fd-site-gallery .fd-gallery-empty:not([data-gallery-error]) { display: none; }
}
.fd-gallery-dialog {
    box-sizing: border-box;
    width: min(1100px, calc(100vw - 24px));
    height: min(850px, calc(100vh - 24px));
    height: min(850px, calc(100dvh - 24px));
    max-width: none;
    max-height: none;
    margin: auto;
    padding: 16px;
    border: 1px solid var(--fd-border);
    border-radius: 12px;
    background: var(--fd-card-bg);
    color: var(--fd-text);
    box-shadow: 0 20px 60px rgba(0,0,0,.4);
    overscroll-behavior: contain;
}
.fd-gallery-dialog[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 12px; }
.fd-gallery-dialog::backdrop { background: rgba(0,0,0,.8); }
.fd-gallery-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fd-gallery-dialog-header h2 { margin: 0; font-size: 1rem; color: var(--fd-primary); }
.fd-gallery-dialog-stage { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 12px; min-height: 0; }
.fd-gallery-dialog-picture { display: grid; place-items: center; height: 100%; min-height: 0; min-width: 0; overflow: hidden; }
.fd-gallery-dialog-picture img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.fd-gallery-dialog-picture p { text-align: center; line-height: 1.5; }
.fd-gallery-dialog .fd-gallery-dialog-control {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    border: 1px solid var(--fd-border);
    border-radius: 8px;
    background: var(--fd-btn-bg);
    color: var(--fd-btn-text);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}
.fd-gallery-dialog .fd-gallery-dialog-control:hover:not(:disabled) { background: var(--fd-btn-hover); }
.fd-gallery-dialog .fd-gallery-dialog-control:disabled { opacity: .35; cursor: default; }
.fd-gallery-dialog .fd-gallery-dialog-control:focus-visible { outline: 2px solid var(--fd-primary); outline-offset: 2px; }
.fd-gallery-dialog-footer { max-height: 22vh; overflow-y: auto; text-align: center; overflow-wrap: anywhere; }
.fd-gallery-dialog-footer p { margin: 4px 0; font-size: .9rem; }
.fd-gallery-dialog-footer [data-gallery-dialog-position] { font-size: .8rem; color: var(--fd-text-muted); }
.fd-gallery-dialog [hidden] { display: none; }
@media (max-width: 600px) {
    .fd-gallery-dialog { padding: 10px; }
    .fd-gallery-dialog-stage { display: block; position: relative; }
    .fd-gallery-dialog-stage .fd-gallery-dialog-control { position: absolute; top: 50%; transform: translateY(-50%); z-index: 1; }
    .fd-gallery-dialog-stage [data-gallery-prev] { left: 0; }
    .fd-gallery-dialog-stage [data-gallery-next] { right: 0; }
}
@media (min-width: 901px) {
    .fd-equipment-overview-with-gallery {grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);gap: 28px;align-items: center;}
    .fd-equipment-overview-with-gallery > .fd-fieldset {margin: 0px;}
    .fd-equipment-overview-with-gallery > .fd-equipment-description { align-self: start; }
}
.fd-photo-block {
    display: block;
    text-decoration: none;
    color: inherit;
}
.fd-photo-block-inner {
    display: flex;
    align-items: center;
    gap: 10px;
}
.fd-photo-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--fd-primary);
}
.fd-photo-count {
    font-size: .82rem;
    color: var(--fd-text-muted);
    margin-left: 2px;
}
.fd-photo-arrow {
    margin-left: auto;
    color: var(--fd-text-muted);
    font-size: 1.2rem;
}
.fd-photo-thumbs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.fd-photo-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--fd-border-light);
}
.fd-cerfa-link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.fd-cerfa-title {
    font-weight: 700;
    color: var(--fd-primary);
    margin: 0;
}
.fd-cerfa-id-badge {
    font-size: .8rem;
    font-weight: 600;
    background: #fbe3d5;
    color: var(--fd-primary);
    border-radius: 4px;
    padding: 2px 7px;
    margin-right: 6px;
}
[data-theme="dark"] .fd-cerfa-id-badge {
    background: #26345a;
    color: #f6a06e;
}
.fd-cerfa-time {
    font-weight: 400;
    font-size: .85rem;
    color: var(--fd-text-muted);
}
.fd-cerfa-meta {
    margin: 4px 0 0;
    color: var(--fd-text-muted);
    font-size: .9rem;
}
.fd-cerfa-tech {
    margin: 4px 0 0;
    color: var(--fd-text-muted);
    font-size: .82rem;
}
.fd-cerfa-none {
    margin: 0;
    color: var(--fd-text-muted);
}

.fd-input-cp {
    flex: 0 0 120px;
}
.fd-input-city {
    flex: 1;
}
.fd-label-tight {
    display: block;
    margin-top: 0;
    font-weight: 700;
}

.fd-period-btn {
    padding: 7px 16px;
    border: 1.5px solid #e6ddd0;
    border-radius: 999px;
    background: #fff;
    color: var(--fd-text-muted);
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
}
.fd-period-btn.active {
    background: #14213d;
    color: #fff;
    border-color: #14213d;
}

.fd-device-company-group > summary {
    background: linear-gradient(45deg, #2c3750, #1a202f);
    color: #fff;
}
.fd-device-company-alert > summary {
    background: linear-gradient(45deg, #c0392b, #922b21);
}
.fd-device-badge-count {
    font-size: .75rem;
    font-weight: 600;
    background: #e67e22;
    color: #fff;
    border-radius: 10px;
    padding: 2px 10px;
    vertical-align: middle;
    margin-left: 8px;
}
.fd-device-company-group {
    flex: 0 0 auto;
    width: 100%;
}
.fd-device-company-group .fd-tree-group-content {
    columns: 1;
}
.fd-admin-tree .fd-tree-site > summary {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 12px;
    color: var(--fd-text);
}
.fd-admin-tree .fd-tree-site > summary:not(.fd-tree-site-summary-ue) > span:first-of-type {
    margin-left: auto !important;
    min-width: 0;
    flex-shrink: 1 !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right !important;
    font-size: .88rem !important;
    font-weight: 400 !important;
    color: var(--fd-text) !important;
    opacity: .85;
}
.fd-admin-tree .fd-tree-site > summary > .fd-dash-summary-toggle {
    flex-shrink: 0;
    margin-left: 0;
    color: #4e6372;
}
[data-theme="dark"] .fd-admin-tree .fd-tree-site > summary > .fd-dash-summary-toggle {
    color: #b1b8c9;
}

.fd-device-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid #f7f4ef;
    background: #fff;
}
.fd-device-row:last-child {
    border-bottom: none;
}
[data-theme="dark"] .fd-device-row {
    background: var(--fd-card-bg);
    border-bottom-color: var(--fd-border-light);
    color: var(--fd-text);
}
.fd-device-row-pending {
    border-left: 3px solid #e67e22;
}
.fd-device-row-revoked {
    border-left: 3px solid #c0392b;
    background: #fbf7f6;
}
.fd-device-row-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}
.fd-device-row-name {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.fd-device-row-name strong {
    font-size: .95rem;
    color: var(--fd-primary);
}
[data-theme="dark"] .fd-device-row-name strong {
    color: var(--fd-primary);
}
.fd-device-status-badge {
    font-size: .7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.fd-device-status-pending  { background: #fef0e6; color: #c0671a; }
.fd-device-status-approved { background: #e6f4ea; color: #1a7a40; }
.fd-company-status-active   { background: #e6f4ea; color: #1a7a40; }
.fd-company-status-inactive { background: #fdecea; color: #b0261c; }
.fd-company-status-archived { background: #f7f4ef; color: var(--fd-text-muted); }
.fd-co-archived { border-left: 3px solid #95a5a6; }
.fd-co-inactive { border-left: 3px solid #c0392b; }
[data-theme="dark"] .fd-co-archived { border-left-color: #95a5a6; }
[data-theme="dark"] .fd-co-inactive { border-left-color: #e06b60; }
.fd-user-dot { flex-shrink: 0; display: inline; vertical-align: middle; border-radius: 50%; box-shadow: 0 0 4px rgb(0 0 0 / 30%); }
.fd-co-summary-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    margin-right: 8px;
}
.fd-co-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fd-co-counts {
    font-size: .8rem;
    font-weight: 400;
    color: var(--fd-text-muted);
    min-width: 132px;
    text-align: right;
    white-space: nowrap;
}
.fd-co-content {
    padding: 10px 14px 12px;
    background: var(--fd-card-bg);
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.fd-co-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
    flex-wrap: wrap;
}
.fd-co-actions form { display: flex; }
.fd-co-protected {
    color: var(--fd-text-muted);
    font-style: italic;
}
@media (max-width: 600px) {
    .fd-co-summary-meta { flex-direction: column; align-items: flex-end; gap: 3px; }
    .fd-co-actions {
        flex-wrap: wrap;
        gap: 6px;
    }
}
.fd-device-status-revoked  { background: #fdecea; color: #b0261c; }
.fd-device-meta {
    font-size: .8rem;
    color: var(--fd-text-muted);
}
.fd-device-code-small code {
    background: #f9f6f2;
    border: 1px solid #e6daca;
    border-radius: 3px;
    padding: 1px 6px;
    font-size: .82rem;
    letter-spacing: .1em;
    color: var(--fd-primary);
}
.fd-device-row-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    align-items: center;
}
.fd-device-row-actions form {
    display: flex;
}
.fd-button-warning {
    background: #b25e14;
    color: #fff;
    border-color: #96500f;
}
.fd-button-warning:hover {
    background: #cf6d17;
}
.fd-button-danger {
    background: #c0392b;
    color: #fff;
    border-color: #a93226;
}
.fd-button-danger:hover {
    background: #a93226;
}
@media (max-width: 600px) {
    .fd-device-row {
        flex-direction: column;
    }
    .fd-device-row-actions {
        width: 100%;
    }
    .fd-device-row-actions form {
        flex: 1;
    }
    .fd-device-row-actions form button {
        width: 100%;
    }
}

.fd-site-toolbar-right {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-left: auto;
}

.fd-toolbar-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 6px;
    color: var(--fd-text-muted);
    text-decoration: none;
    transition: color .15s, background .15s;
}
.fd-toolbar-icon-link svg {
    width: 18px;
    height: 18px;
    display: block;
}
.fd-toolbar-icon-link:hover,
.fd-toolbar-icon-link:focus-visible {
    color: var(--fd-primary);
    background: rgba(20, 33, 61, .08);
}
[data-theme="dark"] .fd-toolbar-icon-link:hover,
[data-theme="dark"] .fd-toolbar-icon-link:focus-visible {
    background: rgba(242, 107, 33, .16);
}

.fd-report-sites {
    padding: 0px 0px 15px;
    /* display: flex; */
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
    margin: 20px 0 6px;
}
.fd-report-sites > .fd-tree-group.fd-device-company-group,
.fd-report-sites > .fd-accordion {
    flex: 0 0 100%;
}
.fd-report-table-wrap {
    margin: 8px 12px 12px;
    overflow-x: auto;
}
.fd-report-group-content {
    padding: 8px 0 0;
    background: #faf8f5;
}

.fd-tree > .fd-accordion {
    flex: 0 0 100%;
}
.fd-report-sites > .fd-report-tree {
    flex: 0 0 calc(100% - 20px);
}
.fd-report-tree > .fd-tree-group[open] {
    flex: 0 0 100%;
}
.fd-report-tree > .fd-tree-group > .fd-report-group-content {
    padding: 8px 3px 12px;
    columns: 2;
    column-gap: 6px;
}
.fd-report-tree > .fd-tree-group > .fd-report-group-content > .fd-accordion {
    break-inside: avoid;
    margin: 0 0 6px;
}
@media (max-width: 767px) {
    .fd-report-tree > .fd-tree-group > .fd-report-group-content {
        columns: 1;
    }
}
[data-theme="dark"] .fd-report-group-content {
    background: #0e1628;
}
.fd-report-equip-nodoc {
    padding: 8px 12px 12px;
}
.fd-report-equip-actions {
    padding: 8px 12px 12px;
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
}
@media (max-width: 600px) {
    .fd-report-equip-actions { flex-wrap: wrap; }
    .fd-report-equip-actions .fd-button-sm { flex: 1 1 auto; text-align: center; }
}
.fd-cerfa-date-cell {
    display: flex;
    flex-direction: column;
    line-height: 1.5;
}
.fd-cerfa-date-time {
    color: var(--fd-text-muted);
    font-size: .78rem;
}
.fd-report-type-cell {
    font-size: .82rem;
}

.fd-page-btn {
    padding: 4px 12px;
    border: 1.5px solid #e6daca;
    border-radius: 2px;
    background: #fff;
    color: var(--fd-primary);
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    height: 25px;
    line-height: 1;
    transition: background .12s, color .12s, border-color .12s;
}

a.fd-page-btn,
span.fd-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    text-decoration: none;
}

.fd-page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    min-width: 20px;
    padding: 0 2px;
    color: var(--fd-text-muted);
    font-size: .85rem;
    user-select: none;
}

.fd-page-btn:hover:not([disabled]):not([aria-disabled="true"]) {
    background: #f4efe7;
}
.fd-page-btn.active {
    background: #14213d;
    color: #fff;
    border-color: #14213d;
}
.fd-page-btn[disabled],
.fd-page-btn[aria-disabled="true"] {
    opacity: .35;
    cursor: default;
}
[data-theme="dark"] .fd-page-btn {
    background: #1a2540;
    border-color: #2a3a5e;
    color: #e6daca;
}
[data-theme="dark"] .fd-page-btn:hover:not([disabled]):not([aria-disabled="true"]) {
    background: #223052;
    border-color: #5e6a87;
}
[data-theme="dark"] .fd-page-btn.active {
    background: var(--fd-primary-solid);
    border-color: var(--fd-primary-solid);
    color: #fff;
}
.fd-fluide-toolbar {
    display: flex;
    align-items: center;
    gap: 11px;
    flex-wrap: wrap;
    margin: 10px 8px 10px 18px;
}
.fd-fluide-toolbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.fd-fluide-toolbar:has(.fd-site-toolbar-right) .fd-site-toolbar-right .fd-fluide-search-input {
    width: 240px;
}
.fd-report-search-wrap {
    margin-left: auto;
}
.fd-report-search-wrap .fd-fluide-search-input {
    width: 240px;
}
@media (max-width: 600px) {
    .fd-report-search-wrap .fd-fluide-search-input {
        width: 100%;
        box-sizing: border-box;
        min-width: 0;
    }
    .fd-fluide-toolbar:has(.fd-report-search-wrap) {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
    }
    .fd-fluide-toolbar:has(.fd-report-search-wrap) .fd-fluide-toolbar-left {
        flex-shrink: 0;
        width: auto;
    }
    .fd-fluide-toolbar:has(.fd-report-search-wrap) .fd-report-search-wrap {
        flex: 1 1 200px;
        min-width: 0;
        margin-left: 0;
    }
}
@media (max-width: 600px) {
    .fd-fluide-toolbar {
        flex-direction: column;
        align-items: flex-start;
        margin: 25px 8px 16px;
    }
    .fd-fluide-toolbar .fd-fluide-toolbar-left {
        justify-content: flex-start;
        width: 54%;
    }
    .fd-fluide-toolbar .fd-fluide-toolbar-left:has(.fd-fluide-search-input) {
        width: 100%;
    }
    .fd-fluide-toolbar:has(.fd-fluide-date-input):not(:has(.fd-report-search-wrap)) .fd-fluide-toolbar-left {
        width: 100%;
    }
    .fd-fluide-toolbar:has(.fd-fluide-date-input):not(:has(.fd-report-search-wrap)) .fd-fluide-date-input {
        flex: 1 1 40%;
        min-width: 0;
        width: auto;
    }
    .fd-fluide-toolbar:has(.fd-fluide-date-input):not(:has(.fd-report-search-wrap)) .fd-fluide-toolbar-left .fd-button {
        flex: 1 1 45%;
        text-align: center;
        box-sizing: border-box;
    }
    .fd-fluide-toolbar .fd-fluide-toolbar-left .fd-main-button-inline,
    .fd-fluide-toolbar .fd-fluide-toolbar-left .fd-fluide-search-input {
        width: 100%;
        box-sizing: border-box;
    }
    .fd-fluide-toolbar:has(.fd-site-toolbar-right) {
        flex-direction: row;
        align-items: center;
        flex-wrap: nowrap;
    }
    .fd-fluide-toolbar:has(.fd-site-toolbar-right) .fd-fluide-toolbar-left {
        flex-shrink: 0;
    }
    .fd-fluide-toolbar:has(.fd-site-toolbar-right) .fd-site-toolbar-right {
        flex: 1;
        min-width: 0;
    }
    .fd-fluide-toolbar:has(.fd-site-toolbar-right) .fd-site-toolbar-right .fd-fluide-search-input {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
    .fd-fluide-toolbar-left {
        flex-wrap: wrap;
        align-items: center;
        gap: 6px;
    }
    .fd-fluide-toolbar-left .fd-toolbar-label {
        display: none;
    }
    .fd-fluide-date-input {
        flex: 1;
        min-width: 100px;
        width: 100%;
        box-sizing: border-box;
        font-size: .82rem;
        padding: 7px 5px;
    }
    .fd-fluide-toolbar-left .fd-button {
        white-space: nowrap;
        padding: 7px 10px;
        margin: 0;
        font-size: .82rem;
    }
    .fd-fluide-toolbar .fd-fluide-date-form {
        display: grid;
        grid-template-columns: auto minmax(0, 260px);
        gap: 6px 8px;
        width: 100%;
        align-items: center;
    }
    .fd-fluide-toolbar .fd-fluide-date-form .fd-fluide-date-input {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
    .fd-fluide-toolbar .fd-fluide-date-form .fd-button {
        justify-self: start;
        margin: 0;
    }
}

.fd-fluide-sort-btn {
    margin: 0;
    cursor: pointer;
}
.fd-fluide-search-input {
    padding: 5px 10px;
    margin: 4px;
    border: 1px solid #e6daca;
    border-radius: 4px;
    font-size: .9rem;
    min-width: 180px;
    outline: none;
}
[data-theme="dark"] .fd-fluide-search-input {
    background: var(--fd-card-bg);
    color: var(--fd-text);
    border-color: var(--fd-border);
}
[data-theme="dark"] .fd-fluide-search-input::placeholder {
    color: var(--fd-text-muted);
}
.fd-fluide-date-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.fd-fluide-date-label {
    font-size: .85rem;
    color: var(--fd-text-muted);
    font-weight: 600;
}
.fd-fluide-date-input {
    padding: 4px 10px;
    border: 1px solid #e6daca;
    border-radius: 2px;
    font-size: .85rem;
    color: var(--fd-primary);
    outline: none;
    background: #fff;
}
[data-theme="dark"] .fd-fluide-date-input {
    background: var(--fd-card-bg);
    color: var(--fd-text);
    border-color: var(--fd-border);
}
[data-theme="dark"] .fd-fluide-date-input::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(1.5);
}
.fd-fluide-company-select,
.fd-fluide-site-select {
    max-width: 100%;
    box-sizing: border-box;
    padding: 7px 10px;
    border: 1px solid #f26b21;
    border-radius: 2px;
    font-size: .85rem;
    font-weight: 600;
    color: var(--fd-primary);
    background: #f8f5f1;
    outline: none;
    cursor: pointer;
}
[data-theme="dark"] .fd-fluide-company-select,
[data-theme="dark"] .fd-fluide-site-select {
    color: var(--fd-text);
    background: var(--fd-card-bg);
    border-color: var(--fd-primary);
}

.fd-combo {
    position: relative;
    display: inline-block;
    max-width: 100%;
}
.fd-combo-natif {
    display: none;
}
.fd-combo-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    box-sizing: border-box;
    padding: 7px 10px;
    border: 1px solid #f26b21;
    border-radius: 2px;
    font-size: .85rem;
    font-weight: 600;
    color: var(--fd-primary);
    background: #f8f5f1;
    cursor: pointer;
}
.fd-combo-valeur {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fd-combo-fleche {
    font-size: .7rem;
    line-height: 1;
}
.fd-combo-champ {
    display: block;
    width: 100%;
}
.fd-combo-champ .fd-combo-btn {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 6px 0 0 !important;
    padding: 12px !important;
    border: 1px solid var(--fd-text-muted) !important;
    border-radius: 10px !important;
    font-size: .95rem;
    font-weight: 400 !important;
    text-align: left;
    color: var(--fd-text) !important;
    background: var(--fd-input-bg) !important;
}
.fd-combo-champ.fd-combo-compact .fd-combo-btn {
    margin: 0 !important;
    padding: 6px 9px !important;
    border-radius: 6px !important;
    font-size: 13.3333px;
    line-height: normal;
}
.fd-combo-champ .fd-combo-btn:hover,
.fd-combo-champ .fd-combo-btn:focus-visible {
    border-color: var(--fd-primary-light) !important;
    color: var(--fd-text) !important;
    background: var(--fd-input-bg) !important;
}
.fd-combo-panneau {
    position: absolute;
    z-index: 60;
    top: calc(100% + 4px);
    left: 0;
    min-width: max(100%, 240px);
    width: max-content;
    max-width: calc(100vw - 32px);
    padding: 8px;
    box-sizing: border-box;
    border: 1px solid var(--fd-border);
    border-radius: 2px;
    background: var(--fd-card-bg);
    box-shadow: 0 4px 14px rgba(20, 33, 61, .18);
}
.fd-combo-panneau[hidden] {
    display: none;
}
.fd-combo-recherche {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 6px;
    padding: 6px 8px;
    border: 1px solid var(--fd-border);
    border-radius: 2px;
    font-size: .85rem;
    color: var(--fd-text);
    background: var(--fd-input-bg);
}
.fd-combo-recherche[hidden] {
    display: none;
}
.fd-combo-liste {
    margin: 0;
    padding: 0;
    list-style: none;
}
.fd-combo-option {
    padding: 9px 10px;
    border-radius: 2px;
    font-size: .85rem;
    color: var(--fd-text);
    cursor: pointer;
    overflow-wrap: anywhere;
}
.fd-combo-option:hover,
.fd-combo-option.actif {
    background: #f4efe7;
}
.fd-combo-option[aria-selected="true"] {
    font-weight: 700;
}
.fd-combo-vide {
    margin: 0;
    padding: 9px 10px;
    font-size: .85rem;
    color: var(--fd-text-muted);
}
.fd-combo-vide[hidden] {
    display: none;
}
.fd-combo-pages {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--fd-border);
}
.fd-combo-pages[hidden] {
    display: none;
}
.fd-combo-position {
    font-size: .8rem;
    color: var(--fd-text-muted);
}
[data-theme="dark"] .fd-combo-btn {
    color: var(--fd-text);
    background: var(--fd-card-bg);
    border-color: var(--fd-primary);
}
[data-theme="dark"] .fd-combo-option:hover,
[data-theme="dark"] .fd-combo-option.actif {
    background: rgba(246, 160, 110, .16);
}
.fd-fluide-date-btn {
    margin: 0;
}
.fd-fluide-date-reset {
    margin: 0;
    background: #f7f4f0;
    color: var(--fd-text-muted);
    border-color: #e6daca;
}
.fd-fluide-count {
    margin-left: auto;
    padding: 0 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--fd-text);
}
.fd-report-type-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 11px 0 9px;
    padding: 7px 14px 0 10px;
}
.fd-report-type-filter-label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--fd-text-muted);
    white-space: nowrap;
}
.fd-report-type-select {
    padding: 6px 10px;
    border: 1px solid #c8d4db;
    border-radius: 6px;
    font-size: .88rem;
    color: var(--fd-primary);
    background: #fff;
    cursor: pointer;
}
[data-theme="dark"] .fd-report-type-select {
    background: var(--fd-card-bg);
    color: var(--fd-text);
    border-color: var(--fd-border);
    color-scheme: dark;
}
@media (max-width: 600px) {
    .fd-report-type-filter {
        flex-wrap: wrap;
        gap: 4px;
    }
    .fd-report-type-select {
        max-width: 23vw;
        min-width: 0;
        margin-right: 15px;
        text-overflow: ellipsis;
    }
}

.fd-fluide-filter-active {
    margin: 0 14px 10px;
    font-size: .85rem;
    color: var(--fd-primary);
    background: #fbe3d5;
    border: 1px solid #dfd0bc;
    border-radius: 4px;
    padding: 6px 12px;
    display: inline-block;
}

.fd-fluide-equip-summary-inner {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.fd-fluide-equip-refrigerant,
.fd-fluide-equip-stats {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fd-fluide-equip-refrigerant {
    font-weight: 400;
    color: var(--fd-text-muted);
    font-size: .8rem;
}
.fd-fluide-equip-stats {
    font-size: .78rem;
    color: var(--fd-text-muted);
    font-weight: 400;
}
.fd-fluide-sub-wrap {
    margin: 8px 12px 12px;
}
.fd-th-right {
    text-align: right;
}
.fd-fluide-td-ajout {
    text-align: right;
    color: #27ae60;
    font-weight: 600;
}
.fd-fluide-td-retrait {
    text-align: right;
    color: #e74c3c;
    font-weight: 600;
}
.fd-fluide-td-recyclage {
    text-align: right;
    color: #8e44ad;
    font-weight: 600;
}
.fd-fluide-td-zero {
    text-align: right;
    color: var(--fd-text-muted);
}
.fd-fluide-detail-row {
    background: #fcfbf9;
}
[data-theme="dark"] .fd-fluide-detail-row {
    background: #0e1628;
}
.fd-fluide-detail-td {
    padding: 3px 10px 8px;
    border-top: none;
}
.fd-fluide-detail-meta {
    font-size: .78rem;
    color: var(--fd-text-muted);
    display: inline-flex;
    flex-wrap: wrap;
    gap: 12px;
}
.fd-fluide-teq {
    color: #7b4f00;
}
[data-theme="dark"] .fd-fluide-teq {
    color: #e8a440;
}
.fd-cerfa-badge {
    border-radius: 4px;
    padding: 2px 8px;
    font-size: .78rem;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid transparent;
}
.fd-cerfa-badge-en_cours  { background: #fef0e6; color: #e67e22; border-color: #f5c6a0; }
.fd-cerfa-badge-termine   { background: #f7f3ee; color: #d4560e; border-color: #decfba; }
.fd-cerfa-badge-valide    { background: #e9f7ef; color: #27ae60; border-color: #a3d9b7; }
.fd-cerfa-badge-archive   { background: #f0f0f0; color: #7f8c8d; border-color: #c8c8c8; }
[data-theme="dark"] .fd-cerfa-badge-en_cours  { background: #3a200a; color: #f0a05a; border-color: #7a3d10; }
[data-theme="dark"] .fd-cerfa-badge-termine   { background: #0f1a33; color: #f38546; border-color: #1f366b; }
[data-theme="dark"] .fd-cerfa-badge-valide    { background: #0d2a18; color: #4fc87a; border-color: #1a5e30; }
[data-theme="dark"] .fd-cerfa-badge-archive   { background: #1e2a30; color: #8aabb8; border-color: #2e3850; }

.fd-cerfa-view-h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--fd-text-muted); font-weight: 700; margin-bottom: 8px; }
.fd-cerfa-view-kv { margin-top: 4px; }
.fd-cerfa-view-muted { color: var(--fd-text-muted); }
.fd-cerfa-view-label { font-weight: 600; color: var(--fd-text-muted); font-size: .9rem; }
.fd-cerfa-view-success { color: #1d8047; font-weight: 600; }
.fd-cerfa-view-danger { color: #c0392b; font-weight: 600; }
.fd-cerfa-view-danger-note { color: #c0392b; font-size: .82rem; }
.fd-cerfa-view-warn { color: #e09000; font-weight: 600; }
.fd-cerfa-view-co2 { display: inline-block; background: #fff8e1; border-left: 3px solid #f9a825; padding: 4px 8px; border-radius: 0 4px 4px 0; color: #7b4f00; font-size: .85rem; margin-top: 4px; }
.fd-cerfa-view-co2-detail { color: #8a6800; font-size: .78rem; }
.fd-cerfa-view-sig-divider { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid #f2ece3; }
.fd-cerfa-view-sig-label { font-size: .8rem; color: var(--fd-text-muted); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 6px; }
.fd-cerfa-view-sig-img { border: 1px solid #e6daca; border-radius: 8px; padding: 8px; display: inline-block; background: #fcfbf9; margin-bottom: 10px; }
.fd-cerfa-view-sig-img img { max-width: 100%; height: 120px; display: block; }
.fd-cerfa-view-canvas-wrap { position: relative; border: 2px dashed #e6daca; border-radius: 8px; background: #fdfcfb; max-width: 480px; touch-action: none; }
.fd-cerfa-view-canvas-wrap canvas { display: block; width: 100%; height: 160px; border-radius: 6px; background: #fff; cursor: crosshair; touch-action: none; }
.fd-cerfa-view-canvas-hint { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: #5f747e; font-size: .9rem; pointer-events: none; user-select: none; }
.fd-cerfa-view-sig-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
[data-theme="dark"] .fd-cerfa-view-h2 { color: var(--fd-text-muted); }
[data-theme="dark"] .fd-cerfa-view-muted { color: var(--fd-text-muted); }
[data-theme="dark"] .fd-cerfa-view-sig-divider { border-color: var(--fd-border); }
[data-theme="dark"] .fd-cerfa-view-sig-img { border-color: var(--fd-border); background: var(--fd-card-bg); }
[data-theme="dark"] .fd-cerfa-view-canvas-wrap { border-color: var(--fd-border); background: var(--fd-card-bg); }
[data-theme="dark"] .fd-cerfa-view-co2 { background: #2a1e00; border-color: #a07800; color: #e0b040; }
[data-theme="dark"] .fd-cerfa-view-co2-detail { color: #b08020; }

.fd-fluide-tfoot-row {
    font-weight: 700;
    background: #f9f6f2;
}
[data-theme="dark"] .fd-fluide-tfoot-row {
    background: #0e1628;
}
.fd-fluide-tfoot-label {
    text-align: right;
    color: var(--fd-text-muted);
}
.fd-fluide-site-total {
    margin: 0 12px 16px;
    padding: 10px 14px;
    background: #f6f2ed;
    border-radius: 4px;
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    font-size: .88rem;
    color: var(--fd-text);
}
[data-theme="dark"] .fd-fluide-site-total {
    background: #0e1628;
}
.fd-fluide-site-total-label {
    font-weight: 700;
    color: var(--fd-primary);
}
.fd-fluide-group-content {
    display: block;
    margin: 0 20px;
    padding: 8px 0 0;
    background: #faf8f5;
}
[data-theme="dark"] .fd-fluide-group-content {
    background: #0e1628;
}
#fd-fluide-sites > .fd-tree-group[open] {
    flex: 0 0 100%;
}
.fd-fluide-pages {
    margin-bottom: 24px;
}
.fd-fluide-bilan-card-wrap {
    margin: 30px 0 50px;
}
.fd-fluide-hist-card {
    margin-top: 24px;
}
.fd-fluide-section-title {
    text-align: left;
    margin: 0 0 18px;
    font-size: 1rem;
    color: var(--fd-primary);
}
.fd-period-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.fd-fluide-bilan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}
.fd-fluide-bilan-tile {
    border-radius: 10px;
    padding: 14px 16px;
    text-align: center;
}
.fd-fluide-bilan-ajout    { background: #e8f5e9; }
.fd-fluide-bilan-retrait  { background: #fdecea; }
.fd-fluide-bilan-recyclage{ background: #f3e5f5; }
.fd-fluide-bilan-nb       { background: #fbe3d5; }
[data-theme="dark"] .fd-fluide-bilan-ajout    { background: #0d2a18; }
[data-theme="dark"] .fd-fluide-bilan-retrait  { background: #2a0d0d; }
[data-theme="dark"] .fd-fluide-bilan-recyclage{ background: #1e0d2a; }
[data-theme="dark"] .fd-fluide-bilan-nb       { background: #0d162a; }
.fd-fluide-bilan-value {
    font-size: 1.5rem;
    font-weight: 800;
}
.fd-fluide-bilan-ajout     .fd-fluide-bilan-value { color: #2e7d32; }
.fd-fluide-bilan-retrait   .fd-fluide-bilan-value { color: #c62828; }
.fd-fluide-bilan-recyclage .fd-fluide-bilan-value { color: #6a1b9a; }
.fd-fluide-bilan-nb        .fd-fluide-bilan-value { color: var(--fd-primary); }
[data-theme="dark"] .fd-fluide-bilan-ajout     .fd-fluide-bilan-value { color: #4fc87a; }
[data-theme="dark"] .fd-fluide-bilan-retrait   .fd-fluide-bilan-value { color: #e57373; }
[data-theme="dark"] .fd-fluide-bilan-recyclage .fd-fluide-bilan-value { color: #ce93d8; }
[data-theme="dark"] .fd-fluide-bilan-nb        .fd-fluide-bilan-value { color: #f6a06e; }
.fd-fluide-bilan-unit {
    font-size: .9rem;
}
.fd-fluide-bilan-label {
    font-size: .78rem;
    font-weight: 600;
    margin-top: 4px;
    color: var(--fd-text);
}
.fd-fluide-chart-section {
    margin-top: 4px;
    padding: 15px;
    background: var(--fd-card-bg);
}
.fd-fluide-chart-title {
    font-size: .8rem;
    font-weight: 600;
    color: var(--fd-text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.fd-fluide-chart-wrap {
    position: relative;
    height: 220px;
}
.fd-fluide-empty {
    color: var(--fd-text-muted);
    text-align: center;
    padding: 24px 0;
}
.fd-table-wrap-flush {
    padding: 0;
}

.fd-flat-accordion {
    margin: 0 0 14px 0;
}
.fd-flat-filtres {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 12px 14px 4px;
}
.fd-flat-filtres .fd-bil-filter-select {
    margin: 0;
}
.fd-flat-propositions,
.fd-site-recherche {
    position: relative;
    display: inline-block;
}
.fd-flat-propositions {
    min-width: 208px;
    max-width: 240px;
}
.fd-flat-filtres .fd-flat-propositions .fd-fluide-search-input {
    width: 100%;
    min-width: 0;
    margin: 0;
    box-sizing: border-box;
}
.fd-flat-propositions .fd-bil-autocomplete,
.fd-site-recherche .fd-bil-autocomplete {
    left: 0;
    top: calc(100% + 2px);
    min-width: 100%;
}
@media (max-width: 600px) {
    .fd-site-recherche .fd-bil-autocomplete {
        left: auto;
        right: 0;
        min-width: 240px;
    }
}
@media (max-width: 700px) {
    .fd-flat-accordion .fd-table thead { display: none; }
    .fd-flat-accordion .fd-table,
    .fd-flat-accordion .fd-table tbody,
    .fd-flat-accordion .fd-table tr { display: block; width: 100%; }
    .fd-flat-accordion .fd-table { margin-top: 0; }
    .fd-flat-accordion .fd-table-wrap { overflow: visible; }

    .fd-flat-row {
        position: relative;
        box-sizing: border-box;
        padding: 9px 26px 9px 12px;
        border-bottom: 1px solid var(--fd-border-light);
        cursor: pointer;
    }
    .fd-flat-row > td { display: none; padding: 0; border: 0; }
    .fd-flat-row > .fd-td-site-name {
        display: block;
        font-size: 14px;
        line-height: 1.25;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .fd-flat-row > td:nth-child(2) {
        display: block;
        margin-top: 2px;
        font-size: 12px;
        line-height: 1.3;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .fd-flat-row::after {
        content: '\25BE';
        position: absolute;
        right: 10px;
        top: 11px;
        font-size: 11px;
        color: var(--fd-text-muted);
        transition: transform .15s ease;
    }
    .fd-flat-row:focus-visible {
        outline: 2px solid var(--fd-primary);
        outline-offset: -2px;
    }
    .fd-flat-row-ouverte { background: var(--fd-border-light); }
    .fd-flat-row-ouverte::after { transform: rotate(180deg); }
    .fd-flat-row-ouverte > td { display: block; margin-top: 7px; }
    .fd-flat-row-ouverte > td:nth-child(2) { white-space: normal; }
    .fd-flat-row-ouverte > td:nth-child(3)::before {
        content: 'Contact : ';
        color: var(--fd-text-muted);
    }
}
.fd-flat-summary {
    padding: 9px 14px;
    font-size: .92rem;
    font-weight: 600;
    color: var(--fd-text-muted);
    background: none;
    border-radius: 0;
    border-bottom: 1px solid var(--fd-border);
}
.fd-flat-summary:hover {
    color: var(--fd-text);
}
.fd-flat-summary .fd-accordion-toggle {
    background: none;
    box-shadow: none;
    color: inherit;
}
details[open] > .fd-flat-summary .fd-accordion-toggle {
    transform: rotate(180deg);
}
.fd-flat-filtres .fd-fluide-search-input {
    flex: 1 1 200px;
    min-width: 160px;
    width: auto;
    box-sizing: border-box;
}
.fd-group-cell-btn {
    padding: 0px;
    margin: 0px;
    border: none;
    background: none;
    font: inherit;
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    text-align: left;
}
.fd-group-cell-btn[hidden] {
    display: none;
}
.fd-td-groupe-edit {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.fd-td-groupes .fd-group-badge + .fd-group-badge {
    margin-left: 4px;
}
.fd-group-cell-btn:hover .fd-group-badge,
.fd-group-cell-btn:focus-visible .fd-group-badge,
.fd-group-cell-btn:hover .fd-td-none,
.fd-group-cell-btn:focus-visible .fd-td-none {
    box-shadow: 0 0 0 2px var(--fd-primary);
    border-radius: 4px;
}
.fd-td-groupe-select {
    margin: 0;
    min-width: 130px;
    max-width: 180px;
}

#fd-eq-tree {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
    align-items: start;
    gap: 12px;
}
@media (max-width: 600px) {
    #fd-eq-tree .fd-accordion-summary-com .fd-accordion-counts {
        display: inline;
        font-size: .78rem;
        margin-right: 6px;
        white-space: nowrap;
    }
    #fd-eq-tree .fd-accordion-summary-com > span:first-child {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    #fd-eq-tree .fd-accordion-summary-com .fd-accordion-right {
        flex-shrink: 0;
    }
    #fd-eq-tree .fd-accordion-summary-com {
        flex-wrap: nowrap;
    }
}
@media (max-width: 340px) {
    #fd-eq-tree .fd-accordion-counts .fd-count-unit {
        display: none;
    }
}

#fd-eq-tree > .fd-accordion {
    margin: 0;
}
#fd-eq-tree > .fd-accordion[open] {
    grid-column: 1 / -1;
}

#fd-user-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
    align-items: start;
    gap: 12px;
}
#fd-user-list > .fd-device-company-group {
    grid-column: 1 / -1;
}

#fd-site-tree > .fd-tree-group[open] {
    flex: 0 0 100%;
}

.fd-td-site-name {
    font-weight: 600;
    color: var(--fd-table-th);
}
.fd-td-muted {
    font-size: .88rem;
    color: var(--fd-text-muted);
}
[data-theme="dark"] .fd-td-muted {
    color: #828da8;
    font-size: 11px;
}
.fd-td-sm {
    font-size: .82rem;
}
.fd-td-none {
    color: var(--fd-text-muted);
}
.fd-group-badge {
    color: var(--grp-text, #fff);
    background: var(--grp, #4a616d);
    border-radius: 4px;
    padding: 5px 5px;
    font-size: 10px;
    font-weight: 600;
    display: inline-block;
}
.fd-td-nowrap {
    white-space: nowrap;
}

.fd-folder-actions-bottom {
    margin-top: 50px;
}
.fd-folder-create-body {
    padding: 16px 0 4px;
    margin-bottom: 35px;
}
.fd-folders-create-form {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 12px;
    flex-wrap: wrap;
}
.fd-folders-create-form .fd-input {
    flex: 1;
    min-width: 180px;
    padding: 9px 12px;
    border: 1px solid var(--fd-border);
    border-radius: 8px;
    font-size: .95rem;
    background: var(--fd-card-bg);
    color: var(--fd-text);
    box-sizing: border-box;
}
.fd-folder-item {
    margin-bottom: 10px;
}
.fd-folder-drag {
    display: inline-flex;
    align-items: center;
    cursor: grab;
    opacity: .5;
    flex-shrink: 0;
    margin-right: 2px;
    transition: opacity .15s;
    touch-action: none;
}
.fd-folder-drag:hover { opacity: 1; }
.fd-folder-drag:active { cursor: grabbing; }
.fd-folder-name { margin-right: auto; }
.fd-folder-item.fd-dragging {
    opacity: .45;
}
.fd-folder-item.fd-drag-over {
    outline: 2px dashed #f26b21;
    outline-offset: 2px;
    border-radius: 4px;
}
[data-theme="dark"] .fd-folder-item.fd-drag-over {
    outline-color: #f38546;
}
.fd-folder-body {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.fd-folder-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.fd-folder-rename-form {
    display: flex;
    gap: 8px;
    align-items: center;
}
.fd-folder-rename-form .fd-input {
    flex: 1;
    min-width: 0;
    padding: 7px 10px;
    border: 1px solid var(--fd-border);
    border-radius: 6px;
    font-size: .9rem;
    background: var(--fd-card-bg);
    color: var(--fd-text);
    box-sizing: border-box;
}
.fd-folder-rename-form .fd-button-sm,
.fd-folder-actions > form:last-child .fd-button-sm {
    width: 90px;
    flex-shrink: 0;
}
.fd-folder-sites-title {
    font-weight: 700;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--fd-primary);
    margin-bottom: 8px;
}
.fd-folder-sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 6px 16px;
    margin-bottom: 12px;
}
.fd-folder-site-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: .9rem;
    cursor: pointer;
    color: var(--fd-text);
}
.fd-folder-site-label input[type=checkbox] {
    width: 16px;
    height: 16px;
    accent-color: var(--fd-primary);
    cursor: pointer;
    flex-shrink: 0;
}

.fd-user-folders-fieldset {
    border: 1px solid var(--fd-border-light);
    border-radius: 10px;
    padding: 16px 20px;
    margin-top: 20px;
}
.fd-user-folders-fieldset > legend {
    font-weight: 700;
    padding: 0 8px;
    color: var(--fd-primary);
    font-size: 1rem;
}
.fd-user-folders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px 20px;
    margin-top: 10px;
}
.fd-user-folders-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .9rem;
    cursor: pointer;
    color: var(--fd-text);
}
.fd-user-folders-label input[type=checkbox] {
    width: 16px;
    height: 16px;
    accent-color: var(--fd-primary);
    cursor: pointer;
    flex-shrink: 0;
}
.fd-user-folders-hint {
    font-size: .8rem;
    color: var(--fd-text-muted);
    margin-top: 8px;
}

.ue-grid {
    display: grid;
    grid-template-columns: 160px 1fr;
    align-items: center;
    gap: 10px 16px;
    margin-top: 8px;
}
.ue-grid label {
    margin: 0;
    font-weight: 600;
    font-size: .9rem;
    color: var(--fd-text);
}
.ue-grid input:not([type=checkbox]),
.ue-grid select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--fd-border-light);
    border-radius: 8px;
    font-size: .95rem;
    box-sizing: border-box;
    background: var(--fd-card-bg);
    color: var(--fd-text);
}
.ue-grid input:not([type=checkbox]):focus,
.ue-grid select:focus {
    outline: none;
    border-color: var(--fd-primary);
    box-shadow: 0 0 0 3px rgba(20, 33, 61, .1);
}
[data-theme="dark"] .ue-grid input:not([type=checkbox]):focus,
[data-theme="dark"] .ue-grid select:focus {
    box-shadow: 0 0 0 3px rgba(246, 160, 110, .15);
}
.ue-separator {
    grid-column: 1 / -1;
    border: none;
    border-top: 1px solid var(--fd-border-light);
    margin: 4px 0;
}
.ue-checkbox-row {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 10px;
}
.ue-checkbox-row input[type=checkbox] {
    width: 18px;
    height: 18px;
    accent-color: var(--fd-primary);
    cursor: pointer;
}

.perm-fieldset {
    border: 1px solid var(--fd-border-light);
    border-radius: 10px;
    padding: 16px 20px;
    margin-top: 20px;
}
.perm-fieldset > legend {
    font-weight: 700;
    padding: 0 8px;
    color: var(--fd-primary);
    font-size: 1rem;
}
.perm-groups {
    display: flex;
    flex-direction: column;
    margin-top: 8px;
}
.perm-group {
    padding: 14px 0;
    border-bottom: 1px solid var(--fd-border-light);
}
.perm-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.perm-group-title {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--fd-primary);
    margin-bottom: 10px;
}
.perm-group-items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 24px;
}
.perm-group-items label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    font-size: .9rem;
    cursor: pointer;
    color: var(--fd-text);
}
.fd-input-upper {
    text-transform: uppercase;
}
.fd-input-upper::placeholder {
    text-transform: none;
}
.fd-row-2 {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}
.fd-row-2 > div {
    flex: 1;
    min-width: 0;
}
.fd-row-2 > div input,
.fd-row-2 > div select {
    width: 100%;
    box-sizing: border-box;
}
@media (max-width: 600px) {
    .fd-row-2 {
        flex-direction: column;
    }
}

.fd-row-cp-ville {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}
.fd-row-cp-ville .fd-cp {
    flex: 0 0 110px;
}
.fd-row-cp-ville .fd-ville {
    flex: 1;
    min-width: 0;
}
.fd-row-cp-ville input {
    width: 100%;
    box-sizing: border-box;
}

.perm-group-items input[type=checkbox] {
    width: 17px;
    height: 17px;
    accent-color: var(--fd-primary);
    cursor: pointer;
    flex-shrink: 0;
}

.fd-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.fd-modal-box {
    background: var(--fd-card-bg);
    border-radius: 8px;
    padding: 28px;
    min-width: 320px;
    box-shadow: 0 8px 32px rgba(0,0,0,.2);
}
.fd-modal-title {
    margin: 0 0 18px;
    font-size: 1rem;
    color: var(--fd-primary);
}

.fd-label-sm {
    font-size: .85rem;
    font-weight: 600;
    color: var(--fd-text-muted);
    display: block;
    margin-bottom: 4px;
}
[data-theme="dark"] .fd-label-sm {
    color: var(--fd-text-muted);
}
.fd-color-input {
    width: 48px;
    height: 38px;
    border: 1px solid var(--fd-border);
    border-radius: 4px;
    cursor: pointer;
    padding: 2px;
}
.fd-color-swatch {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    vertical-align: middle;
    background: var(--grp);
}
.fd-color-swatch-text {
    font-size: .8rem;
    color: var(--fd-text-muted);
    margin-left: 6px;
}
[data-theme="dark"] .fd-color-swatch-text {
    color: var(--fd-text-muted);
}
.fd-form-inline {
    display: inline;
}
.fd-form-contents {
    display: contents;
}
.fd-sort-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--fd-text-muted);
    font-size: 1rem;
    padding: 2px 4px;
}
.fd-td-sort {
    white-space: nowrap;
    padding: 4px 6px;
}
.fd-checkbox-inline {
    width: auto;
    margin: 0;
}
.fd-label-flex {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}
.fd-input-full {
    width: 100%;
    box-sizing: border-box;
}
.fd-flex-row-wrap {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.fd-flex-end {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.fd-alert-banner {
    padding: 10px 14px;
    border-radius: 4px;
    margin-bottom: 16px;
}
.fd-alert-banner-success {
    background: #e8f5e9;
    border-left: 4px solid #27ae60;
    color: #1b5e20;
}
[data-theme="dark"] .fd-alert-banner-success {
    background: #0d2e14;
    color: #66bb6a;
    border-left-color: #2e7d32;
}

.fd-teq-result {
    margin-top: 6px;
    font-size: .85rem;
    color: #7b4f00;
    background: #fff8e1;
    border-left: 3px solid #f9a825;
    padding: 6px 10px;
    border-radius: 0 4px 4px 0;
}
[data-theme="dark"] .fd-teq-result {
    background: #2a1f00;
    color: #f9a825;
}

.fd-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}
.fd-photo-card {
    padding: 0;
    overflow: hidden;
    position: relative;
}
.fd-photo-drag {
    position: absolute !important;
    top: 8px;
    left: 8px;
    z-index: 2;
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid var(--fd-border) !important;
    border-radius: 8px !important;
    background: var(--fd-input-bg) !important;
    color: var(--fd-text-muted) !important;
    line-height: 1;
    cursor: grab !important;
    touch-action: none;
}
.fd-photo-drag:hover,
.fd-photo-drag:focus {
    background: var(--fd-input-bg) !important;
    color: var(--fd-text) !important;
}
.fd-photo-drag:active {
    background: var(--fd-input-bg) !important;
    cursor: grabbing !important;
}
.fd-photo-drag svg { display: block; width: 18px; height: 18px; }
.fd-photo-dragging {
    opacity: .65;
    pointer-events: none;
    outline: 2px dashed var(--fd-primary);
    outline-offset: 2px;
}
.fd-photo-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
}
.fd-photo-absente {
    width: 100%;
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border-bottom: 1px dashed var(--fd-border);
    background: var(--fd-body-bg);
    color: var(--fd-text-muted);
    font-size: .82rem;
    text-align: center;
}
.fd-photo-meta {
    padding: 6px 10px 8px;
}
.fd-photo-caption {
    margin: 0 0 2px;
    font-size: .82rem;
}
.fd-photo-caption-placeholder {
    color: #5f747e;
    font-style: italic;
}
[data-theme="dark"] .fd-photo-caption-placeholder {
    color: #a7afc2;
}
.fd-photo-date {
    margin: 2px 0 0;
    font-size: .75rem;
    color: var(--fd-text-muted);
}
.fd-photo-delete-wrap {
    position: absolute;
    top: 8px;
    right: 8px;
    margin: 0;
}
.fd-photo-delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    background: #b42318;
    color: #fff;
    border: 1px solid rgba(255,255,255,.65);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    margin: 0;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    box-shadow: 0 2px 7px rgba(0,0,0,.25);
    transition: background .15s, box-shadow .15s;
}
.fd-photo-delete-btn svg { width: 20px; height: 20px; pointer-events: none; }
.fd-photo-delete-btn:hover { background: #912018; box-shadow: 0 3px 9px rgba(0,0,0,.3); }
.fd-photo-delete-btn:active { background: #751a14; }
.fd-photo-delete-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 5px #912018; }
.fd-photo-add-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.fd-photo-add-btn {
    flex: 1;
    min-width: 140px;
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
}
@media (max-width: 768px) {
    .fd-photo-add-btn {
        min-height: 44px;
    }
}
.fd-photo-preview-img {
    max-width: 100%;
    max-height: 140px;
    border-radius: 8px;
    border: 1px solid #eae1d4;
    object-fit: cover;
}
.fd-photo-caption-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #e6daca;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: .9rem;
    box-sizing: border-box;
}
.fd-photo-caption-saved {
    margin: 0 0 2px;
    font-size: .82rem;
    color: var(--fd-text-muted);
}
.fd-photo-preview-wrap {
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.fd-photo-preview-toggle {
    display: none;
}
.fd-photo-preview-toggle.fd-open {
    display: flex;
}
.fd-photo-send-btn {
    display: none !important;
}
.fd-photo-send-btn.fd-open {
    display: inline-block !important;
}

#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, .88);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
#lightbox.open {
    display: flex;
}
#lightbox img {
    max-width: 92vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 4px 32px #0008;
}
#lightbox-caption {
    margin-top: 10px;
    max-width: 80vw;
    color: #f0e9e0;
    font-size: .9rem;
    text-align: center;
}
#lightbox-close {
    position: fixed;
    top: 16px;
    right: 20px;
    padding: 4px 10px;
    border: none;
    background: none;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}
#lightbox-prev,
#lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    background: rgba(0, 0, 0, .35);
    color: #fff;
    font-size: 2.2rem;
    cursor: pointer;
    user-select: none;
}
#lightbox-prev { left: 10px; }
#lightbox-next { right: 10px; }

.caption-text {
    color: var(--fd-text-muted);
    cursor: pointer;
}
.caption-text:hover {
    text-decoration: underline;
}
.caption-form {
    display: none;
    margin-top: 4px;
}
.caption-form input {
    width: 100%;
    padding: 5px 8px;
    border: 1px solid #e6daca;
    border-radius: 5px;
    font-size: .82rem;
    box-sizing: border-box;
}
.caption-form button {
    margin-top: 4px;
    padding: 3px 10px;
    font-size: .78rem;
}
.caption-form.fd-open {
    display: block;
}
.fd-photo-add-card {
    margin-bottom: 16px;
}
.fd-photo-add-title {
    margin: 0 0 12px;
}

.fd-view-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.fd-h1-flush {
    margin: 0;
}
.fd-h2-flush {
    margin: 0;
}
.fd-archived-badge {
    background: #f0f0f0;
    color: #7f8c8d;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 3px 10px;
    font-size: .82rem;
    font-weight: 600;
}
[data-theme="dark"] .fd-archived-badge {
    background: #2a2a2a;
    color: #9aa0a6;
    border-color: #444;
}

.fd-cerfa-fieldset {
    border: 1px solid #f2ece3;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 14px;
}
[data-theme="dark"] .fd-cerfa-fieldset {
    border-color: var(--fd-border);
}
.fd-cerfa-legend {
    font-weight: 700;
    color: var(--fd-primary);
    padding: 0 6px;
}
.fd-cerfa-req {
    color: #c0392b;
}
[data-theme="dark"] .fd-cerfa-req {
    color: #f28b82;
}
.fd-cerfa-opt {
    font-weight: 400;
    color: var(--fd-text-muted);
    font-size: .85rem;
}
.fd-cerfa-note {
    margin: 4px 0 0;
    font-size: .9rem;
    color: var(--fd-text-muted);
}
.fd-cerfa-note-sm {
    margin: 2px 0 0;
    font-size: .85rem;
    color: var(--fd-text-muted);
}
.fd-cerfa-note-xs {
    margin: 2px 0 8px;
    font-size: .8rem;
    color: var(--fd-text-muted);
}
.fd-cerfa-note-warn {
    margin: 2px 0 8px;
    font-size: .8rem;
    color: #c0392b;
}
[data-theme="dark"] .fd-cerfa-note-warn {
    color: #f28b82;
}
.fd-cerfa-note-orange {
    margin: 6px 0 0;
    font-size: .85rem;
    color: #a35f00;
}
[data-theme="dark"] .fd-cerfa-note-orange {
    color: #e09000;
}
.fd-cerfa-inner {
    padding: 12px 14px;
}
.fd-cerfa-info-box {
    margin: 0;
    border-top: none;
    border-radius: 0 0 4px 4px;
}
.fd-cerfa-subcard {
    margin: 0;
    background: #fcfbf9;
}
[data-theme="dark"] .fd-cerfa-subcard {
    background: rgba(255,255,255,.03);
}

.fd-bug-modal {
    border: none;
    border-radius: 16px;
    padding: 0;
    max-width: 440px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,.18);
}
[data-theme="dark"] .fd-bug-modal {
    background: var(--fd-card-bg);
    color: var(--fd-text);
}
.fd-bug-modal-inner {
    padding: 28px 28px 24px;
}
.fd-bug-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.fd-bug-modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--fd-primary);
    margin: 0;
}
.fd-bug-modal-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--fd-text-muted);
    line-height: 1;
}
.fd-bug-modal-label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: var(--fd-text-muted);
    margin-bottom: 6px;
}
.fd-bug-modal-select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #e6ddd0;
    border-radius: 10px;
    font-size: .95rem;
    margin-bottom: 14px;
    background: #fcfbf9;
}
[data-theme="dark"] .fd-bug-modal-select {
    background: var(--fd-input-bg);
    border-color: var(--fd-border);
    color: var(--fd-text);
}
.fd-bug-modal-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #e6ddd0;
    border-radius: 10px;
    font-size: .95rem;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
    background: #fcfbf9;
    margin-bottom: 18px;
}
[data-theme="dark"] .fd-bug-modal-textarea {
    background: var(--fd-input-bg);
    border-color: var(--fd-border);
    color: var(--fd-text);
}
.fd-bug-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
.fd-bug-modal-cancel {
    padding: 9px 18px;
    border: 1.5px solid #e6ddd0;
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
    font-size: .9rem;
    color: var(--fd-text-muted);
}
[data-theme="dark"] .fd-bug-modal-cancel {
    background: var(--fd-card-bg);
    border-color: var(--fd-border);
    color: var(--fd-text);
}
.fd-bug-modal-submit {
    padding: 9px 20px;
    background: var(--fd-primary-solid);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
}
.fd-bug-modal-sent {
    color: #1a7c4a;
    font-weight: 600;
    text-align: center;
    padding: 12px 0;
}
.fd-bug-modal-context {
    margin: 0 0 16px;
    padding: 10px 12px;
    border-left: 3px solid var(--fd-primary);
    border-radius: 0 8px 8px 0;
    background: rgba(242, 107, 33, .12);
    color: var(--fd-text);
    font-size: .82rem;
    line-height: 1.55;
}
.fd-bug-modal-page {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    word-break: break-all;
}
[data-theme="dark"] .fd-bug-modal-context {
    background: rgba(242, 107, 33, .16);
}

.fd-card-mb {
    margin-bottom: 16px;
}
.fd-card-mb20 {
    margin-bottom: 20px;
}
.fd-card-mt {
    margin-top: 16px;
}
.fd-card-mt20 {
    margin-top: 20px;
}

.fd-releve-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.fd-releve-meta {
    margin: 0 0 4px;
    font-size: .85rem;
    color: var(--fd-text-muted);
}
.fd-status-open-link {
    font-size: .82rem;
    padding: 6px 12px;
    display: inline-block;
    margin-top: 10px;
}

.fd-td-bold-primary {
    font-weight: 600;
    color: var(--fd-primary);
    white-space: nowrap;
}
.fd-td-tech {
    font-size: .82rem;
    color: var(--fd-text-muted);
}
.fd-td-center {
    text-align: center;
}

.fd-td-sub {
    font-size: .8rem;
}
.fd-td-ua {
    font-size: .8rem;
    max-width: 200px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.fd-rapides-empty {
    padding: 16px;
    color: var(--fd-text-muted);
    text-align: center;
}

.fd-404-btn {
    width: auto;
    margin: 0;
    padding: 11px 22px;
    text-decoration: none;
}

.fd-report-title {
    text-align: left;
    margin-bottom: 10px;
}
.fd-report-notes-text {
    white-space: pre-wrap;
    margin: 0;
}
.fd-report-note-wrap {
    margin-top: 8px;
}
.fd-report-textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #e3dbd0;
    border-radius: 8px;
    font-size: .93rem;
    resize: vertical;
}
[data-theme="dark"] .fd-report-textarea {
    background: var(--fd-input-bg);
    border-color: var(--fd-border);
    color: var(--fd-text);
}

.fd-cerfa-list-link {
    display: block;
    text-decoration: none;
    color: inherit;
    margin-bottom: 10px;
}
.fd-cerfa-list-title {
    margin: 0;
    font-weight: 700;
    color: var(--fd-primary);
}
.fd-cerfa-list-time {
    font-weight: 400;
    font-size: .85rem;
    color: var(--fd-text-muted);
}
.fd-cerfa-list-motif {
    margin: 6px 0 0;
    color: var(--fd-text-muted);
    font-size: .9rem;
    padding-top: 6px;
    border-top: 1px solid #f4f0ea;
}
.fd-cerfa-list-actions {
    margin: 6px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.fd-cerfa-list-meta {
    color: var(--fd-text-muted);
    font-size: .82rem;
}
.fd-cerfa-status-badge {
    border-radius: 4px;
    padding: 2px 10px;
    font-size: .78rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.fd-cerfa-status-badge-en_cours { background: #e67e221a; color: #a45713; border-color: #e67e2244; }
.fd-cerfa-status-badge-termine  { background: #2980b91a; color: #c9520d; border-color: #2980b944; }
.fd-cerfa-status-badge-valide   { background: #27ae601a; color: #1b7842; border-color: #27ae6044; }
.fd-cerfa-status-badge-archive  { background: #7f8c8d1a; color: #646f70; border-color: #7f8c8d44; }

.fd-super-admin-input {
    background: #f5f5f5;
    color: #888;
    cursor: not-allowed;
}
[data-theme="dark"] .fd-super-admin-input {
    background: #2a2a2a;
    color: #666;
}
.fd-perm-admin-note {
    font-size: .8rem;
    color: var(--fd-text-muted);
    margin-top: 8px;
}

/* Les deux moyens de fournir une signature, côte à côte : une petite carte
   pour l'import, une pour le tracé. Sous ~530 px elles repassent l'une sous
   l'autre d'elles-mêmes, par le flex-basis. */
.fd-sig-moyens {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.fd-sig-moyen {
    flex: 1 1 260px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px 12px;
    border: 1px solid var(--fd-border-light);
    border-radius: 8px;
    background: var(--fd-card-bg);
}
.fd-sig-moyen-titre {
    font-weight: 700;
    font-size: .88rem;
}
.fd-sig-canvas {
    display: block;
    width: 100%;
    max-width: 480px;
    height: 180px;
    border: 1px solid var(--fd-border);
    border-radius: 8px;
    background: #fff;
    touch-action: none;
    cursor: crosshair;
}
/* Les boutons des deux cartes : poussés en bas par margin-top:auto, ils
   s'alignent entre eux quelle que soit la hauteur du contenu au-dessus. */
.fd-sig-moyen-actions {
    margin-top: auto;
    padding-top: 6px;
}
.fd-sig-current-label {
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--fd-text-muted);
}

/* Cadre de saisie groupée, sur « Mon profil » : la signature, puis le choix de
   l'application de navigation. Le nom évite .fd-sig-block, déjà pris par les
   blocs de signature des bons et des contrats — et que image-tolerante.js
   masque quand son image manque.
   Pour la signature, il regroupe les deux façons de la fournir — importer
   un fichier ou signer à la main — et l'aperçu de celle déjà enregistrée.
   Détaché des champs qui le précèdent, il se lit comme un ensemble ; le
   <fieldset> le dit aussi aux lecteurs d'écran, ce qu'un <label> flottant ne
   faisait pas. Pas de fond propre : une couleur de plus entre la carte et les
   champs serait à revalider dans les deux thèmes sans rien apporter ici. */
.fd-fieldset {
    min-width: 0;   /* sans quoi un fieldset refuse de passer sous la largeur de son contenu */
    /* Le bas de ce formulaire respirait moins que le haut : 22px entre les
       cadres contre 28px plus bas, alors que les rangées de champs viennent de
       passer à 22px d'écart visuel. Ces marges donnent 32px partout — entre la
       case d'attestation et le premier cadre, entre les deux cadres, et entre le
       dernier cadre et le bouton Enregistrer. */
    margin: 10px 0 10px;
    /* Aucun retrait horizontal : les onglets, le sélecteur de fichier et la zone
       de tracé se rangent alors dans la même colonne que les champs du dessus.
       Le cadre ne peut pas être élargi à la place : le formulaire touche déjà
       le padding de la carte, il déborderait. */
    padding: 2px 8px 14px;
    border: 1px solid var(--fd-border);
    border-radius: 10px;
}
/* Variante qui épouse son contenu au lieu de s'étirer. Depuis que les tuiles de
   navigation ne remplissent plus la rangée, un cadre pleine largeur laissait
   370px de vide à leur droite. */
.fd-fieldset-title {
    /* Le titre garde un léger retrait : posé sur la bordure, il viendrait sinon
       chevaucher l'arrondi du coin. */
    margin-left: 6px;
    padding: 6px 6px;
    font-weight: 700;
}

/* Choix de l'application de navigation : des tuiles à cocher plutôt qu'une
   liste déroulante. Le bouton radio reste dans le document — déplacé hors
   écran et non « display:none » — pour rester atteignable au clavier et
   annonçable par un lecteur d'écran. */
/* Carte volontairement étroite et centrée — le formulaire de mot de passe n'a
   que trois champs courts, et les étirer sur toute la largeur les rendait plus
   difficiles à viser qu'à lire. Sous 700px la carte reprend la pleine largeur :
   le media query général lui donne déjà ses marges latérales. */
@media (min-width: 701px) {
    .fd-card.fd-card-etroite {
        max-width: 380px;
        margin-left: auto;
        margin-right: auto;
    }
}

.fd-nav-choix {
    display: flex;
    flex-wrap: wrap;
    /* Les tuiles gardent leur largeur (flex-grow à 0) mais se répartissent sur
       toute la rangée : la première au bord gauche, la dernière au bord droit,
       les écarts égaux entre elles. Le cadre peut ainsi faire la même largeur
       que celui de la signature sans laisser de vide à droite. Le gap reste
       l'écart minimal, pour les écrans où les tuiles se replient. */
    justify-content: space-between;
    gap: 10px;
}
/* Les tuiles ne collent pas à la bordure du cadre. Le retrait est posé sur la
   rangée et non sur le fieldset : le cadre garde ainsi exactement la largeur de
   celui de la signature, bord à bord, et seules les tuiles rentrent. Rien en
   dessous de 701px, où les 24px pris feraient tomber à une seule tuile par
   rangée au lieu de deux. */
@media (min-width: 701px) {
    .fd-nav-choix {
        padding: 0 12px;
    }
}
/* Préfixe « .fd-card label » : sans lui, .fd-card label (display:block,
   padding:3px, margin:8px 0 3px) l'emporte et la tuile retombe en bloc. C'est
   le même motif que .fd-card label.fd-checkbox-label, plus bas. */
.fd-card label.fd-nav-opt {
    position: relative;
    /* flex-grow à 0 : les tuiles gardent leur largeur au lieu de s'étirer sur
       toute la rangée. Elles peuvent encore rétrécir (shrink à 1), ce qui garde
       deux tuiles par rangée sur téléphone sans déborder. */
    flex: 0 1 130px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    margin: 0;
    padding: 6px 10px;
    border: 1px solid var(--fd-border);
    border-radius: 10px;
    cursor: pointer;
    color: var(--fd-text);
    background: var(--fd-card-bg);
}
.fd-card label.fd-nav-opt input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}
.fd-nav-icone svg {
    display: block;
    width: 18px;
    height: 18px;
}
.fd-nav-nom {
    font-size: .68rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}
.fd-card label.fd-nav-opt:hover {
    border-color: var(--fd-btn-bg);
    background: var(--fd-btn-hover);
}
/* L'état retenu : bordure franche et léger fond. La coche en haut à droite le
   dit aussi autrement que par la couleur seule. */
.fd-card label.fd-nav-opt:has(input:checked) {
    border-color: var(--fd-btn-bg);
    box-shadow: inset 0 0 0 1px var(--fd-primary-solid);
    background: var(--fd-btn-active);
}
.fd-card label.fd-nav-opt:has(input:checked)::after {
    content: '\2713';
    position: absolute;
    top: -10px;
    right: -4px;
    font-size: 20px;
    font-weight: 800;
    color: #077a2adb;
}
/* Le focus clavier doit se voir, puisque le bouton radio lui-même est hors écran. */
.fd-card label.fd-nav-opt:focus-within {
    outline: var(--fd-btn-active);
    outline-offset: 2px;
}

.fd-profile-img {
    background: #ffffff;
    max-width: 220px;
    border-radius: 8px;
    margin-top: 6px;
}
.fd-profile-logo {
    max-width: 160px;
}
.fd-label-opt {
    font-weight: 400;
    color: var(--fd-text-muted);
}
/* Uniquement la parenthèse à l'intérieur d'un libellé : la même taille que
   .fd-cerfa-opt, qui joue déjà ce rôle ailleurs. La règle ne vise pas
   .fd-label-opt posée sur un <label> entier — admin/user-edit.php s'en sert
   ainsi pour « Attestation d'aptitude F-Gas », qui doit garder sa taille. */
label .fd-label-opt {
    font-size: .85rem;
}
.fd-label-flex-lg {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 400;
    cursor: pointer;
    margin-top: 16px;
}
.fd-checkbox-lg {
    width: 18px;
    height: 18px;
    accent-color: var(--fd-primary);
    cursor: pointer;
    flex-shrink: 0;
}

.fd-site-photos-link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.fd-site-photos-thumbs {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.fd-site-photos-thumbs::-webkit-scrollbar { display: none; }
.fd-site-photos-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #eae1d4;
    flex-shrink: 0;
}

.fd-site-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.fd-site-title-row h1 {
    margin: 10px auto 0;
}
.fd-site-photos-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.fd-site-photos-head-flat {
    margin-bottom: 0;
}
.fd-site-photos-label {
    font-size: 1rem;
    color: var(--fd-primary);
}
.fd-site-photos-count {
    font-size: .82rem;
    color: var(--fd-text-muted);
    margin-left: 2px;
}
.fd-site-photos-chevron {
    margin-left: auto;
    color: var(--fd-text-muted);
    font-size: 1.2rem;
}
.fd-equip-list-header {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.fd-sg-td-actions {
    white-space: nowrap;
}
.fd-sg-td-name {
    font-weight: 600;
}
.fd-sg-empty {
    color: var(--fd-text-muted);
    text-align: center;
    padding: 24px 0;
}
.fd-cfgdash-item .fd-color-swatch {
    flex: 0 0 auto;
}
.fd-sg-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 6px;
}
.fd-sg-actions .fd-button {
    margin: 0 !important;
}
.fd-sg-item {
    flex-wrap: wrap;
}
.fd-sg-sites {
    flex: 1 1 100%;
    order: 10;
}
.fd-sg-sites > summary {
    cursor: pointer;
    font-size: .85rem;
    font-weight: 600;
    color: var(--fd-primary);
}
.fd-sg-sites-form {
    margin-top: 8px;
}
.fd-sg-sites .fd-sg-sites-filtre {
    width: 100%;
    box-sizing: border-box;
    margin: 8px 0;
}
.fd-sg-sites-liste {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
    gap: 2px 14px;
    max-height: 320px;
    overflow-y: auto;
    margin: 0;
    padding: 8px 10px;
    list-style: none;
    border: 1px solid var(--fd-border-light);
    border-radius: 6px;
    background: var(--fd-card-bg);
}
.fd-sg-site {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    cursor: pointer;
}
.fd-sg-site input[type="checkbox"] {
    flex: 0 0 auto;
    width: 17px !important;
    height: 17px !important;
    margin: 0 !important;
    accent-color: var(--fd-primary);
    cursor: pointer;
}
.fd-sg-site-texte {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.fd-sg-site-nom {
    font-size: .88rem;
    font-weight: 600;
    color: var(--fd-text);
}
.fd-sg-site-ville {
    font-size: .78rem;
    color: var(--fd-text-muted);
}
.fd-sg-site .fd-group-badge {
    flex: 0 0 auto;
}
.fd-sg-site-groupes {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}
.fd-sg-site-plein {
    cursor: not-allowed;
    opacity: .55;
}
.fd-sg-site-plein input[type="checkbox"] {
    cursor: not-allowed;
}
.fd-sg-sites-form .fd-flex-end {
    margin-top: 10px;
}
.fd-sg-sites-form .fd-button {
    margin: 0 !important;
}
@media (max-width: 640px) {
    .fd-sg-actions {
        order: 2;
    }
}
.fd-err-phone {
    margin: 2px 0 0;
    font-size: .8rem;
    color: #e74c3c;
}
.fd-cerfa-header {
    background: linear-gradient(90deg, #14213d, #a4460f);
    color: #fff;
}
.fd-cerfa-header h2 {
    margin: 0;
    color: #fff;
    text-align: left;
}
.fd-cerfa-header p {
    margin: 4px 0 0;
    font-size: .85rem;
    opacity: .85;
}
.fd-label-flex-mt {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    margin-top: 12px;
}
.fd-cerfa-note-sm-mb {
    margin: 0 0 10px;
    font-size: .85rem;
    color: var(--fd-text-muted);
}
.fd-mt-xs {
    margin-top: 4px;
}
.fd-mt-md {
    margin-top: 14px;
}
.fd-label-mt {
    margin-top: 10px;
}
.fd-card-m0 {
    margin: 0;
}
.fd-p0 {
    margin: 0;
}
.fd-p-sm {
    margin: 2px 0 0;
    font-size: .9rem;
}
.fd-p-cap {
    margin: 6px 0 0;
    font-size: .9rem;
}
.fd-operator-warn {
    color: #a35f00;
    font-size: .8rem;
    font-weight: 400;
}
[data-theme="dark"] .fd-operator-warn {
    color: #e09000;
}
.fd-accordion-summary .fd-operator-warn,
.fd-accordion-summary-sub .fd-operator-warn,
[data-theme="dark"] .fd-accordion-summary .fd-operator-warn,
[data-theme="dark"] .fd-accordion-summary-sub .fd-operator-warn {
    color: #ffe3ad;
}
.fd-accordion-summary .fd-cerfa-opt,
.fd-accordion-summary-sub .fd-cerfa-opt {
    color: #eee7dc;
}
.fd-text-body {
    font-size: .9rem;
}
.fd-text-danger {
    color: #c0392b;
}
.fd-label-clickable {
    cursor: pointer;
}
.fd-mb-md {
    margin-bottom: 14px;
}
.fd-mb-lg {
    margin-bottom: 18px;
}
.fd-button-light {
    background: #f7f3ee;
    color: var(--fd-primary);
    border-color: #e6daca;
}
.fd-drag-handle {
    display: block;
    cursor: grab;
    color: #5f7280;
    font-size: 1.2rem;
    line-height: 1;
    margin-bottom: 8px;
    user-select: none;
}
[data-theme="dark"] .fd-drag-handle {
    color: #b0c4ce;
}
.fd-drag-handle:active {
    cursor: grabbing;
}
.fd-section-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 9px 0;
    border-bottom: 1px solid #eef2f4;
}
.fd-section-row:last-child {
    border-bottom: none;
}
.fd-section-row .fd-drag-handle {
    display: inline-block;
    margin-bottom: 0;
    flex-shrink: 0;
}
.fd-section-row input[type="checkbox"] {
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    margin: 0 !important;
    margin-top: 0 !important;
    cursor: pointer;
    accent-color: var(--fd-primary);
}
.fd-section-row label {
    margin: 0 !important;
    font-weight: 500;
    font-size: .93rem;
    cursor: pointer;
    color: var(--fd-text);
    line-height: 1;
}
.fd-section-row span {
    font-size: .93rem;
    cursor: pointer;
    padding: 0 10px;
}
/* La parenthèse d'un libellé se lit à la même taille que celle des champs.
   La règle vise les spans qui portent l'une de ces deux classes, et non
   « .fd-section-row span » tout court : sur bons-intervention/edit.php, le span
   nu EST le libellé principal (« CERFA établi », « Client absent… »), il doit
   garder ses .93rem. */
.fd-section-row .fd-cerfa-opt,
.fd-section-row .fd-label-opt {
    font-size: .85rem;
}
.fd-section-row label {
    font-size: .93rem;
    font-weight: 500;
    color: var(--fd-text);
    cursor: pointer;
    margin: 0;
    line-height: 1;
}
.fd-opt-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}
.fd-opt-row .fd-input {
    flex: 1;
    margin: 0;
}
.fd-opt-remove {
    flex-shrink: 0;
    background: none;
    border: 1px solid #e6daca;
    border-radius: 4px;
    color: #c0392b;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 4px 8px;
}

.fd-feed-card {
    display: flex;
    margin: 60px 20px 35px;
    flex-direction: column;
    gap: 12px;
    padding: 25px 16px;
    background: none;
    box-shadow: none;
}
.fd-feed-pinned-group { display: flex; flex-direction: column; gap: 6px; }
.fd-feed-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 360px;
    overflow-y: auto;
    padding: 4px 0;
}
.fd-feed-msg {
    background: var(--fd-card-bg, #faf8f5);
    border: 1px solid var(--fd-border-light, #eae3d9);
    border-radius: 6px;
    padding: 8px 10px;
}
.fd-feed-msg-mine {
    background: #f6f2ed;
    border-color: #e0d2be;
}
.fd-feed-msg-pinned {
    background: #fff8e1;
    border-color: #c6c6c6;
}
[data-theme="dark"] .fd-feed-msg         {background: #030404;border-color: #1e2d50;}
[data-theme="dark"] .fd-feed-msg-mine    {background: #101b36;border-color: #c9520d;}
[data-theme="dark"] .fd-feed-msg-pinned  {background: #2d2700;border-color: #554b1d;}
.fd-feed-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}
.fd-feed-author { font-weight: 700; font-size: .85rem; }
.fd-feed-date   { font-size: .78rem; color: var(--fd-text-muted); }
.fd-feed-pin-icon { font-size: .85rem; }
.fd-feed-actions { display: flex; gap: 6px; margin-left: auto; }
.fd-feed-form-inline { display: inline; }
.fd-btn-feed {
    background: transparent;
    border: 1px solid var(--fd-border-light, #e6daca);
    border-radius: 4px;
    cursor: pointer;
    font-size: .75rem;
    padding: 2px 7px;
    margin: 0;
    color: var(--fd-text, #222);
    transition: background .15s;
}
.fd-btn-feed:hover { background: var(--fd-border-light, #f4efe9); }
.fd-feed-btn-del {color: #c0392b;border-color: #b7797933;}
.fd-feed-text {
    font-size: .9rem;
    font-family: inherit;
    line-height: 1.5;
    padding: 4px 0;
    white-space: pre-wrap;
    word-break: break-word;
}
.fd-feed-empty { font-size: .9rem; color: var(--fd-text-muted); text-align: center; padding: 12px 0; }
.fd-feed-compose { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--fd-border-light, #eae3d9); padding-top: 10px; }
.fd-feed-textarea { resize: vertical; min-height: 52px; }
.fd-feed-compose-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fd-feed-edit-form { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.fd-feed-reactions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.fd-btn-react {
    border-radius: 12px;
    padding: 2px 9px;
    font-size: .8rem;
    border-color: var(--fd-border-light, #e6daca);
}
.fd-btn-react:hover { background: var(--fd-border-light, #f4efe9); }
.fd-btn-react-active {
    background: #f1ebe2;
    border-color: #f26b21;
    color: #1f3259;
    font-weight: 600;
}
[data-theme="dark"] .fd-btn-react-active { background: #17274e; border-color: #f26b21; color: #f69f6c; }
.fd-feed-purge-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    border-top: 1px solid var(--fd-border-light, #eae3d9);
    padding-top: 8px;
}

.fd-fluide-kpi {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-bottom: .4rem;
}
.fd-fluide-kpi > .fd-dash-block {
    flex: 1;
    min-width: 280px;
}

.fd-fluide-separator {
    border: none;
    border-top: 2px solid var(--fd-border, #dde3ea);
    margin: 7px 0 2px;
    opacity: .6;
}

.fd-fluide-filter-section {
    margin-bottom: .6rem;
}

.fd-fluide-bottom-section {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 10px;
    background: var(--fd-card-bg);
    border-radius: 2px;
    box-shadow: 0 2px 8px var(--fd-card-shadow);
    color: var(--fd-text);
    padding: 10px 16px;
    animation: fd-bottom-in .4s ease both;
    transition: opacity .35s ease;
}

.fd-fluide-bottom-card {
    background: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
    color: inherit;
}

.fd-fluide-bottom-section > .fd-dash-block + .fd-dash-block {
    margin-top: 1.2rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--fd-border-light);
}
.fd-fluide-bottom-section.fd-leaving {
    opacity: 0;
}
@keyframes fd-bottom-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fd-fluide-ref-select {
    min-width: 160px;
    max-width: 200px;
    cursor: pointer;
}

.fd-csel-wrap {
    position: relative;
    display: inline-flex;
}
.fd-csel-trigger {
    min-width: 160px;
    max-width: 220px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
}
.fd-csel-trigger span:first-child {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fd-csel-arrow {
    font-size: .65rem;
    color: var(--fd-text-muted);
    flex-shrink: 0;
}
.fd-csel-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 200px;
    background: var(--fd-card-bg, #fff);
    border: 1px solid var(--fd-border, #dde3ea);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,.22);
    z-index: 200;
    padding: 5px;
}
.fd-csel-liste {
    max-height: 220px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--fd-scroll-thumb) transparent;
}
.fd-csel-liste::-webkit-scrollbar {
    width: 9px;
}
.fd-csel-liste::-webkit-scrollbar-track {
    background: transparent;
}
.fd-csel-liste::-webkit-scrollbar-thumb {
    background: var(--fd-scroll-thumb);
    border-radius: 6px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
.fd-csel-liste::-webkit-scrollbar-thumb:hover {
    background: var(--fd-scroll-thumb-hover);
    background-clip: padding-box;
}
.fd-csel-search {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 6px;
    padding: 6px 8px;
    border: 1px solid var(--fd-border);
    border-radius: 6px;
    font-size: .85rem;
    color: var(--fd-text);
    background: var(--fd-input-bg);
}
[data-theme="dark"] .fd-csel-search::placeholder {
    color: var(--fd-text-muted);
    opacity: 1;
}
.fd-csel-vide {
    margin: 0;
    padding: 7px 10px;
    font-size: .85rem;
    color: var(--fd-text-muted);
}
.fd-csel-vide[hidden] {
    display: none;
}
.fd-csel-opt[hidden] {
    display: none;
}
.fd-csel-opt {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0;
    cursor: pointer;
    font-size: .88rem;
    border-radius: 6px;
    transition: background .12s ease;
}
.fd-csel-opt:hover { background: rgba(242,107,33,.14); }
.fd-csel-opt.fd-csel-selected {
    background: rgba(242,107,33,.16);
    font-weight: 600;
    color: var(--fd-primary, #f26b21);
}
.fd-csel-opt-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    -webkit-appearance: none;
    appearance: none;
    border: 0;
    margin: 0;
    padding: 0;
    background: none;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
    padding: 7px 4px 7px 10px;
}
.fd-csel-opt-name:only-child {
    padding-right: 10px;
}
.fd-csel-opt:focus-within {
    background: rgba(242,107,33,.14);
}
.fd-csel-opt-name:focus-visible,
.fd-csel-star:focus-visible {
    outline: 2px solid var(--fd-primary, #f26b21);
    outline-offset: 1px;
}
.fd-csel-opt > .fd-csel-star {
    flex-shrink: 0;
    padding: 7px 10px 7px 4px;
    line-height: 1;
}
.fd-csel-group-label {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--fd-text-muted);
    padding: 6px 10px 2px;
}
.fd-csel-sep {
    border-top: 1px solid var(--fd-border, #dde3ea);
    margin: 4px 0;
}

.fd-accordion-sub:not([data-doc-type]) > .fd-accordion-summary-sub .fd-fluide-equip-refrigerant,
.fd-accordion-sub:not([data-doc-type]) > .fd-accordion-summary-sub .fd-fluide-equip-stats {
    color: rgba(255, 255, 255, .88);
}

.fd-fluide-inv-tile-kg  { background: #f1eae1; }
.fd-fluide-inv-tile-co2 { background: #fce4ec; }
[data-theme="dark"] .fd-fluide-inv-tile-kg  { background: #0a1122; }
[data-theme="dark"] .fd-fluide-inv-tile-co2 { background: #2a0d15; }
.fd-fluide-inv-tile-kg  .fd-fluide-bilan-value { color: #00695c; }
.fd-fluide-inv-tile-co2 .fd-fluide-bilan-value { color: #ad1457; }
[data-theme="dark"] .fd-fluide-inv-tile-kg  .fd-fluide-bilan-value { color: #4db6ac; }
[data-theme="dark"] .fd-fluide-inv-tile-co2 .fd-fluide-bilan-value { color: #f48fb1; }

.fd-fgas-wrap {
    margin: 4px 0 22px;
}
.fd-fgas-title {
    font-size: .78rem;
    font-weight: 600;
    color: var(--fd-text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.fd-fgas-bar {
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    height: 44px;
    gap: 2px;
}
.fd-fgas-zone {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px 2px;
    opacity: .7;
    transition: opacity .2s;
    cursor: default;
}
.fd-fgas-zone-active {
    opacity: 1;
    outline: 2px solid rgba(0,0,0,.2);
    outline-offset: -2px;
}
.fd-fgas-zone-1 { background: #c8e6c9; }
.fd-fgas-zone-2 { background: #fff9c4; }
.fd-fgas-zone-3 { background: #ffe0b2; }
.fd-fgas-zone-4 { background: #ffcdd2; }
[data-theme="dark"] .fd-fgas-zone-1 { background: #1b4332; }
[data-theme="dark"] .fd-fgas-zone-2 { background: #3d3300; }
[data-theme="dark"] .fd-fgas-zone-3 { background: #3d2000; }
[data-theme="dark"] .fd-fgas-zone-4 { background: #3d0a0a; }
.fd-fgas-zone-val {
    font-size: .72rem;
    font-weight: 700;
    color: var(--fd-text);
    white-space: nowrap;
}
.fd-fgas-zone-desc {
    font-size: .65rem;
    color: var(--fd-text);
    white-space: nowrap;
}
.fd-fgas-zone-active .fd-fgas-zone-val  { color: var(--fd-primary); }
.fd-fgas-zone-active .fd-fgas-zone-desc { color: #c9520d; }
[data-theme="dark"] .fd-fgas-zone-active .fd-fgas-zone-val  { color: #f69f6c; }
[data-theme="dark"] .fd-fgas-zone-active .fd-fgas-zone-desc { color: #f48f54; }
.fd-fgas-current {
    margin-top: 7px;
    font-size: .8rem;
    color: var(--fd-text-muted);
}
.fd-fgas-current strong { color: var(--fd-primary); }

.fd-fluide-inv-list {
    border-top: 1px solid var(--fd-border-light, #eae3d9);
    margin-bottom: 22px;
}
.fd-fluide-inv-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid var(--fd-border-light, #eae3d9);
    font-size: .85rem;
}
.fd-fluide-inv-name {
    flex: 1;
    font-weight: 600;
    color: var(--fd-primary);
}
.fd-fluide-inv-kg {
    font-weight: 700;
    color: #00695c;
    white-space: nowrap;
}
.fd-fluide-inv-co2 {
    color: #ad1457;
    white-space: nowrap;
    font-size: .8rem;
}
.fd-fluide-inv-equip {
    color: var(--fd-text-muted);
    white-space: nowrap;
    font-size: .78rem;
}
[data-theme="dark"] .fd-fluide-inv-kg  { color: #4db6ac; }
[data-theme="dark"] .fd-fluide-inv-co2 { color: #f48fb1; }

.fd-fluide-fav-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: .95rem;
    color: #61747e;
    padding: 0 0 0 .35rem;
    line-height: 1;
    flex-shrink: 0;
    transition: color .15s;
}
.fd-fluide-fav-btn:hover,
.fd-fluide-fav-btn.fd-fluide-fav-on {
    color: #b8761a;
}
[data-theme="dark"] .fd-fluide-fav-btn {
    color: #79919d;
}
[data-theme="dark"] .fd-fluide-fav-btn:hover,
[data-theme="dark"] .fd-fluide-fav-btn.fd-fluide-fav-on {
    color: #f9a825;
}
.fd-fluide-inv-sep {
    border: none;
    border-top: 1px solid var(--fd-border, #dde3ea);
    margin: .35rem 0;
}

.fd-fluide-status-badge {
    display: inline-block;
    font-size: .65rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    vertical-align: middle;
    margin-left: 4px;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.fd-fluide-status-phaseout { background: #fff8e1; color: #ae5507; }
.fd-fluide-status-illegal  { background: #fce4ec; color: #c62828; }
[data-theme="dark"] .fd-fluide-status-phaseout { background: #3d2e00; color: #ffd54f; }
[data-theme="dark"] .fd-fluide-status-illegal  { background: #3d0a0a; color: #ef9a9a; }

.fd-fluide-topsites {
    border-top: 1px solid var(--fd-border-light, #eae3d9);
    padding-top: 14px;
}
.fd-fluide-topsites-title {
    font-size: .78rem;
    font-weight: 600;
    color: var(--fd-text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.fd-fluide-topsites-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: .82rem;
}
.fd-fluide-topsites-name {
    width: 130px;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fd-fluide-topsites-name a {
    color: var(--fd-accent);
    text-decoration: none;
}
.fd-fluide-topsites-name a:hover { text-decoration: underline; }
.fd-fluide-topsites-bar-wrap {
    flex: 1;
    background: var(--fd-border-light, #eae3d9);
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
}
.fd-fluide-topsites-bar {
    height: 100%;
    background: var(--fd-accent, #f26b21);
    border-radius: 4px;
    transition: width .3s;
}
.fd-fluide-topsites-val {
    width: 60px;
    text-align: right;
    font-weight: 600;
    color: var(--fd-primary);
    white-space: nowrap;
    font-size: .8rem;
}

.fd-fluide-kpi > .fd-dash-block[data-widget="mouvements"] {
    display: flex;
    flex-direction: column;
}
.fd-fluide-card-stack {
    margin-top: 1.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.fd-leak-pager {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: auto;
    padding-top: 12px;
}
.fd-card-section-sub {
    font-size: .8rem;
    font-weight: 500;
    color: var(--fd-text-muted);
    margin-left: 6px;
}
.fd-fluide-leaks {
    margin-top: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.fd-fluide-leaks-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.fd-fluide-leaks-title {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--fd-text-muted);
    margin-bottom: 4px;
}
.fd-fluide-leak-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 8px;
    background: var(--fd-body-bg);
    text-decoration: none;
    color: inherit;
    border-left: 3px solid #c62828;
}
.fd-fluide-leak-row:hover {
    background: rgba(198, 40, 40, .10);
}
.fd-fluide-leak-site {
    font-weight: 600;
    font-size: .85rem;
    color: var(--fd-primary);
}
.fd-fluide-leak-equip {
    font-weight: 400;
    color: var(--fd-text-muted);
    margin-left: 4px;
}
.fd-fluide-leak-loc {
    flex: 1;
    min-width: 0;
    font-size: .8rem;
    color: var(--fd-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fd-fluide-leak-date {
    margin-left: auto;
    font-size: .78rem;
    color: var(--fd-text-muted);
    white-space: nowrap;
}
.fd-fluide-leaks-empty {
    margin-top: 1rem;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    border-radius: 8px;
    background: rgba(46, 125, 50, .12);
    color: #43a047;
    font-weight: 500;
    font-size: .85rem;
    text-align: center;
}

.fd-fluide-chart-dual {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.fd-fluide-chart-col {
    flex: 1;
    min-width: 220px;
}
.fd-fluide-chart-col .fd-fluide-chart-title {
    font-size: .78rem;
    font-weight: 600;
    color: var(--fd-text-muted);
    margin-bottom: 10px;
}
.fd-fluide-chart-col .fd-fluide-chart-wrap {
    height: 220px;
    position: relative;
}
.fd-fluide-chart-wrap-donut {
    height: 240px !important;
}

.fd-fluide-search-wrap {
    margin-bottom: 14px;
}

@media (max-width: 640px) {
    .fd-fluide-ref-select { max-width: 100%; }
    .fd-fluide-chart-dual { flex-direction: column; }
    .fd-fluide-topsites-name { width: 90px; }
    .fd-fgas-zone-val  { font-size: .62rem; }
    .fd-fgas-zone-desc { display: none; }
}

.fd-header-slim { height: 60px; }
.fd-header-slim .fd-logo img { height: 36px; }
.fd-404-wrap {
    min-height: 74vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
}
.fd-404-code {
    font-size: 8rem;
    font-weight: 800;
    color: var(--fd-primary);
    opacity: .14;
    line-height: 1;
    margin: 0;
    letter-spacing: -.04em;
}
.fd-404-icon {
    color: var(--fd-primary);
    margin: -34px 0 14px;
}
.fd-404-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--fd-text);
    margin: 0 0 8px;
}
.fd-404-sub {
    color: var(--fd-text-muted);
    font-size: .95rem;
    line-height: 1.6;
    margin: 0 0 28px;
    max-width: 380px;
}
.fd-404-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}
.fd-404-ref {
    margin: 24px 0 0;
    font-size: .82rem;
    color: var(--fd-text-muted);
}
.fd-404-ref-code {
    display: inline-block;
    margin-left: 4px;
    padding: 2px 8px;
    border: 1px solid var(--fd-border);
    border-radius: 6px;
    background: var(--fd-card-bg);
    color: var(--fd-text);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: .08em;
}
.fd-err-inline {
    margin: 18px;
    padding: 12px 14px;
    border-left: 3px solid #c0392b;
    border-radius: 0 6px 6px 0;
    background: rgba(192, 57, 43, .08);
    color: #c0392b;
    font-size: .88rem;
    font-weight: 600;
}
@media (max-width: 600px) {
    .fd-404-code { font-size: 5.5rem; }
    .fd-404-icon { margin: -22px 0 12px; }
    .fd-404-title { font-size: 1.25rem; }
}

.fd-bil-tabs,
.fd-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--fd-border);
}
.fd-bil-tab,
.fd-tab {
    padding: 8px 18px;
    text-decoration: none;
    color: var(--fd-text-muted);
    font-weight: 600;
    border-radius: 8px 8px 0 0;
    border: 1px solid transparent;
    border-bottom: none;
    margin-bottom: -2px;
}
.fd-bil-tab-active,
.fd-tab-active {
    color: var(--fd-primary);
    background: var(--fd-card-bg);
    border-color: var(--fd-border);
    border-bottom: 2px solid var(--fd-card-bg);
}

.fd-bil-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.fd-bil-tile {
    background: var(--fd-card-bg);
    border: 1px solid var(--fd-border-light);
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    box-shadow: 0 1px 4px var(--fd-card-shadow);
}
.fd-bil-tile-label {
    font-size: .8rem;
    color: var(--fd-text-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.fd-bil-tile-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--fd-primary);
}
.fd-bil-tile-sub {
    font-size: .85rem;
    color: var(--fd-text-muted);
}

.fd-bil-filter-select {
    width: auto;
    min-width: 208px;
    max-width: 240px;
    margin: 4px;
    padding: 5px 32px 5px 10px;
    border: 1px solid #e6daca;
    border-radius: 4px;
    font-size: .9rem;
    font-family: inherit;
    line-height: 1.2;
    color: var(--fd-text);
    background-color: #fff;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%230b4f6c' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center;
    background-size: 11px 7px;
}
.fd-bil-filter-select:hover {
    border-color: var(--fd-primary);
}
.fd-bil-filter-select:focus-visible {
    border-color: var(--fd-primary);
    box-shadow: 0 0 0 3px rgba(242, 107, 33, .18);
}
[data-theme="dark"] .fd-bil-filter-select {
    background-color: var(--fd-card-bg);
    color: var(--fd-text);
    border-color: var(--fd-border);
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%234ab0d8' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
}
[data-theme="dark"] .fd-bil-filter-select option {
    background-color: var(--fd-card-bg);
    color: var(--fd-text);
}

.fd-status-badge-bil-brouillon { background: #ececec; color: #666; }
.fd-status-badge-bil-envoye    { background: #f5f0e9; color: #c9520d; }
.fd-status-badge-bil-accepte   { background: #e6f6ea; color: #1e7c3d; }
.fd-status-badge-bil-refuse    { background: #fdecea; color: #c62828; }
.fd-status-badge-bil-retracte  { background: #f3e8fb; color: #6a1b9a; }
.fd-status-badge-bil-expire    { background: #fff3e0; color: #a55706; }
.fd-status-badge-bil-emise     { background: #f5f0e9; color: #c9520d; }
.fd-status-badge-bil-partielle { background: #fff3e0; color: #a55706; }
.fd-status-badge-bil-payee     { background: #e6f6ea; color: #1e7c3d; }
[data-theme="dark"] .fd-status-badge-bil-brouillon { background: #2a2a2a; color: #a0a0a0; }
[data-theme="dark"] .fd-status-badge-bil-envoye    { background: #0f1a33; color: #f38546; }
[data-theme="dark"] .fd-status-badge-bil-accepte   { background: #0d2a18; color: #4fc87a; }
[data-theme="dark"] .fd-status-badge-bil-refuse    { background: #350d0d; color: #e57373; }
[data-theme="dark"] .fd-status-badge-bil-retracte  { background: #2a1438; color: #ce93d8; }
[data-theme="dark"] .fd-status-badge-bil-expire    { background: #3a200a; color: #f0a05a; }
[data-theme="dark"] .fd-status-badge-bil-emise     { background: #0f1a33; color: #f38546; }
[data-theme="dark"] .fd-status-badge-bil-partielle { background: #3a200a; color: #f0a05a; }
[data-theme="dark"] .fd-status-badge-bil-payee     { background: #0d2a18; color: #4fc87a; }
[data-theme="dark"] .fd-bil-type-tag               { background: #1e2e54; color: #9aa3b9; }
.fd-status-badge.fd-bil-a-regulariser { background: #fff3e0; color: #a55706; margin-left: 6px; }
[data-theme="dark"] .fd-status-badge.fd-bil-a-regulariser { background: #3a200a; color: #f0a05a; }
.fd-bil-envoye-le {
    display: block;
    margin-top: 3px;
    font-size: .75rem;
    color: var(--fd-text-muted);
}
.fd-button.fd-bil-envoi-bientot {
    opacity: .6;
    cursor: default;
}
.fd-mail-entetes {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 4px 14px;
    margin: 0 0 12px;
    font-size: .9rem;
}
.fd-mail-entetes dt {
    color: var(--fd-text-muted);
}
.fd-mail-entetes dd {
    margin: 0;
    overflow-wrap: anywhere;
}
.fd-mail-apercu {
    display: block;
    width: 100%;
    min-height: 560px;
    border: 1px solid var(--fd-border-light);
    border-radius: 8px;
    background: #eef2f4;
    margin: 6px 0 12px;
}

.fd-bil-trop-percu {
    color: #8a6800;
    font-weight: 500;
    white-space: nowrap;
}
[data-theme="dark"] .fd-bil-trop-percu { color: #f0c674; }

.fd-bil-lines-table {
    min-width: 760px;
}
.fd-bil-lines-table td {
    vertical-align: top;
}
.fd-bil-input {
    padding: 6px 8px;
    font-size: .9rem;
}
.fd-bil-col-move   { width: 34px; white-space: nowrap; }
.fd-bil-col-qty    { width: 70px; }
.fd-bil-col-unite  { width: 80px; }
.fd-bil-col-prix   { width: 100px; }
.fd-bil-col-tva    { width: 90px; }
.fd-bil-col-remise { width: 76px; }
.fd-bil-col-total  { width: 110px; text-align: right; white-space: nowrap; }
.fd-bil-col-del    { width: 34px; }
.fd-bil-description {
    margin-top: 4px;
    font-size: .82rem;
    resize: vertical;
}
.fd-bil-titre-input {
    font-weight: 700;
}
.fd-bil-line-total {
    display: block;
    padding-top: 10px;
    font-weight: 600;
    text-align: right;
}
.fd-bil-move-btn,
.fd-bil-del-btn {
    display: block;
    background: none;
    border: 1px solid var(--fd-border-light);
    border-radius: 4px;
    color: var(--fd-text-muted);
    cursor: pointer;
    font-size: .7rem;
    line-height: 1;
    padding: 3px 5px;
    margin: 0 0 3px;
}
.fd-bil-del-btn {
    font-size: 1rem;
    color: #c62828;
    margin-top: 6px;
}
[data-theme="dark"] .fd-bil-del-btn {
    color: #f28b82;
}
.fd-bil-move-btn:hover,
.fd-bil-del-btn:hover {
    background: var(--fd-border-light);
}
.fd-bil-add-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 10px 0 4px;
}

.fd-bil-totals {
    margin-top: 14px;
    margin-left: auto;
    max-width: 340px;
}
.fd-bil-totals-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 4px 10px;
    font-size: .95rem;
}
.fd-bil-totals-muted {
    color: var(--fd-text-muted);
    font-size: .87rem;
}
.fd-bil-totals-ttc {
    background: var(--fd-primary-solid);
    color: #fff;
    font-weight: 700;
    border-radius: 6px;
    padding: 8px 10px;
    margin-top: 4px;
}

.fd-bil-autocomplete {
    position: absolute;
    z-index: 300;
    background: var(--fd-card-bg);
    border: 1px solid var(--fd-border);
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
    max-height: 260px;
    overflow-y: auto;
    max-width: 420px;
}
.fd-bil-autocomplete-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: .9rem;
}
.fd-bil-autocomplete-item:hover {
    background: var(--fd-border-light);
}
.fd-bil-autocomplete-item.fd-bil-ac-actif {
    background: var(--fd-border-light);
    box-shadow: inset 3px 0 0 var(--fd-primary);
}
.fd-bil-autocomplete-label {
    color: var(--fd-text);
}
.fd-bil-autocomplete-price {
    color: var(--fd-text-muted);
    white-space: nowrap;
    font-size: .82rem;
}

.fd-bil-two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 760px) {
    .fd-bil-two-cols { grid-template-columns: 1fr; }
}
.fd-bil-timeline {
    list-style: none;
    padding: 0;
    margin: 0;
}
.fd-bil-timeline li {
    position: relative;
    padding: 3px 0 3px 18px;
    font-size: .92rem;
}
.fd-bil-timeline li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 10px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--fd-primary-light);
}
.fd-bil-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.fd-bil-action-form {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    margin: 0;
}
.fd-bil-signataire-input {
    width: 220px;
    padding: 6px 10px;
}
.fd-card select.fd-bil-motif {
    width: auto;
    max-width: 300px;
    padding: 6px 10px;
    margin-top: 0;
}
.fd-bil-btn-danger {
    color: #c62828 !important;
}
[data-theme="dark"] .fd-bil-btn-danger {
    color: #f28b82 !important;
}
.fd-bil-view-titre td {
    background: var(--fd-border-light);
    font-weight: 700;
}
.fd-bil-view-comment td {
    color: var(--fd-text-muted);
    font-style: italic;
    font-size: .88rem;
}
.fd-bil-view-desc {
    font-size: .84rem;
    margin-top: 2px;
    white-space: pre-line;
}

.fd-rt-lg   { font-size: 1.25em; }
.fd-rt-sm   { font-size: .82em; }
.fd-rt-gray { color: var(--fd-text-muted); }
[data-theme="dark"] .fd-rt-gray { color: #9aa7b0; }

.fd-rt-wrap {
    border: 1px solid #e6daca;
    border-radius: 2px;
    overflow: hidden;
}
[data-theme="dark"] .fd-rt-wrap { border-color: #1e2e54; }
.fd-rt-bar {
    display: flex;
    gap: 1px;
    padding: 2px 3px;
    background: #f7f4ef;
    border-bottom: 1px solid #e6daca;
}
[data-theme="dark"] .fd-rt-bar {
    background: #121a2e;
    border-bottom-color: #1e2e54;
}
.fd-rt-btn {
    flex: 0 0 auto;
    min-width: 28px !important;
    width: auto !important;
    height: 16px !important;
    margin: 0 !important;
    padding: 0 6px !important;
    border: 1px solid transparent !important;
    border-radius: 4px !important;
    background: transparent !important;
    color: #14213d;
    font-size: .78rem !important;
    font-weight: 500 !important;
    cursor: pointer;
    line-height: 1 !important;
}
[data-theme="dark"] .fd-rt-btn { color: #e6daca; }
.fd-rt-btn:hover  { background: rgba(20,33,61,.12) !important; box-shadow: none !important; }
.fd-rt-btn:active { background: rgba(20,33,61,.22) !important; box-shadow: none !important; }
.fd-rt-btn-gras     { font-weight: 700; }
.fd-rt-btn-italique { font-style: italic; }
.fd-rt-btn-gris     { color: #6b6b6b; }
[data-theme="dark"] .fd-rt-btn-gris { color: #9aa7b0; }
[data-theme="dark"] .fd-rt-btn:hover { background: rgba(180,210,230,.12); }
.fd-rt-editor {
    min-height: 3.2em;
    padding: 8px 10px;
    outline: none;
    line-height: 1.5;
    white-space: pre-wrap;
}
.fd-rt-editor:empty::before {
    content: attr(data-placeholder);
    color: #97a9b4;
}
.fd-rt-hidden-src { display: none !important; }

.fd-note-picker-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 2px 0 6px;
}
.fd-input-sm {
    max-width: 320px;
    padding: 4px 8px;
    font-size: .85rem;
}
.fd-note-picker-manage {
    font-size: .82rem;
    color: var(--fd-primary);
    text-decoration: none;
    white-space: nowrap;
}
.fd-note-picker-manage:hover { text-decoration: underline; }
[data-theme="dark"] .fd-note-picker-manage { color: #f59d6a; }

.fd-note-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.fd-note-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #eae4db;
    border-radius: 8px;
    background: #fdfcfa;
}
[data-theme="dark"] .fd-note-item {
    border-color: #1e2e54;
    background: #0f1728;
}
.fd-note-body { min-width: 0; flex: 1 1 auto; }
.fd-note-title {
    margin: 0 0 3px;
    font-weight: 600;
}
.fd-note-preview {
    margin: 0;
    font-size: .88rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
}
.fd-note-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}
.fd-note-actions form { margin: 0; }
@media (max-width: 600px) {
    .fd-note-item {
        flex-direction: column;
        align-items: stretch;
    }
    .fd-note-actions {
        justify-content: flex-end;
    }
}

.fd-bil-item-inactif {
    background: rgba(120, 140, 160, .08);
}
.fd-bil-item-actions {
    white-space: nowrap;
}
.fd-bil-item-actions .fd-bil-action-form {
    margin-left: 4px;
}

.fd-status-badge-bil-en_retard { background: #fdecea; color: #c62828; }
[data-theme="dark"] .fd-status-badge-bil-en_retard { background: #350d0d; color: #e57373; }

.fd-bil-tile-alert .fd-bil-tile-value { color: #c62828; }
[data-theme="dark"] .fd-bil-tile-alert .fd-bil-tile-value { color: #e57373; }

a.fd-bil-tile {
    text-decoration: none;
    color: inherit;
    transition: box-shadow .15s ease, transform .15s ease;
}
a.fd-bil-tile:hover {
    box-shadow: 0 3px 10px var(--fd-card-shadow);
    transform: translateY(-1px);
}

.fd-bil-type-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 4px;
    background: #eae3d9;
    color: #4a5f6e;
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.fd-bil-solde {
    border: 1px solid var(--fd-primary);
    border-radius: 6px;
    padding: 7px 10px;
    margin-top: 4px;
    font-weight: 700;
}
.fd-bil-solde-ok {
    border-color: #1e7c3d;
    color: #1e7c3d;
}
.fd-bil-solde-retard {
    border-color: #c62828;
    color: #c62828;
}
.fd-bil-solde-trop {
    border-color: #8a6800;
    color: #8a6800;
}
[data-theme="dark"] .fd-bil-solde-ok     { border-color: #4fc87a; color: #4fc87a; }
[data-theme="dark"] .fd-bil-solde-retard { border-color: #e57373; color: #e57373; }
[data-theme="dark"] .fd-bil-solde-trop   { border-color: #f0c674; color: #f0c674; }

.fd-bil-payment-form {
    margin-top: 14px;
    border-top: 1px solid var(--fd-border-light);
    padding-top: 12px;
}
.fd-bil-payment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}
@media (max-width: 600px) {
    .fd-bil-payment-grid { grid-template-columns: 1fr; }
}

.fd-dash-billing .fd-bil-tiles {
    margin-bottom: 0;
}

.fd-bil-tva-off {
    opacity: .6;
    pointer-events: none;
}
.fd-bil-autoliq-notice {
    margin-bottom: 10px;
}
.fd-bil-acompte-input {
    width: 72px;
    padding: 6px 8px;
    text-align: right;
}
.fd-bil-sig-img {
    box-sizing: border-box;
    max-width: 320px;
    max-width: min(320px, 100%);
    max-height: 130px;
    border: 1px solid var(--fd-border-light);
    border-radius: 6px;
    background: #fff;
    padding: 6px;
}
.fd-bil-export {
    position: relative;
}
.fd-bil-export > summary {
    display: inline-block;
    cursor: pointer;
    list-style: none;
}
.fd-bil-export > summary::-webkit-details-marker {
    display: none;
}
.fd-bil-export > summary::after {
    content: '\25BE';
    margin-left: 7px;
    font-size: .8em;
    display: inline-block;
    transition: transform .15s ease;
}
.fd-bil-export[open] > summary::after {
    transform: rotate(180deg);
}
.fd-bil-export[open] > summary {
    background: var(--fd-primary-solid) !important;
    color: #fff !important;
}
.fd-bil-export-form {
    position: absolute;
    z-index: 40;
    top: calc(100% + 6px);
    left: 0;
    min-width: 230px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px 12px;
    align-items: center;
    background: var(--fd-card-bg);
    border: 1px solid var(--fd-border);
    border-radius: 10px;
    box-shadow: 0 6px 20px var(--fd-card-shadow);
    padding: 14px;
}
.fd-bil-export-form::before {
    content: '';
    position: absolute;
    top: -7px;
    left: 18px;
    width: 12px;
    height: 12px;
    background: var(--fd-card-bg);
    border-left: 1px solid var(--fd-border);
    border-top: 1px solid var(--fd-border);
    transform: rotate(45deg);
}
.fd-bil-export-form .fd-label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--fd-text-muted);
    white-space: nowrap;
    margin: 0;
}
.fd-bil-export-form .fd-input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 7px 10px;
    border: 1px solid #e6daca;
    border-radius: 4px;
    font-size: .88rem;
    font-family: inherit;
    color: var(--fd-text);
    background: #fff;
    outline: none;
}
.fd-bil-export-form .fd-input:focus-visible {
    border-color: var(--fd-primary);
    box-shadow: 0 0 0 3px rgba(242, 107, 33, .18);
}
[data-theme="dark"] .fd-bil-export-form .fd-input {
    background: var(--fd-body-bg);
    color: var(--fd-text);
    border-color: var(--fd-border);
}
[data-theme="dark"] .fd-bil-export-form .fd-input::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(1.5);
}
.fd-bil-export-form .fd-main-button {
    grid-column: 1 / -1;
    justify-self: start;
    margin-top: 6px;
}
.fd-card-actions .fd-bil-export-form {
    display: grid;
    position: relative;
    top: 0;
    left: 0;
    margin-top: 10px;
}

.fd-pub-body {
    background: var(--fd-body-bg);
    color: var(--fd-text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 0;
}
.fd-pub-wrap {
    max-width: 860px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}
.fd-pub-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
    background: var(--fd-card-bg);
    border: 1px solid var(--fd-border-light);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}
.fd-pub-header-left {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.fd-pub-logo {
    max-height: 56px;
    max-width: 120px;
    object-fit: contain;
}
.fd-pub-company {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--fd-primary);
}
.fd-pub-company-info {
    font-size: .82rem;
    color: var(--fd-text-muted);
    line-height: 1.6;
    margin-top: 4px;
}
.fd-pub-header-right {
    text-align: right;
}
.fd-pub-doctype {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--fd-primary);
    letter-spacing: .04em;
}
.fd-pub-num {
    font-weight: 700;
    margin-top: 2px;
}
.fd-pub-date {
    font-size: .85rem;
    color: var(--fd-text-muted);
    margin-top: 2px;
}
.fd-pub-card {
    background: var(--fd-card-bg);
    border: 1px solid var(--fd-border-light);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}
.fd-pub-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--fd-primary);
    margin: 0 0 10px;
}
.fd-pub-client-name {
    font-weight: 700;
    font-size: 1.05rem;
}
.fd-pub-client {
    line-height: 1.6;
}
.fd-pub-objet {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--fd-border-light);
}
.fd-pub-num-col {
    text-align: right;
    white-space: nowrap;
}
.fd-pub-notes {
    font-size: .92rem;
    line-height: 1.6;
    color: var(--fd-text);
}
.fd-pub-mention {
    font-size: .85rem;
    line-height: 1.6;
    color: var(--fd-text-muted);
    border-left: 3px solid var(--fd-primary-light);
    padding: 8px 12px;
    margin-top: 10px;
    background: rgba(242, 107, 33, .06);
    border-radius: 0 6px 6px 0;
}
.fd-pub-mention:empty {
    display: none;
}
.fd-pub-banner {
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: .95rem;
    background: #fff8e1;
    color: #7a5800;
    border: 1px solid #f0d68a;
}
.fd-pub-banner-ok {
    background: #e6f6ea;
    color: #1e7c3d;
    border-color: #a9d9ba;
}
.fd-pub-banner-error {
    background: #fdecea;
    color: #c62828;
    border-color: #f0aaa6;
}
[data-theme="dark"] .fd-pub-banner       { background: #3a200a; color: #f0a05a; border-color: #6a4520; }
[data-theme="dark"] .fd-pub-banner-ok    { background: #0d2a18; color: #4fc87a; border-color: #245b38; }
[data-theme="dark"] .fd-pub-banner-error { background: #350d0d; color: #e57373; border-color: #6b2626; }

.fd-pub-accept {
    border-color: var(--fd-primary-light);
    border-width: 2px;
}
.fd-pub-sig-wrap {
    position: relative;
    margin-top: 6px;
}
.fd-pub-canvas {
    width: 100%;
    height: 200px;
    background: #fff;
    border: 2px dashed var(--fd-border);
    border-radius: 10px;
    touch-action: none;
    cursor: crosshair;
    display: block;
}
.fd-pub-sig-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #5f747e;
    font-size: 1rem;
    pointer-events: none;
}
.fd-pub-sig-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}
.fd-pub-submit {
    margin-top: 18px;
}
.fd-pub-sig-img {
    max-width: 320px;
    max-height: 140px;
    background: #fff;
    border: 1px solid var(--fd-border-light);
    border-radius: 8px;
    padding: 6px;
}
.fd-pub-footer-mentions {
    font-size: .78rem;
    color: var(--fd-text-muted);
    line-height: 1.6;
    padding: 0 4px;
    margin-bottom: 12px;
}
.fd-pub-footer {
    text-align: center;
    font-size: .82rem;
    color: var(--fd-text-muted);
    margin-top: 24px;
}
.fd-pub-fieldset {
    border: 0;
    margin: 0;
    padding: 0;
    min-width: 0;
}
.fd-pub-fieldset:disabled .fd-pub-canvas {
    cursor: not-allowed;
    opacity: .6;
}
.fd-pub-apercu {
    background: #f6f2ed;
    color: #14213d;
    border-color: #e1d4c2;
}
[data-theme="dark"] .fd-pub-apercu { background: #0f1a33; color: #f38546; border-color: #1e2e54; }
.fd-pub-cgv {
    margin-top: 12px;
    font-size: .88rem;
}
.fd-pub-cgv-titre {
    font-size: .92rem;
    font-weight: 600;
    color: var(--fd-primary);
    margin: 0;
}
.fd-pub-cgv-texte {
    margin-top: 10px;
    line-height: 1.6;
    color: var(--fd-text-muted);
    max-height: 360px;
    overflow-y: auto;
}
@media print {
    .fd-pub-cgv-texte { max-height: none; overflow: visible; }
}
.fd-pub-lien-mort {
    margin-top: 48px;
    text-align: center;
}
.fd-pub-card textarea.fd-pub-motif {
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
    margin-top: 4px;
}
.fd-pub-refus-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.fd-pub-refus-lien {
    margin-top: 14px;
}
.fd-pub-empreinte {
    font-family: ui-monospace, Consolas, monospace;
    font-size: .78rem;
    overflow-wrap: anywhere;
}
.fd-pub-telechargement {
    text-align: center;
}
.fd-bil-confirmation-actions {
    margin-top: 8px;
}
.fd-bil-action-form .fd-bil-lien-envoi {
    margin-top: 0;
    font-size: .85rem;
}
.fd-bil-action-form .fd-label {
    margin: 0;
    white-space: nowrap;
}
.fd-card input.fd-bil-date-input {
    width: auto;
    padding: 6px 8px;
    margin-top: 0;
}
.fd-bil-conso-alerte {
    line-height: 1.6;
}
.fd-dash-reponse-rembourser {
    font-size: .8rem;
    font-weight: 600;
    color: #a55706;
}
[data-theme="dark"] .fd-dash-reponse-rembourser { color: #f0a05a; }
.fd-pub-conso-titre {
    font-size: .92rem;
    font-weight: 600;
    color: var(--fd-primary);
    margin: 16px 0 4px;
}
.fd-pub-conso-texte {
    font-size: .88rem;
    line-height: 1.6;
    color: var(--fd-text);
    margin: 0 0 6px;
}
.fd-pub-formulaire {
    margin-top: 18px;
    padding: 4px 14px 10px;
    border: 1px dashed var(--fd-border);
    border-radius: 8px;
}
.fd-pub-questions {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--fd-border-light);
}
.fd-pub-question {
    border: 0;
    margin: 0 0 10px;
    padding: 0;
    min-width: 0;
}
.fd-pub-question .fd-checkbox-label {
    display: inline-flex;
    margin-right: 18px;
}
@media (max-width: 600px) {
    .fd-pub-header { flex-direction: column; }
    .fd-pub-header-right { text-align: left; }
    .fd-pub-canvas { height: 170px; }
}

.fd-cat-layout {
    display: grid;
    grid-template-columns: 236px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}
@media (max-width: 900px) {
    .fd-cat-layout { grid-template-columns: 1fr; }
}
.fd-cat-main {
    min-width: 0;
}
.fd-cat-card {
    position: relative;
}

.fd-cat-tree,
.fd-cat-children {
    list-style: none;
    margin: 0;
    padding: 0;
}
.fd-cat-children {
    margin-left: 14px;
    border-left: 1px solid var(--fd-border-light);
    padding-left: 4px;
}
.fd-cat-node {
    margin: 1px 0;
}
.fd-cat-row {
    display: flex;
    align-items: center;
    gap: 1px;
    border-radius: 4px;
}
.fd-cat-row:hover {
    background: var(--fd-border-light);
}
.fd-cat-row-active {
    background: rgba(20, 33, 61, .13);
    border-radius: 2px;
}
[data-theme="dark"] .fd-cat-row-active {
    background: rgba(140, 200, 230, .16);
}
.fd-cat-row-active .fd-cat-name,
.fd-cat-row-active .fd-cat-menu-btn {
    color: var(--fd-text);
}
.fd-cat-link {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 3px 2px;
    text-decoration: none;
    color: var(--fd-text);
    font-size: .92rem;
    min-width: 0;
}
.fd-cat-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fd-cat-count {
    flex-shrink: 0;
    /* background: var(--fd-border-light); */
    color: var(--fd-text);
    border-radius: 10px;
    padding: 1px 8px;
    font-size: .75rem;
    font-weight: 600;
}

.fd-cat-menu {
    position: relative;
    flex-shrink: 0;
}
.fd-cat-menu > summary {
    list-style: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    color: var(--fd-text-muted);
    font-size: 1rem;
    line-height: 1;
}
.fd-cat-menu > summary::-webkit-details-marker {
    display: none;
}
.fd-cat-menu > summary:hover {
    background: rgba(0, 0, 0, .08);
}
.fd-cat-menu-panel {
    position: absolute;
    z-index: 60;
    right: 0;
    top: calc(100% + 4px);
    width: 240px;
    background: var(--fd-card-bg);
    border: 1px solid var(--fd-border);
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
    padding: 10px;
}
.fd-cat-menu-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 6px 0;
}
.fd-cat-menu-form + .fd-cat-menu-form {
    border-top: 1px solid var(--fd-border-light);
}
.fd-cat-menu-form .fd-input {
    font-size: .85rem;
    padding: 6px 8px;
}

.fd-cat-add {
    margin-top: 12px;
    border-top: 1px solid var(--fd-border-light);
    padding-top: 12px;
}
.fd-cat-add > summary {
    list-style: none;
    cursor: pointer;
    display: block;
    text-align: center;
}
.fd-cat-add > summary::-webkit-details-marker {
    display: none;
}
.fd-cat-add-form {
    margin-top: 12px;
}
.fd-cat-search {
    margin-bottom: 12px;
    width: 100%;
}

.fd-bil-autocomplete-label {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.fd-bil-autocomplete-cat {
    font-size: .74rem;
    color: var(--fd-text-muted);
}

.fd-row-ref-des {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 12px;
}
@media (max-width: 600px) {
    .fd-row-ref-des { grid-template-columns: 1fr; }
}
.fd-item-ref {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .84rem;
    white-space: nowrap;
}
.fd-item-margin {
    white-space: nowrap;
    font-weight: 600;
}
.fd-item-margin-live {
    margin-top: 6px;
    font-size: .88rem;
    font-weight: 600;
    color: #1e7c3d;
    min-height: 1.2em;
}
.fd-item-margin-live.fd-item-margin-negative {
    color: #c62828;
}
[data-theme="dark"] .fd-item-margin-live { color: #4fc87a; }
[data-theme="dark"] .fd-item-margin-live.fd-item-margin-negative { color: #e57373; }

.fd-bil-line-ref {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .78rem;
    color: var(--fd-text-muted);
    margin-left: 6px;
    white-space: nowrap;
}
.fd-bil-reference {
    max-width: 130px;
    margin-bottom: 3px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .8rem;
}

.fd-bil-marge {
    border: 1px dashed var(--fd-border);
    border-radius: 6px;
    margin-top: 4px;
    color: #1e7c3d;
    font-weight: 600;
}
[data-theme="dark"] .fd-bil-marge { color: #4fc87a; }
.fd-bil-marge-note {
    display: block;
    color: var(--fd-text-muted);
    font-size: .78rem;
    font-weight: 400;
}

.fd-import-table th {
    vertical-align: top;
    min-width: 150px;
}
.fd-import-head {
    font-size: .82rem;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fd-import-select {
    font-size: .84rem;
    padding: 5px 6px;
}
.fd-import-coef {
    max-width: 140px;
}
.fd-import-sample {
    background: var(--fd-body-bg);
    border: 1px solid var(--fd-border-light);
    border-radius: 8px;
    padding: 12px;
    font-size: .78rem;
    line-height: 1.7;
    overflow-x: auto;
    white-space: pre;
    margin: 0;
}
.fd-import-tpl-formats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin: 4px 0 2px;
}

.fd-ie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 10px;
    margin-bottom: 34px;
    font-size: 14px;
}
.fd-ie-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.fd-ie-card h4 { margin: 0; }
.fd-ie-card p  { margin: 0; }
.fd-ie-card .fd-card-actions { margin-top: auto; }
.fd-ie-card .fd-export-form  { margin-top: auto; padding-top: 4px; }

.fd-sidebar-toggle {
    position: fixed;
    top: 51px;
    left: 211px;
    z-index: 45;
    width: 15px;
    height: 30px;
    margin-left: -11px;
    padding:  0;
    border: none;
    border-radius: 0px 6px 6px 0px;
    background: #fbe3d5;
    color: rgba(255, 255, 255, .75);
    cursor: pointer;
    font-size: .6rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 1px 1px 3px rgb(105 105 105 / 44%);
    transition: background .18s ease;
}
.fd-sidebar-toggle:hover {
    background: var(--fd-sidebar-bg);
    color: #fff;
}

body.fd-sidebar-collapsed .fd-leftbar {
    display: none;
}
body.fd-sidebar-collapsed .fd-sidebar-toggle {
    left: 0;
    margin-left: 0;
}

@media (max-width: 900px) {
    .fd-sidebar-toggle { display: none; }
    body.fd-sidebar-collapsed .fd-leftbar { display: flex; }
}

.fd-cat-layout {
    position: relative;
}
.fd-cat-side-toggle {
    position: sticky;
    top: calc(16px + 12px);
    grid-area: 1 / 1;
    justify-self: end;
    align-self: start;
    z-index: 5;
    width: 15px;
    height: 30px;
    margin-top: 12px;
    margin-right: -15px;
    padding: 0;
    border: none;
    border-radius: 0px 6px 6px 0px;
    background: #fbe3d5;
    color: rgba(255, 255, 255, .75);
    cursor: pointer;
    font-size: .6rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    /* box-shadow: 1px 1px 3px rgb(105 105 105 / 44%); */
    transition: background .18s ease;
}
.fd-cat-side-toggle:hover {
    background: var(--fd-sidebar-bg);
    color: #fff;
}

[data-theme="dark"] .fd-sidebar-toggle,
[data-theme="dark"] .fd-cat-side-toggle {
    background: #26345a;
    color: rgba(255, 255, 255, .55);
    box-shadow: 1px 1px 3px rgba(0, 0, 0, .5);
}
[data-theme="dark"] .fd-sidebar-toggle:hover,
[data-theme="dark"] .fd-cat-side-toggle:hover {
    background: var(--fd-primary-solid-hover);
    color: #fff;
}

.fd-cat-layout.fd-cat-side-collapsed {
    grid-template-columns: 26px minmax(0, 1fr);
}
.fd-cat-layout.fd-cat-side-collapsed .fd-cat-side {
    display: none;
}
.fd-cat-layout.fd-cat-side-collapsed .fd-cat-main {
    grid-column: 2;
}
.fd-cat-layout.fd-cat-side-collapsed .fd-cat-side-toggle {
    justify-self: start;
    margin-right: 0;
}

.fd-cat-side {
    display: flex;
    grid-area: 1 / 1;
    flex-direction: column;
    gap: 5px;
    position: sticky;
    top: 16px;
    border-radius: 2px;
    padding: 0 6px 12px;
    background: var(--fd-card-bg);
}
@media (max-width: 900px) {
    .fd-cat-side { position: static; }
    .fd-cat-side-toggle { display: none; }
    .fd-cat-layout.fd-cat-side-collapsed { grid-template-columns: 1fr; }
    .fd-cat-layout.fd-cat-side-collapsed .fd-cat-side { display: flex; }
    .fd-cat-layout.fd-cat-side-collapsed .fd-cat-main { grid-column: 1; }
}

[data-panel="marques"] .fd-cat-link,
[data-panel="fournisseurs"] .fd-cat-link {
    padding-top: 3px;
    padding-bottom: 3px;
}

.fd-cat-main .fd-table-wrap.fd-glissable {
    cursor: grab;
}
.fd-cat-main .fd-table-wrap.fd-glisse {
    cursor: grabbing;
    user-select: none;
}
.fd-cat-card {
    margin-bottom: 0;
}
.fd-cat-new-item {
    width: 100%;
    justify-content: center;
}

.fd-panel-head {
    display: flex;
    align-items: center;
    padding: 0 10px;
    justify-content: space-between;
    gap: 8px;
}
.fd-panel-head .fd-card-section-title {
    margin-bottom: 0;
}
.fd-panel-toggle {
    background: none;
    border: 1px solid var(--fd-border-light);
    border-radius: 6px;
    color: var(--fd-text-muted);
    cursor: pointer;
    font-size: .65rem;
    line-height: 1;
    padding: 5px 7px;
    flex-shrink: 0;
}
.fd-panel-toggle:hover {
    background: var(--fd-border-light);
    color: var(--fd-text);
}
.fd-panel-body {
    margin-top: 10px;
}
.fd-panel-collapsed .fd-panel-body {
    display: none;
}

.fd-supplier-contact {
    font-size: .76rem;
    color: var(--fd-text-muted);
    padding: 0 10px 4px 10px;
    margin-top: -2px;
}

.fd-row-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
@media (max-width: 760px) {
    .fd-row-3 { grid-template-columns: 1fr; }
}

.fd-resizable th {
    position: relative;
}
.fd-col-resizer {
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 100%;
    cursor: col-resize;
    user-select: none;
    touch-action: none;
}
.fd-col-resizer::after {
    content: "";
    position: absolute;
    top: 20%;
    right: 3px;
    width: 2px;
    height: 60%;
    background: var(--fd-border);
    border-radius: 1px;
    opacity: 0;
    transition: opacity .15s ease;
}
.fd-resizable th:hover .fd-col-resizer::after,
body.fd-col-resizing .fd-col-resizer::after {
    opacity: 1;
}
body.fd-col-resizing {
    cursor: col-resize;
    user-select: none;
}
.fd-resizable td {
    overflow: hidden;
    text-overflow: ellipsis;
}
.fd-resize-hint {
    margin-top: 8px;
}

.fd-col-movable {
    cursor: move;
}
.fd-col-dragging {
    opacity: .45;
}
.fd-col-drop-target {
    box-shadow: inset 3px 0 0 0 #14213d;
}
[data-theme="dark"] .fd-col-drop-target {
    box-shadow: inset 3px 0 0 0 #f6a06e;
}

.fd-bil-col-ref {
    width: 140px;
}
.fd-bil-col-ref .fd-bil-reference {
    max-width: 100%;
    margin-bottom: 0;
}
.fd-bil-lines-table {
    min-width: 880px;
}

.fd-bil-lines-table .fd-bil-input,
.fd-bil-lines-table input.fd-bil-input,
.fd-bil-lines-table select.fd-bil-input,
.fd-bil-lines-table textarea.fd-bil-input {
    padding: 5px 7px !important;
    margin-top: 0 !important;
    font-size: .86rem !important;
    line-height: 1.3 !important;
    text-align: left !important;
    height: auto !important;
    min-height: 0 !important;
}
.fd-bil-lines-table td {
    padding: 6px 5px !important;
    vertical-align: top;
}
.fd-bil-lines-table th {
    padding: 8px 5px !important;
    font-size: .8rem;
    line-height: 1.25;
    vertical-align: bottom;
}
.fd-bil-lines-table .fd-accordion-note {
    display: block;
    font-size: .72rem;
    font-weight: 400;
}
.fd-bil-lines-table .fd-bil-description {
    margin-top: 4px !important;
    min-height: 30px !important;
    resize: vertical;
    font-family: inherit !important;
    font-size: .78rem !important;
    overflow: hidden;
}
.fd-bil-lines-table .fd-bil-num {
    text-align: right !important;
}
.fd-bil-lines-table .fd-bil-titre-input {
    font-weight: 700 !important;
    font-size: .95rem !important;
}
.fd-bil-lines-table .fd-bil-comment-input {
    font-style: italic;
    min-height: 34px !important;
}

.fd-card .fd-bil-move-btn,
.fd-card .fd-bil-del-btn {
    display: block !important;
    width: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    padding: 2px 0 !important;
    margin: 0 0 2px !important;
    background: transparent !important;
    border: 1px solid var(--fd-border-light) !important;
    border-radius: 4px !important;
    color: var(--fd-text-muted) !important;
    font-size: .62rem !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
    text-align: center !important;
    box-shadow: none !important;
}
.fd-card .fd-bil-del-btn {
    font-size: .9rem !important;
    color: #c62828 !important;
    margin-top: 4px !important;
}
[data-theme="dark"] .fd-card .fd-bil-del-btn {
    color: #f28b82 !important;
}
.fd-card .fd-bil-move-btn:hover,
.fd-card .fd-bil-del-btn:hover {
    background: var(--fd-border-light) !important;
}
.fd-bil-col-move {
    width: 32px !important;
    padding-right: 0 !important;
}

.fd-bil-col-ref    { width: 120px; }
.fd-bil-col-des    { min-width: 210px; }
.fd-bil-col-qty    { width: 62px; }
.fd-bil-col-unite  { width: 72px; }
.fd-bil-col-prix   { width: 88px; }
.fd-bil-col-tva    { width: 84px; }
.fd-bil-col-remise { width: 66px; }
.fd-bil-col-total  { width: 96px; }
.fd-bil-col-del    { width: 30px; }

.fd-card .fd-panel-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 26px !important;
    height: 26px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: 1px solid var(--fd-border-light) !important;
    border-radius: 6px !important;
    color: var(--fd-text-muted) !important;
    font-size: .6rem !important;
    font-weight: 400 !important;
    box-shadow: none !important;
    flex-shrink: 0;
}
.fd-card .fd-panel-toggle:hover {
    background: var(--fd-border-light) !important;
    color: var(--fd-text) !important;
}
.fd-panel-head {
    margin-bottom: 6px;
}
.fd-panel-collapsed {
    padding: 4px 4px 4px 8px;
}

.fd-cat-menu-panel .fd-button {
    display: block;
    text-align: center;
    margin: 0;
}

.fd-cat-add {
    margin-top: 10px;
    padding-top: 10px;
}
.fd-cat-add-btn {
    display: block;
    padding: 7px 12px;
    font-size: .88rem;
    font-weight: 500;
    text-align: center;
    background: transparent;
    border: 1px dashed var(--fd-border);
    color: var(--fd-text-muted);
    border-radius: 8px;
}
.fd-cat-add-btn:hover {
    background: var(--fd-border-light);
    color: var(--fd-text);
    border-style: solid;
}
.fd-cat-add[open] > .fd-cat-add-btn {
    background: var(--fd-border-light);
    color: var(--fd-text);
    border-style: solid;
}

.fd-panel-head .fd-card-section-title {
    margin: 0 !important;
    padding: 2px 0 0 2px!important;
    line-height: 1.3;
}
.fd-cat-new-item {
    width: 70%;
    box-sizing: border-box;
    margin: auto;
}

.fd-cat-card.fd-panel-raised {
    z-index: 80;
}

.fd-cat-menu-panel {
    max-height: min(70vh, 420px);
    overflow-y: auto;
    padding: 8px 10px;
}
.fd-cat-menu-form {
    gap: 4px;
    padding: 5px 0;
}
.fd-cat-menu-panel .fd-input,
.fd-cat-menu-panel input.fd-input,
.fd-cat-menu-panel select.fd-input {
    padding: 6px 8px !important;
    margin-top: 0 !important;
    font-size: .84rem !important;
    text-align: left !important;
}
.fd-card .fd-cat-menu-panel button {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 5px 10px !important;
    font-size: .82rem !important;
}
.fd-cat-menu-panel .fd-button {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 5px 10px;
    font-size: .82rem;
    text-align: center;
}

.fd-card .fd-cat-caret {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 24px !important;
    height: 24px !important;
    padding: 0 !important;
    margin: 0 0 0 2px !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 4px !important;
    color: var(--fd-text-muted) !important;
    font-size: 20px;
    line-height: 1 !important;
    box-shadow: none !important;
    flex-shrink: 0;
    transition: transform .15s ease;
}
.fd-card .fd-cat-caret:hover {
    background: rgba(0, 0, 0, .08) !important;
    color: var(--fd-text) !important;
}
.fd-cat-row-active .fd-cat-caret {
    color: rgba(255, 255, 255, .85) !important;
}
.fd-cat-row-active .fd-cat-caret:hover {
    background: rgba(255, 255, 255, .18) !important;
    color: #fff !important;
}
.fd-cat-node-collapsed > .fd-cat-row .fd-cat-caret {
    transform: rotate(-90deg);
}
.fd-cat-node-collapsed > .fd-cat-children {
    display: none;
}
.fd-cat-caret-spacer {
    display: inline-block;
    width: 18px;
    margin-left: 2px;
    flex-shrink: 0;
}
.fd-cat-link {
    padding-left: 6px;
}

.fd-card input[type="checkbox"].fd-sel-check {
    width: 24px !important;
    height: 24px !important;
    margin: 0 0 0 8px !important;
    padding: 0 !important;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--fd-primary);
}
.fd-cat-row-active input[type="checkbox"].fd-sel-check {
    accent-color: #fff;
}

.fd-sel-bar {
    margin-top: 10px;
    padding: 10px 10px 10px 12px;
    border: 1px solid var(--fd-primary-light);
    border-left: 3px solid var(--fd-primary);
    border-radius: 8px;
    background: rgba(242, 107, 33, .12);
}
[data-theme="dark"] .fd-sel-bar {
    background: rgba(246, 160, 110, .16);
}
.fd-sel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}
.fd-sel-count {
    font-size: .82rem;
    font-weight: 700;
    color: var(--fd-primary);
}
.fd-card button.fd-sel-clear {
    background: none !important;
    border: 0 !important;
    padding: 2px 4px !important;
    margin: 0 !important;
    color: var(--fd-text-muted) !important;
    font-size: .76rem !important;
    font-weight: 400 !important;
    text-decoration: underline;
    box-shadow: none !important;
    cursor: pointer;
}
.fd-sel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.fd-card .fd-sel-actions button,
.fd-sel-actions .fd-button {
    margin: 0 !important;
    padding: 5px 10px !important;
    font-size: .8rem !important;
    background: var(--fd-card-bg) !important;
    border: 1px solid var(--fd-primary-light) !important;
    flex: 0 0 auto;
}
.fd-card .fd-sel-actions button:disabled {
    opacity: .4;
    cursor: not-allowed;
}
@media (max-width: 768px) {
    .fd-card .fd-sel-actions button,
    .fd-sel-actions .fd-button {
        min-height: 36px !important;
        padding: 7px 12px !important;
    }
    .fd-card button.fd-sel-clear {
        padding: 6px 8px !important;
        margin: -6px -8px -6px 0 !important;
    }
}
.fd-sel-actions .fd-sel-disabled {
    opacity: .4;
    cursor: not-allowed;
    pointer-events: none;
}
.fd-card .fd-sel-actions button.fd-sel-open-active {
    background: var(--fd-primary-solid) !important;
    border-color: var(--fd-primary-solid) !important;
    color: #fff !important;
}
.fd-sel-panel {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--fd-border-light);
}
.fd-sel-panel .fd-input {
    padding: 6px 8px !important;
    margin-top: 4px !important;
    font-size: .86rem !important;
    text-align: left !important;
}
.fd-sel-panel .fd-main-button {
    margin-top: 8px;
    width: 100%;
    justify-content: center;
}

.fd-col-check {
    width: 34px;
    text-align: center;
    padding-left: 6px !important;
    padding-right: 0 !important;
}
.fd-card .fd-col-check input[type="checkbox"] {
    width: 24px !important;
    height: 24px !important;
    margin: 0 !important;
    padding: 0 !important;
    cursor: pointer;
    accent-color: var(--fd-primary);
}
@media (min-width: 901px) {
    .fd-card input[type="checkbox"].fd-sel-check,
    .fd-card .fd-col-check input[type="checkbox"] {
        width: 13px !important;
        height: 13px !important;
    }
}
.fd-sel-bar-wide {
    margin-bottom: 12px;
}
.fd-sel-bar-wide .fd-sel-head {
    margin-bottom: 6px;
}
.fd-item-row:has(.fd-sel-check:checked) {
    background: rgba(242, 107, 33, .09);
}

.fd-sel-warn {
    margin: 8px 0 0;
    font-size: .8rem;
    line-height: 1.5;
    color: #a3400f;
}
[data-theme="dark"] .fd-sel-warn {
    color: #f0a05a;
}

.fd-facturx-manques {
    margin: 10px 0 16px;
    padding-left: 22px;
}
.fd-facturx-manques li {
    margin-bottom: 7px;
    line-height: 1.55;
}

.fd-card input.fd-input-color {
    width: 74px !important;
    height: 42px !important;
    padding: 3px !important;
    cursor: pointer;
}

.fd-pdfprev {
    --fdp-accent: #14213d;
    --fdp-on-accent: #ffffff;
    --fdp-accent-texte: #14213d;
    --fdp-tint: #f6f3ee;
    --fdp-zebra: #f7f9fa;
    --fdp-font: Arial, Helvetica, sans-serif;
    --fdp-size: 10pt;
    --fdp-pad: 6px 8px;
    margin-top: 16px;
    padding: 16px;
    border: 1px solid #ccd6dd;
    border-radius: 8px;
    background: #ffffff;
    color: #111111;
    font-family: var(--fdp-font);
    font-size: var(--fdp-size);
    overflow-x: auto;
}

.fd-pdfprev-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    border-bottom: 2px solid var(--fdp-accent);
    padding-bottom: 8px;
    margin-bottom: 10px;
}
.fd-pdfprev-co {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--fdp-accent-texte);
}
.fd-pdfprev-meta {
    font-size: .8em;
    color: #555555;
    margin-top: 3px;
    line-height: 1.5;
}
.fd-pdfprev-title {
    font-size: 1.7em;
    font-weight: 700;
    color: var(--fdp-accent-texte);
    letter-spacing: .03em;
    text-align: right;
    line-height: 1.1;
}
.fd-pdfprev-ref {
    font-size: .9em;
    color: #444444;
    text-align: right;
    margin-top: 2px;
    font-weight: 600;
}

.fd-pdfprev-table {
    width: 100%;
    border-collapse: collapse;
}
.fd-pdfprev-table th {
    background: var(--fdp-accent);
    color: var(--fdp-on-accent);
    font-size: .85em;
    text-transform: uppercase;
    letter-spacing: .03em;
    padding: var(--fdp-pad);
    text-align: left;
}
.fd-pdfprev-table td {
    border-bottom: 1px solid #dddddd;
    padding: var(--fdp-pad);
    font-size: .95em;
    vertical-align: top;
}
.fd-pdfprev-num {
    text-align: right;
    white-space: nowrap;
}
.fd-pdfprev-desc {
    font-size: .85em;
    color: #555555;
    margin-top: 2px;
}
.fd-pdfprev-table tr.fd-pdfprev-sec td {
    background: var(--fdp-tint);
    font-weight: 700;
    color: var(--fdp-accent-texte);
    border-bottom: 1px solid #bbbbbb;
}

.fd-pdfprev-totals {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}
.fd-pdfprev-ttc {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    min-width: 48%;
    background: var(--fdp-accent);
    color: var(--fdp-on-accent);
    font-weight: 700;
    font-size: 1.1em;
    padding: 7px 10px;
}

.fd-pdfprev-sobre .fd-pdfprev-table th {
    background: #ffffff;
    color: #111111;
    border-bottom: 1.5px solid #111111;
}
.fd-pdfprev-sobre .fd-pdfprev-table tr.fd-pdfprev-sec td {
    background: #f0f0f0;
    color: #111111;
}
.fd-pdfprev-sobre .fd-pdfprev-ttc {
    background: #ffffff;
    color: #111111;
    border-top: 1.5px solid #111111;
    border-bottom: 1.5px solid #111111;
}

.fd-pdfprev-zebre .fd-pdfprev-table tbody tr:nth-child(even):not(.fd-pdfprev-sec) td {
    background: var(--fdp-zebra);
}
.fd-pdfprev-sobre.fd-pdfprev-zebre .fd-pdfprev-table tbody tr:nth-child(even):not(.fd-pdfprev-sec) td {
    background: #f6f6f6;
}

.fd-card label.fd-checkbox-label,
.fd-card label.fd-radio-label {
    display: flex;
}
.fd-card .fd-checkbox-label input[type="checkbox"],
.fd-card .fd-radio-label input[type="radio"] {
    width: auto;
    flex: 0 0 auto;
    padding: 0;
    margin-top: 0;
}

.fd-card label.fd-check-line {
    display: flex !important;
    align-items: center;
    gap: 9px;
    margin: 12px 0 0 !important;
    padding: 0 !important;
    font-weight: 500 !important;
    font-size: .93rem;
    line-height: 1.45;
    cursor: pointer;
}
.fd-card label.fd-check-line input[type="checkbox"],
.fd-card label.fd-check-line input[type="radio"] {
    width: 16px !important;
    height: 16px !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--fd-primary);
}

main a:not([class]),
.fd-card a:not([class]),
.fd-table a:not([class]) {
    color: var(--fd-link-color);
}
.fd-alert a:not([class]),
.fd-breadcrumb a:not([class]) {
    color: #a4460f;
}
[data-theme="dark"] .fd-breadcrumb a:not([class]) {
    color: var(--fd-bc-link);
}

.fd-card button.fd-plaque-btn {
    display: inline-block !important;
    width: auto !important;
    margin: 0 !important;
    padding: 11px 18px !important;
    background: var(--fd-primary-solid) !important;
    color: #ffffff !important;
    border: 0 !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
    font-size: .95rem;
    cursor: pointer;
}
.fd-card button.fd-plaque-btn:hover {
    background: var(--fd-primary-solid-hover) !important;
    color: #ffffff !important;
}
.fd-card button.fd-plaque-btn:disabled {
    opacity: .6;
    cursor: progress;
}
.fd-plaque-aide {
    margin: 9px 0 0;
    font-size: .85rem;
    line-height: 1.5;
    color: var(--fd-text-muted);
}
.fd-plaque-apercu {
    display: block;
    width: 240px;
    height: auto;
    max-width: 100%;
    max-height: 150px;
    margin-top: 12px;
    border-radius: 4px;
    border: 1px solid var(--fd-border-light);
    object-fit: contain;
}
.fd-plaque-etat {
    margin: 10px 0 0;
    font-size: .88rem;
    min-height: 1.2em;
}
.fd-plaque-etat-travail { color: var(--fd-text-muted); }
.fd-plaque-etat-ok      { color: #1a7a40; font-weight: 600; }
.fd-plaque-etat-attention { color: #c0671a; }
.fd-plaque-etat-erreur  { color: #b0261c; }

.fd-plaque-liste {
    margin-top: 10px;
    border-top: 1px solid var(--fd-border-light);
}
.fd-card label.fd-plaque-ligne {
    display: flex !important;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 10px;
    margin: 0 !important;
    padding: 9px 2px !important;
    border-bottom: 1px solid var(--fd-border-light);
    font-weight: 400 !important;
    cursor: pointer;
}
.fd-card label.fd-plaque-ligne input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--fd-primary);
}
.fd-plaque-ligne-occupee {
    cursor: default;
}
.fd-plaque-champ {
    min-width: 145px;
    font-size: .85rem;
    color: var(--fd-text-muted);
}
.fd-plaque-valeur {
    font-weight: 700;
    word-break: break-word;
}
.fd-plaque-note {
    margin-left: auto;
    font-size: .78rem;
    color: #c0671a;
}
.fd-plaque-ligne-occupee .fd-plaque-note { color: var(--fd-text-muted); }

.fd-plaque-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.fd-card button.fd-plaque-appliquer,
.fd-card button.fd-plaque-annuler {
    display: inline-block !important;
    width: auto !important;
    margin: 0 !important;
    padding: 9px 15px !important;
    border: 0 !important;
    border-radius: 3px !important;
    font-weight: 600 !important;
    cursor: pointer;
}
.fd-card button.fd-plaque-appliquer {
    background: var(--fd-primary-solid) !important;
    color: #ffffff !important;
}
.fd-card button.fd-plaque-annuler {
    background: var(--fd-btn-bg) !important;
    color: var(--fd-btn-text) !important;
}
.fd-plaque-rien {
    margin: 10px 0 0;
    font-size: .88rem;
    line-height: 1.5;
    color: var(--fd-text-muted);
}
.fd-plaque-brut {
    margin-top: 12px;
    font-size: .82rem;
}
.fd-plaque-brut summary {
    cursor: pointer;
    color: var(--fd-text-muted);
}
.fd-plaque-brut pre {
    margin: 8px 0 0;
    padding: 9px;
    max-height: 190px;
    overflow: auto;
    background: var(--fd-body-bg);
    border-radius: 4px;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: .8rem;
    line-height: 1.45;
}

.fd-card input.fd-champ-scanne,
.fd-card select.fd-champ-scanne {
    background: #fff8e5;
    border-color: #e0b860;
}
[data-theme="dark"] .fd-card input.fd-champ-scanne,
[data-theme="dark"] .fd-card select.fd-champ-scanne {
    background: #2e2a1c;
    border-color: #6b5a2a;
}

.fd-fgas {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 8px;
    border-left: 4px solid var(--fd-border);
    background: var(--fd-body-bg);
}
.fd-fgas-tete {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 14px;
    margin-bottom: 8px;
}
.fd-fgas-titre {
    font-weight: 700;
    font-size: .95rem;
}
.fd-fgas-etat {
    margin-left: auto;
    font-size: .82rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--fd-border-light);
    color: var(--fd-text);
}
.fd-fgas-detail {
    margin: 0 0 6px;
    font-size: .88rem;
    line-height: 1.55;
    color: var(--fd-text);
}
.fd-fgas-detail:last-child { margin-bottom: 0; }
.fd-fgas-alerte {
    margin: 8px 0 0;
    padding: 8px 10px;
    border-radius: 6px;
    background: #fff3e0;
    color: #8a4b00;
    font-size: .85rem;
    line-height: 1.5;
}
[data-theme="dark"] .fd-fgas-alerte {
    background: #33240f;
    color: #f0b366;
}

.fd-fgas-en_retard      { border-left-color: #c0392b; }
.fd-fgas-en_retard .fd-fgas-etat      { background: #fdecea; color: #b0261c; }
.fd-fgas-bientot        { border-left-color: #e67e22; }
.fd-fgas-bientot .fd-fgas-etat        { background: #fef0e6; color: #a8560f; }
.fd-fgas-a_jour         { border-left-color: #1a7a40; }
.fd-fgas-a_jour .fd-fgas-etat         { background: #e6f4ea; color: #16683a; }
.fd-fgas-jamais_controle { border-left-color: #e67e22; }
.fd-fgas-jamais_controle .fd-fgas-etat { background: #fef0e6; color: #a8560f; }

[data-theme="dark"] .fd-fgas-en_retard .fd-fgas-etat       { background: #3a1a17; color: #ef9a93; }
[data-theme="dark"] .fd-fgas-bientot .fd-fgas-etat,
[data-theme="dark"] .fd-fgas-jamais_controle .fd-fgas-etat { background: #33240f; color: #f0b366; }
[data-theme="dark"] .fd-fgas-a_jour .fd-fgas-etat          { background: #14301f; color: #7fd4a0; }

.fd-fgas-pastille {
    display: inline-block;
    padding: 1px 9px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 500;
    white-space: nowrap;
}
.fd-fgas-pastille-en_retard       { background: #fdecea; color: #b0261c; }
.fd-fgas-pastille-jamais_controle { background: #fef0e6; color: #a8560f; }
.fd-fgas-pastille-bientot         { background: #fff8e5; color: #8a6100; }
[data-theme="dark"] .fd-fgas-pastille-en_retard       { background: #3a1a17; color: #ef9a93; }
[data-theme="dark"] .fd-fgas-pastille-jamais_controle { background: #33240f; color: #f0b366; }
[data-theme="dark"] .fd-fgas-pastille-bientot         { background: #2e2a1c; color: #e0c169; }

.fd-equip-summary .fd-fgas-pastille {
    white-space: normal;
    flex-shrink: 1;
    order: 3;
    margin-right: auto;
}

[data-theme="dark"] .fd-status-draft {
    background: rgba(239, 108, 0, .18) !important;
    color: #ff9237 !important;
}
[data-theme="dark"] .fd-status-completed {
    background: rgba(21, 101, 192, .18) !important;
    color: #f6a06e !important;
}
[data-theme="dark"] .fd-status-validated {
    background: rgba(46, 125, 50, .18) !important;
    color: #52bf57 !important;
}
[data-theme="dark"] .fd-status-archived {
    background: rgba(69, 90, 100, .18) !important;
    color: #93aab4 !important;
}
[data-theme="dark"] .fd-status-deleted {
    background: rgba(177, 86, 86, .18) !important;
    color: #d69c9c !important;
}
[data-theme="dark"] .fd-status-badge-draft {
    background: rgba(117, 113, 110, .18);
    color: #afacaa;
}
[data-theme="dark"] .fd-status-badge-completed {
    background: rgba(21, 101, 192, .18);
    color: #f6a06e;
}
[data-theme="dark"] .fd-status-badge-validated {
    background: rgba(46, 125, 50, .18);
    color: #52bf57;
}
[data-theme="dark"] .fd-status-badge-archived {
    background: rgba(69, 90, 100, .18);
    color: #93aab4;
}
[data-theme="dark"] .fd-status-badge-en-cours {
    background: rgba(230, 126, 34, .18);
    color: #eda15e;
}
[data-theme="dark"] .fd-status-badge-termine {
    background: rgba(41, 128, 185, .18);
    color: #f5955d;
}
[data-theme="dark"] .fd-status-badge-valide {
    background: rgba(39, 174, 96, .18);
    color: #2ecf72;
}
[data-theme="dark"] .fd-status-badge-archive {
    background: rgba(127, 140, 141, .18);
    color: #aab3b3;
}
[data-theme="dark"] .fd-status-badge-default {
    background: rgba(102, 102, 102, .18);
    color: #a8a8a8;
}
[data-theme="dark"] .fd-status-badge-signe {
    background: rgba(39, 174, 96, .18);
    color: #2ecf72;
}
[data-theme="dark"] .fd-badge-success {
    background: rgba(46, 125, 50, .18);
    color: #52bf57;
}
[data-theme="dark"] .fd-badge-warning {
    background: rgba(179, 38, 30, .18);
    color: #f2a0a0;
}
[data-theme="dark"] .fd-measure-range {
    color: #8fa8b5;
}
[data-theme="dark"] .fd-stepper {
    background: rgba(246, 160, 110, .18);
    color: #f6a779;
}
[data-theme="dark"] .fd-chart-toggle {
    background: rgba(255, 255, 255, .08);
    color: #f6a779;
}
[data-theme="dark"] .fd-chart-toggle:hover {
    background: rgba(255, 255, 255, .16);
}
[data-theme="dark"] .fd-period-pill {
    background: rgba(122, 159, 176, .18);
    color: #a7afc2;
}
[data-theme="dark"] .fd-period-pill.active,
[data-theme="dark"] .fd-period-pill:hover {
    background: var(--fd-primary);
    color: #0c1428;
}
[data-theme="dark"] .fd-device-row-revoked {
    background: #1d263b;
}
[data-theme="dark"] .fd-device-code-small code {
    background: rgba(246, 160, 110, .18);
    border-color: rgba(246, 160, 110, .38);
    color: #dfd1be;
}
[data-theme="dark"] .fd-role-super-admin {
    background: rgba(185, 28, 28, .18);
    color: #ec8282;
}
[data-theme="dark"] .fd-role-admin {
    background: rgba(21, 101, 192, .18);
    color: #f6a06e;
}
[data-theme="dark"] .fd-role-user {
    background: rgba(46, 125, 50, .18);
    color: #52bf57;
}
[data-theme="dark"] .fd-role-default {
    background: rgba(75, 85, 99, .18);
    color: #9da7b5;
}
[data-theme="dark"] .fd-device-status-pending {
    background: rgba(192, 103, 26, .18);
    color: #e89b58;
}
[data-theme="dark"] .fd-device-status-approved {
    background: rgba(26, 122, 64, .18);
    color: #29c165;
}
[data-theme="dark"] .fd-device-status-revoked {
    background: rgba(176, 38, 28, .18);
    color: #eb877f;
}
[data-theme="dark"] .fd-company-status-active {
    background: rgba(26, 122, 64, .18);
    color: #29c165;
}
[data-theme="dark"] .fd-company-status-inactive {
    background: rgba(176, 38, 28, .18);
    color: #eb877f;
}
[data-theme="dark"] .fd-company-status-archived {
    background: rgba(90, 112, 128, .18);
    color: #9badb9;
}
[data-theme="dark"] .fd-btn-dl {
    background: rgba(46, 125, 50, .18);
    color: #52bf57;
}
[data-theme="dark"] .fd-btn-regen {
    background: rgba(230, 81, 0, .18);
    color: #ff8848;
}
[data-theme="dark"] .fd-analyse-card-overdue-badge {
    background: rgba(198, 40, 40, .18);
    color: #e78787;
}
[data-theme="dark"] .fd-analyse-card-urgent-badge {
    background: rgba(230, 81, 0, .18);
    color: #ff8848;
}
[data-theme="dark"] .fd-analyse-card-ok-badge {
    background: rgba(46, 125, 50, .18);
    color: #52bf57;
}
[data-theme="dark"] .fd-quota-badge {
    background: rgba(0, 131, 143, .18);
    color: #c9520d;
    border-color: rgba(0, 131, 143, .38);
}
[data-theme="dark"] .fd-quota-badge.fd-quota-full {
    background: rgba(192, 57, 43, .18);
    color: #e48f86;
    border-color: rgba(192, 57, 43, .38);
}
[data-theme="dark"] .fd-report-number {
    background: rgba(246, 160, 110, .16);
}
[data-theme="dark"] .fd-analyse-interval {
    background: rgba(246, 160, 110, .16);
    color: #f49057;
}
[data-theme="dark"] .fd-btn-view {
    background: rgba(246, 160, 110, .16);
}
[data-theme="dark"] .fd-analyse-card-overdue {
    background: rgba(229, 57, 53, .06);
}
[data-theme="dark"] .fd-analyse-card-urgent {
    background: rgba(245, 124, 0, .06);
}
[data-theme="dark"] .fd-analyse-card-ok {
    background: rgba(67, 160, 71, .06);
}
[data-theme="dark"] .fd-btn-view:hover {
    background: rgba(246, 160, 110, .28);
}
[data-theme="dark"] .fd-btn-dl:hover {
    background: rgba(46, 125, 50, .28);
}
[data-theme="dark"] .fd-btn-regen:hover {
    background: rgba(230, 81, 0, .28);
}

[data-theme="dark"] .fd-cat-count {
    color: var(--fd-text);
}
[data-theme="dark"] .fd-fluide-filter-active {
    background: rgba(246, 160, 110, .16);
    border-color: rgba(246, 160, 110, .38);
}

[data-theme="dark"] .fd-fluide-td-recyclage {
    color: #bc8bd1;
}
[data-theme="dark"] .fd-cerfa-status-badge-en_cours {
    color: #e88934;
    border-color: #e8893455;
}
[data-theme="dark"] .fd-cerfa-status-badge-termine {
    color: #f38240;
    border-color: #59a7da55;
}
[data-theme="dark"] .fd-cerfa-status-badge-valide {
    color: #2aba67;
    border-color: #2aba6755;
}
[data-theme="dark"] .fd-cerfa-status-badge-archive {
    color: #97a2a3;
    border-color: #97a2a355;
}

[data-theme="dark"] .fd-sig-ok,
[data-theme="dark"] .fd-cerfa-view-success {
    color: #4fc87a;
}

.fd-filters-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0;
}
.fd-filters-row select,
.fd-filters-row input[type="search"],
.fd-filters-row input[type="text"] {
    width: auto;
    min-width: 170px;
    max-width: 100%;
    margin: 0;
}
.fd-filters-row input[type="search"] { min-width: 230px; flex: 1 1 230px; }
.fd-filters-row button,
.fd-filters-row .fd-button { margin: 0; flex-shrink: 0; }

@media (max-width: 640px) {
    .fd-filters-row select,
    .fd-filters-row input[type="search"],
    .fd-filters-row input[type="text"] { flex: 1 1 100%; min-width: 0; }
}

.fd-status-badge-expire {
    background: #fdecea;
    color: #a52218;
}
[data-theme="dark"] .fd-status-badge-expire {
    background: #3a1512;
    color: #f08a7e;
}

.fd-inscr-message {
    border-left: 4px solid var(--fd-border);
    font-weight: 500;
}
.fd-inscr-message-ok  { border-left-color: #2e7d32; }
.fd-inscr-message-err { border-left-color: #a52218; }

.fd-inscr-note {
    margin: -22px 0 26px;
    font-size: .84rem;
    color: var(--fd-text-muted);
    line-height: 1.6;
}

.fd-inscr-actions {
    display: inline-block;
    margin: 0 4px 0 0;
}
.fd-inscr-actions button { margin: 2px 0 !important; }

.fd-inscr-ligne-ko {
    background: #fdecea;
    color: #a52218;
    font-size: .85rem;
    line-height: 1.5;
}
[data-theme="dark"] .fd-inscr-ligne-ko {
    background: #3a1512;
    color: #f08a7e;
}

.fd-card-actions-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
    margin: 18px 20px 28px;
    padding-top: 0;
}

.fd-action-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    font-family: inherit;
    font-size: inherit;
    text-align: left;
    cursor: pointer;
    background: #fff;
    border: 1px solid var(--fd-border);
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    text-decoration: none;
    color: inherit;
    transition: transform .15s, box-shadow .15s;
}
.fd-action-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
.fd-action-card:focus-visible {
    outline: 2px solid var(--fd-primary);
    outline-offset: 2px;
}

.fd-action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--ico-bg);
    color: var(--ico-c);
}
.fd-action-icon-releve     { --ico-bg: #fff3e0; --ico-c: #e65100; }
.fd-action-icon-cerfa      { --ico-bg: #fbe3d5; --ico-c: #14213d; }
.fd-action-icon-assemblage { --ico-bg: #f3e5f5; --ico-c: #6a1b9a; }
.fd-action-icon-bon        { --ico-bg: #e8f5e9; --ico-c: #2e7d32; }

.fd-action-corps {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.fd-action-titre {
    font-size: .95rem;
    font-weight: 700;
    color: var(--fd-text);
    line-height: 1.3;
}
.fd-action-desc {
    font-size: .8rem;
    color: var(--fd-text-muted);
    line-height: 1.4;
}

[data-theme="dark"] .fd-action-card {
    background: #16213a;
    color: #eee7dc;
}
[data-theme="dark"] .fd-action-titre { color: #eee7dc; }
[data-theme="dark"] .fd-action-desc  { color: #a8b0c2; }
[data-theme="dark"] .fd-action-icon-releve     { --ico-bg: #3a200a; --ico-c: #f0a05a; }
[data-theme="dark"] .fd-action-icon-cerfa      { --ico-bg: #0f1a33; --ico-c: #f38546; }
[data-theme="dark"] .fd-action-icon-assemblage { --ico-bg: #2a1533; --ico-c: #c99ae0; }
[data-theme="dark"] .fd-action-icon-bon        { --ico-bg: #0d2a18; --ico-c: #4fc87a; }

@media (max-width: 700px) {
    .fd-card-actions-cards { margin-left: 8px; margin-right: 8px; }
}

.fd-bil-age-critique th[scope="row"],
.fd-bil-age-critique td {
    background: #fdecea;
    color: #a52218;
    font-weight: 600;
}
[data-theme="dark"] .fd-bil-age-critique th[scope="row"],
[data-theme="dark"] .fd-bil-age-critique td {
    background: #3a1512;
    color: #f08a7e;
}

.fd-bil-mois-courant th[scope="row"],
.fd-bil-mois-courant td {
    background: #fbe3d5;
    font-weight: 600;
}
[data-theme="dark"] .fd-bil-mois-courant th[scope="row"],
[data-theme="dark"] .fd-bil-mois-courant td {
    background: #0f1a33;
    color: #eee7dc;
}

.fd-bil-graphe {
    position: relative;
    height: 240px;
    margin: 4px 10px 18px;
}
.fd-bil-autres th[scope="row"],
.fd-bil-autres td {
    color: var(--fd-text-muted);
    font-style: italic;
}

.fd-cfgdash-intro {
    margin: 0 0 14px;
    color: var(--fd-text-muted);
    font-size: .9rem;
    line-height: 1.5;
}
.fd-cfgdash-liste {
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.fd-cfgdash-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--fd-border-light);
    border-radius: 6px;
    background: var(--fd-input-bg);
}
.fd-cfgdash-item-masque {
    /* PAS d'opacity ici. Elle s'applique à tout l'élément — le texte ET son
       fond se composent alors sur la page — et fait tomber le texte doux à
       2,17 pour 4,5 exigés en thème clair, 2,77 en sombre. Calculé : aucune
       valeur d'opacité sous 1 ne tient, même 0,80 plafonne à 3,33.
       L'état masqué se signale donc par le FOND et la BORDURE, qui ne portent
       aucun texte — et le tiret de la bordure reste lisible sans distinguer
       les couleurs. */
    background: var(--fd-card-bg);
    border-style: dashed;
}
.fd-cfgdash-rang {
    flex: 0 0 auto;
    min-width: 22px;
    text-align: center;
    font-size: .8rem;
    font-weight: 700;
    color: var(--fd-text-muted);
}
.fd-cfgdash-texte {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.fd-cfgdash-nom {
    font-weight: 600;
    color: var(--fd-text);
}
.fd-cfgdash-note {
    font-size: .8rem;
    line-height: 1.4;
    color: var(--fd-text-muted);
}
.fd-cfgdash-boutons {
    flex: 0 0 auto;
    display: flex;
    gap: 4px;
}
.fd-card .fd-cfgdash-fleche {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid var(--fd-border) !important;
    border-radius: 6px !important;
    font-size: .7rem;
    line-height: 1;
    color: var(--fd-text) !important;
    background: var(--fd-card-bg) !important;
    cursor: pointer;
}
.fd-card .fd-cfgdash-fleche:hover:not(:disabled) {
    border-color: var(--fd-primary-light) !important;
    background: var(--fd-btn-bg) !important;
}
.fd-card .fd-cfgdash-fleche:disabled {
    opacity: .35;
    cursor: default;
}
.fd-cfgdash-bascule {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: .85rem;
    color: var(--fd-text);
}
.fd-cfgdash-bascule input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
    accent-color: var(--fd-primary);
    cursor: pointer;
}
.fd-cfgdash-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 0;
}
.fd-cfgdash-reset-form {
    margin: 10px 0 0;
}
.fd-card .fd-cfgdash-reset,
.fd-cfgdash-reset {
    padding: 8px 14px;
    border: 1px solid var(--fd-border);
    border-radius: 6px;
    font-size: .85rem;
    color: var(--fd-text-muted);
    background: none;
    cursor: pointer;
}
.fd-cfgdash-reset:hover {
    border-color: #c0392b;
    color: #c0392b;
}
@media (max-width: 640px) {
    .fd-cfgdash-item {
        flex-wrap: wrap;
    }
    .fd-cfgdash-texte {
        flex: 1 1 100%;
        order: 1;
    }
    .fd-cfgdash-rang {
        order: 0;
    }
    .fd-cfgdash-boutons {
        order: 2;
        margin-left: auto;
    }
    .fd-cfgdash-bascule {
        order: 3;
    }
}

.fd-dash-config-link {
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 7px;
    border: 1px solid var(--fd-border);
    border-radius: 6px;
    font-size: .85rem;
    color: var(--fd-text-muted);
    text-decoration: none;
    transition: border-color .2s, color .2s;
}
.fd-dash-config-link:hover,
.fd-dash-config-link:focus-visible {
    border-color: var(--fd-primary-light);
    color: var(--fd-primary);
}
.fd-dash-config-texte {
    display: inline-block;
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    opacity: 0;
    transition: max-width .25s ease, opacity .2s ease, margin-left .25s ease;
}
.fd-dash-config-link:hover .fd-dash-config-texte,
.fd-dash-config-link:focus-visible .fd-dash-config-texte {
    max-width: 120px;
    margin-left: 6px;
    opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
    .fd-dash-config-link,
    .fd-dash-config-texte {
        transition: none;
    }
}

.fd-agency-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 20px;
    background: #fff3cd;
    color: #6b4e00;
    border-bottom: 1px solid #e0b400;
    border-left: 5px solid #b35c00;
    font-size: .88rem;
    font-weight: 600;
    line-height: 1.35;
}
.fd-agency-banner strong { font-weight: 800; }
.fd-agency-banner-etiquette {
    flex-shrink: 0;
    padding: 2px 8px;
    border-radius: 4px;
    background: #b35c00;
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
@media (max-width: 600px) {
    .fd-agency-banner { padding: 8px 14px; font-size: .8rem; }
}
.fd-body-intervention .fd-sidebar-toggle { top: 124px; }

.fd-action-card-inactive {
    cursor: default;
    background: #f1f4f6;
    border-style: dashed;
    position: relative;
}
.fd-action-card-inactive:hover {
    transform: none;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.fd-action-card-inactive .fd-action-titre { color: #44565f; }
.fd-action-card-inactive .fd-action-desc  { color: #5a7080; }
.fd-action-card-inactive .fd-action-icon  { filter: grayscale(1); }
.fd-action-aide-zone {
    position: relative;
    flex-shrink: 0;
    margin-left: auto;
    display: flex;
    align-items: center;
}
.fd-action-aide {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #5a7080;
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    cursor: help;
}
.fd-action-aide:focus-visible {
    outline: 2px solid var(--fd-primary);
    outline-offset: 2px;
}
.fd-action-aide-bulle {
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    z-index: 60;
    width: 250px;
    padding: 9px 11px;
    border-radius: 8px;
    background: #10182b;
    color: #f9f6f2;
    font-size: .78rem;
    font-weight: 500;
    line-height: 1.4;
    box-shadow: 0 4px 14px rgba(0,0,0,.28);
    opacity: 0;
    visibility: hidden;
}
.fd-action-aide:hover + .fd-action-aide-bulle,
.fd-action-aide:focus + .fd-action-aide-bulle {
    opacity: 1;
    visibility: visible;
}
[data-theme="dark"] .fd-action-card-inactive { background: #121a2e; }
[data-theme="dark"] .fd-action-card-inactive .fd-action-titre { color: #a3abbf; }
[data-theme="dark"] .fd-action-card-inactive .fd-action-desc  { color: #828da8; }
[data-theme="dark"] .fd-action-aide { background: #828da8; color: #121a2e; }
@media (max-width: 600px) {
    .fd-action-aide-bulle { width: 200px; }
}

.fd-card-actions-cards {
    align-items: stretch;
}

.fd-accordion-summary-com .fd-sum-vide {
    font-size: .75rem;
    line-height: .97rem;
    font-style: italic;
    color: #5f7280;
    opacity: 1;
}
[data-theme="dark"] .fd-accordion-summary-com .fd-sum-vide {
    color: #8fa6b4;
}

.fd-fgas-pastille-a_jour { background: #e6f6ea; color: #1e7c3d; }
[data-theme="dark"] .fd-fgas-pastille-a_jour { background: #16301f; color: #6fcf8d; }

.fd-tree-group-content > .fd-tree-equipment {
    break-inside: avoid;
    margin-top: 0;
    margin-bottom: 6px;
}

.fd-outil-detail {
    margin: 0 0 2px;
}
.fd-outil-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 8px;
    border: 0;
    border-radius: 999px;
    background: none;
    font-size: .75rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--fd-primary);
    cursor: pointer;
    list-style: none;
    white-space: nowrap;
    transition: background .15s, color .15s;
}
.fd-outil-action::-webkit-details-marker {
    display: none;
}
.fd-outil-action::marker {
    content: "";
}
.fd-outil-action::before {
    content: "";
    width: 0;
    height: 0;
    border-left: 5px solid currentColor;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    transition: transform .15s;
}
.fd-outil-action:hover {
    background: var(--fd-btn-bg);
    color: var(--fd-btn-text);
}
.fd-outil-action:focus-visible {
    outline: 2px solid var(--fd-primary);
    outline-offset: 2px;
}
.fd-outil-detail[open] > .fd-outil-action {
    background: var(--fd-btn-bg);
    color: var(--fd-btn-text);
}
.fd-outil-detail[open] > .fd-outil-action::before {
    transform: rotate(90deg);
}

.fd-outil-liste > .fd-tree-site {
    margin-bottom: 8px;
}

.fd-report-flat {
    margin-left: 0;
    margin-right: 0;
}

.fd-leftbar-inner {
    display: flex;
    flex-direction: column;
    gap: inherit;
    min-height: 0;
}

.fd-nav-logout {
    text-align: center;
    justify-content: center;
}

.fd-content > .fd-footer {
    margin-top: auto;
    padding-top: 80px;
}

@media (max-width: 900px) {
    .fd-leftbar-inner {
        flex: 1 1 auto;
    }
}

@media (min-width: 901px) {
    .fd-header {
        position: sticky;
        top: 0;
        z-index: 900;
    }
    .fd-leftbar {
        align-self: stretch;
        padding: 0 5px;
    }
    .fd-leftbar-inner {
        position: sticky;
        top: 64px;
        gap: 10px;
        box-sizing: border-box;
        padding: 20px 0;
        height: calc(100vh - 64px);
    }
    .fd-sidebar {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
    }
}

@media (max-width: 900px) {
    .fd-equipment-gallery .fd-gallery-empty:not([data-gallery-error]) {
        display: none;
    }
}

.fd-form-site {
    margin: 0 0 2px;
    font-size: 1.05rem;
    font-weight: 700;
}

.fd-form-site-adresse {
    margin: 0 0 18px;
    font-size: .82rem;
    line-height: 1.45;
    color: var(--fd-text-muted);
}

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

.fd-quota-lead {
    margin: 0;
    font-size: .92rem;
    line-height: 1.55;
}

.fd-quota-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fd-quota-titre {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.fd-quota-chiffre {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--fd-primary);
}

.fd-quota-sur {
    font-size: .85rem;
    font-weight: 500;
    color: var(--fd-text-muted);
}

progress.fd-quota-jauge {
    -webkit-appearance: none;
    appearance: none;
    display: block;
    width: 100%;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: var(--fd-border-light);
    color: var(--fd-primary);
}

progress.fd-quota-jauge::-webkit-progress-bar {
    border-radius: 999px;
    background: var(--fd-border-light);
}

progress.fd-quota-jauge::-webkit-progress-value {
    border-radius: 999px;
    background: var(--fd-primary);
}

progress.fd-quota-jauge::-moz-progress-bar {
    border-radius: 999px;
    background: var(--fd-primary);
}

progress.fd-quota-jauge[data-etat="proche"] {
    color: #a05a00;
}

progress.fd-quota-jauge[data-etat="proche"]::-webkit-progress-value {
    background: #a05a00;
}

progress.fd-quota-jauge[data-etat="proche"]::-moz-progress-bar {
    background: #a05a00;
}

progress.fd-quota-jauge[data-etat="plein"] {
    color: #a31414;
}

progress.fd-quota-jauge[data-etat="plein"]::-webkit-progress-value {
    background: #a31414;
}

progress.fd-quota-jauge[data-etat="plein"]::-moz-progress-bar {
    background: #a31414;
}

.fd-quota-reste,
.fd-quota-note {
    margin: 0;
    font-size: .85rem;
    line-height: 1.5;
    color: var(--fd-text-muted);
}

.fd-quota-bloque {
    margin: 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: #ffe3e3;
    color: #8a1111;
    font-size: .85rem;
    line-height: 1.5;
}

.fd-quota-detail {
    margin: 0;
    padding-left: 18px;
    font-size: .85rem;
    line-height: 1.6;
    color: var(--fd-text-muted);
}

.fd-quota-lien {
    margin: 0;
    font-size: .88rem;
}

@media (max-width: 560px) {
    .fd-grid > .fd-quota-card {
        grid-column: 1 / -1;
    }
}

.fd-quota-lien {
    margin-top: auto;
}

.fd-sidebar-toggle {
    width: 5px;
    overflow: hidden;
    transition: width .18s ease, background .18s ease;
}

.fd-sidebar-toggle .fd-sidebar-toggle-icon {
    opacity: 0;
    transition: opacity .14s ease;
}

.fd-sidebar-toggle:hover,
.fd-sidebar-toggle:focus {
    width: 15px;
}

.fd-sidebar-toggle:hover .fd-sidebar-toggle-icon,
.fd-sidebar-toggle:focus .fd-sidebar-toggle-icon {
    opacity: 1;
}

.fd-sidebar-toggle {
    background: var(--fd-primary);
}

[data-theme="dark"] .fd-sidebar-toggle {
    background: var(--fd-primary);
}
[data-theme="dark"] .fd-sidebar-toggle .fd-sidebar-toggle-icon {
    color: rgba(20, 33, 61, .85);
}

.fd-cat-side-toggle {
    width: 5px;
    margin-right: -5px;
    overflow: hidden;
    background: var(--fd-primary);
    transition: width .18s ease, margin-right .18s ease, background .18s ease;
}

[data-theme="dark"] .fd-cat-side-toggle {
    background: var(--fd-primary);
}

.fd-cat-side-toggle .fd-cat-side-toggle-icon {
    opacity: 0;
    transition: opacity .14s ease;
}

.fd-cat-side-toggle:hover,
.fd-cat-side-toggle:focus {
    width: 15px;
    margin-right: -15px;
}

.fd-cat-side-toggle:hover .fd-cat-side-toggle-icon,
.fd-cat-side-toggle:focus .fd-cat-side-toggle-icon {
    opacity: 1;
}

.fd-card .fd-panel-toggle {
    display: inline-block !important;
    width: auto !important;
    height: auto !important;
    padding: 3px 3px 1px 3px !important;
    margin: 1px !important;
    background: rgb(215 214 214 / 15%) !important;
    border: 0 !important;
    border-radius: 4px !important;
    box-shadow: 0px 0px 1px #00000070 !important;
    color: inherit !important;
    font-size: 12px !important;
    line-height: 1 !important;
}

[data-theme="dark"] .fd-card .fd-panel-toggle {
    background: rgba(180, 210, 230, .12) !important;
}

.fd-card .fd-panel-toggle:hover {
    background: rgb(215 214 214 / 32%) !important;
    color: inherit !important;
}

[data-theme="dark"] .fd-card .fd-panel-toggle:hover {
    background: rgba(180, 210, 230, .26) !important;
}

.fd-card .fd-panel-toggle {
    transform: rotate(0deg) !important;
    transition: transform .2s ease !important;
}

.fd-card.fd-panel-collapsed .fd-panel-toggle {
    transform: rotate(-90deg) !important;
}

.fd-table th.fd-item-montant,
.fd-table td.fd-item-montant {
    text-align: right;
}

.fd-tunnel-cache {
    display: none !important;
}

.fd-tunnel-entete {
    margin: 0 0 14px;
}

.fd-tunnel-libelle {
    margin: 2px 0 8px;
    font-size: .88rem;
    font-weight: 600;
    color: var(--fd-text-muted);
}

.fd-tunnel-pied {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}
.fd-tunnel-pied [hidden] {
    display: none !important;
}

.fd-tunnel-brouillon {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

@media (max-width: 900px) {
    .fd-tunnel-pied {
        position: sticky;
        bottom: 0;
        z-index: 40;
        margin: 14px -12px 0;
        padding: 10px 12px;
        background: var(--fd-card-bg);
        box-shadow: 0 -2px 8px rgba(0, 0, 0, .12);
    }
    .fd-tunnel-pied .fd-tunnel-suivant,
    .fd-tunnel-pied .fd-tunnel-envoi {
        margin-left: auto;
    }
}

.fd-tunnel-etapes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.fd-tunnel-etape {
    display: flex;
}

.fd-tunnel-pastille {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    padding: 5px 13px 5px 6px;
    background: transparent;
    border: 1px solid var(--fd-border-light);
    border-radius: 999px;
    color: var(--fd-text-muted);
    font-size: .82rem;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
}

.fd-tunnel-pastille-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--fd-border-light);
    color: var(--fd-text);
    font-size: .76rem;
    font-weight: 700;
}

.fd-tunnel-faite .fd-tunnel-pastille {
    border-color: var(--fd-primary);
    color: var(--fd-text);
}

.fd-tunnel-faite .fd-tunnel-pastille-num {
    width: 21px;
    height: 21px;
    background: rgba(46, 125, 50, .12);
}
.fd-tunnel-faite .fd-tunnel-pastille-num svg {
    width: 14px;
    height: 14px;
    stroke: #2e7d32;
    stroke-width: 3;
    fill: none;
}
[data-theme="dark"] .fd-tunnel-faite .fd-tunnel-pastille-num {
    background: rgba(255, 255, 255, .15);
}
[data-theme="dark"] .fd-tunnel-faite .fd-tunnel-pastille-num svg {
    stroke: #6ee7a0;
}

.fd-tunnel-courante .fd-tunnel-pastille {
    border-color: var(--fd-primary);
    background: var(--fd-primary);
    color: #ffffff;
    font-weight: 700;
}
[data-theme="dark"] .fd-tunnel-courante .fd-tunnel-pastille { color: #14213d; }

.fd-tunnel-courante .fd-tunnel-pastille-num {
    background: rgba(255, 255, 255, .25);
    color: #ffffff;
}
[data-theme="dark"] .fd-tunnel-courante .fd-tunnel-pastille-num {
    background: rgba(20, 33, 61, .18);
    color: #14213d;
}

.fd-tunnel-pastille:disabled {
    cursor: default;
    opacity: .5;
}

.fd-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 1100;
    max-width: min(92vw, 420px);
    padding: 11px 16px;
    border-radius: 8px;
    color: #ffffff;
    font-size: .9rem;
    line-height: 1.4;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .3);
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(12px);
    transition: opacity .18s ease, transform .18s ease;
}

.fd-toast-erreur {
    background: #8a1111;
}

.fd-toast-succes {
    background: #1b5e20;
}

.fd-toast-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.fd-toast-avec-action {
    display: flex;
    align-items: center;
    gap: 27px;
    min-width: 230px;
}
.fd-toast-avec-action.fd-toast-visible {
    pointer-events: auto;
}
.fd-toast-action {
    flex: 0 0 auto;
    padding: 5px 12px;
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 6px;
    background: none;
    color: #ffffff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.fd-toast-action:hover,
.fd-toast-action:focus-visible {
    background: rgba(255, 255, 255, .16);
}

@media (max-width: 900px) {
    .fd-tunnel-pastille-nom {
        display: none;
    }
    .fd-tunnel-courante .fd-tunnel-pastille-nom {
        display: inline;
    }
    .fd-toast {
        bottom: 88px;
    }
}

.fd-brouillon-cache {
    display: none !important;
}

.fd-link-muted {
    color: var(--fd-link-color);
    font-weight: 600;
    margin: auto 7px;
}

.fd-link-muted:hover {
    color: var(--fd-primary);
    text-decoration: underline;
}

.fd-link-plus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 20px;
    height: 20px;
    margin-right: 5px;
    padding: 0;
    background: #1e7c3d;
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 50%;
    color: #ffffff;
    font-size: .85rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
    transition: background .15s;
}

.fd-link-muted:hover .fd-link-plus {
    background: #17602f;
}

[data-theme="dark"] .fd-link-plus {
    background: #1f8442;
}

[data-theme="dark"] .fd-link-muted:hover .fd-link-plus {
    background: #1a6f37;
}

.fd-champ-flanque {
    display: flex;
    align-items: stretch;
    gap: 6px;
}

.fd-champ-flanque .fd-input {
    flex: 1 1 auto;
    min-width: 0;
}

.fd-champ-bouton {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 38px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: var(--fd-btn-bg) !important;
    border: 1px solid var(--fd-border) !important;
    border-radius: 6px !important;
    color: var(--fd-btn-text) !important;
    cursor: pointer;
    transition: background .15s;
}

.fd-champ-bouton svg {
    width: 19px;
    height: 19px;
    pointer-events: none;
}

.fd-champ-bouton:hover {
    background: var(--fd-btn-hover) !important;
}

.fd-champ-bouton:focus-visible {
    outline: 2px solid var(--fd-primary);
    outline-offset: 2px;
}

.fd-cerfa-rapide .fd-cerfa-inner,
.fd-cerfa-rapide .fd-cerfa-info-box {
    padding: 14px 16px;
}
.fd-cerfa-rapide label:not(.fd-label-flex-mt) {
    display: block;
    margin: 12px 0 4px;
    padding: 0;
    font-weight: 700;
}
.fd-cerfa-rapide .fd-label-mt {
    margin-top: 12px !important;
}
.fd-cerfa-rapide .fd-cerfa-inner > label:first-child,
.fd-cerfa-rapide .fd-cerfa-info-box > label:first-child,
.fd-cerfa-rapide .fd-cerfa-info-box > p:first-child + label {
    margin-top: 0 !important;
}
.fd-cerfa-rapide .fd-row-cp-ville {
    margin-top: 0;
}
.fd-cerfa-rapide .fd-cerfa-equip-bloc > label:first-child,
.fd-cerfa-rapide .fd-cerfa-equip-bloc[hidden] + label {
    margin-top: 0 !important;
}
.fd-cerfa-rapide .fd-cerfa-equip-bloc {
    padding-bottom: 6px;
    margin-bottom: 4px;
    border-bottom: 1px dashed var(--fd-border);
}
.fd-cerfa-rapide input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not(.fd-combo-recherche),
.fd-cerfa-rapide select:not([multiple]):not(.fd-combo-natif),
.fd-cerfa-rapide textarea:not([hidden]) {
    display: block;
    width: 100%;
    min-height: 32px;
    box-sizing: border-box;
    margin: 0;
    padding: 6px 9px;
    border: 1px solid var(--fd-text-muted);
    border-radius: 6px;
    font-family: inherit;
    font-size: 13.3333px;
    text-align: left;
    color: var(--fd-text);
    background-color: var(--fd-input-bg);
}
.fd-cerfa-rapide textarea:not([hidden]) {
    resize: vertical;
}
.fd-cerfa-rapide select:not([multiple]):not(.fd-combo-natif) {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 28px;
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath fill='%2310212b' d='M0 0h10L5 6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 9px 6px;
}
[data-theme="dark"] .fd-cerfa-rapide select:not([multiple]):not(.fd-combo-natif) {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath fill='%23d8eaf2' d='M0 0h10L5 6z'/%3E%3C/svg%3E");
}
.fd-cerfa-rapide .fd-combo-champ .fd-combo-btn {
    min-height: 32px;
    text-align: left;
}
.fd-cerfa-rapide input[type="checkbox"] {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--fd-primary);
}
.fd-page-quittee body {
    visibility: hidden;
}
