﻿/* Shared document tables; status is distinct from the next canonical action. */
html.bc-v1 .v11-doc-table{overflow:visible}
html.bc-v1 .bc-v1-action-menu{position:relative;display:inline-block;text-align:left}
html.bc-v1 .bc-v1-action-menu>summary{display:grid;place-items:center;min-width:36px;height:36px;border:1px solid var(--line);border-radius:7px;cursor:pointer;list-style:none;color:var(--muted)}
html.bc-v1 .bc-v1-action-menu>summary::-webkit-details-marker{display:none}
html.bc-v1 .bc-v1-action-panel{position:absolute;z-index:25;right:0;top:calc(100% + 6px);min-width:240px;max-width:calc(100vw - 40px);padding:12px;background:white;border:1px solid var(--line);border-radius:10px;box-shadow:0 8px 24px #18362a22;display:flex;flex-direction:column;gap:8px}
html.bc-v1 .bc-v1-action-panel button{text-align:left;width:100%}
html.bc-v1 .bc-v1-next{min-width:92px;color:var(--brand-primary);background:var(--brand-primary-soft)}
html.bc-v1 .bc-v1-send{width:112px;display:inline-flex;align-items:center;justify-content:center;gap:6px;overflow:hidden;position:relative}
html.bc-v1 .bc-send-plane{display:inline-flex;width:13px;height:13px;flex-shrink:0;transform-origin:60% 50%}
html.bc-v1 .bc-send-plane svg{width:100%;height:100%}
html.bc-v1 .bc-v1-send.is-sending{opacity:1;cursor:wait;animation:bc-send-press .1s cubic-bezier(.2,.7,.3,1) both}
html.bc-v1 .is-sending .bc-send-plane{animation:bc-send-flight .28s cubic-bezier(.32,.05,.48,1) .06s both}
html.bc-v1 .is-sending .bc-send-label{animation:bc-send-label .22s cubic-bezier(.2,.7,.3,1) .16s both}
html.bc-v1 .bc-v1-send.is-revealing .bc-send-label{animation:bc-send-label .22s ease-out both}
@keyframes bc-send-press{0%,100%{transform:translateY(0) scale(1)}55%{transform:translateY(.5px) scale(.985)}}
@keyframes bc-send-flight{0%{transform:translate(0,0) rotate(0);opacity:1}28%{transform:translate(5px,-.5px) rotate(-4deg);opacity:1}64%{transform:translate(13px,-3px) rotate(-11deg);opacity:.85}100%{transform:translate(23px,-7px) rotate(-16deg);opacity:0}}
@keyframes bc-send-label{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){html.bc-v1 .bc-v1-send,html.bc-v1 .bc-v1-send *{animation:none!important;transition:none!important}html.bc-v1 .is-sending .bc-send-plane{opacity:0}}
html.bc-v1 .v11-doc-actions>div{align-items:center}
@media(max-width:760px){html.bc-v1 .bc-v1-action-menu>summary{height:44px;min-width:44px}html.bc-v1 .bc-v1-action-panel{min-width:min(260px,calc(100vw - 56px))}html.bc-v1 .v11-doc-actions{overflow:visible}}
html.bc-v1 .bc-v1-badge{background:color-mix(in srgb,currentColor 7%,white);border-color:color-mix(in srgb,currentColor 25%,white)}
@media(max-width:760px){html.bc-v1 .v11-document-row td{padding:0}html.bc-v1 .v11-document-row{padding:16px;gap:12px}html.bc-v1 .v11-doc-actions{grid-column:2;grid-row:2}html.bc-v1 .v11-doc-actions>div{padding:0;justify-content:flex-end}html.bc-v1 .v11-doc-status{align-self:center}}
/* Invoice and credit-note density uses the same V1 state and action components. */
html.bc-v1 .v11-document-row .amount{font-variant-numeric:tabular-nums}
html.bc-v1 :is(#dh-factures-list,#dh-avoirs-list) .bc-v1-badge{min-width:82px}
@media(max-width:760px){html.bc-v1 .bc-v1-action-panel{position:fixed;left:16px;right:16px;top:auto;bottom:calc(76px + env(safe-area-inset-bottom));width:auto;min-width:0;max-width:none;max-height:55dvh;overflow-y:auto;z-index:350}}

/* The canonical status select lives in its table column, also on mobile cards. */
html.bc-v1 .v11-doc-status .bc-v1-status-control{display:flex;flex-direction:column;align-items:stretch!important;gap:6px!important;width:fit-content;min-width:0;max-width:100%;background:transparent!important}
html.bc-v1 .v11-doc-status select.bc-v1-status-select{box-sizing:border-box;flex:none;width:100%;min-width:0;max-width:100%;min-height:44px!important;margin:0;font-family:inherit;font-size:13px!important;font-weight:700;line-height:1.4;padding:9px 10px!important;border:1px solid var(--line)!important;border-radius:7px!important;background-color:color-mix(in srgb,currentColor 7%,white)!important;-webkit-appearance:auto!important;appearance:auto!important}
html.bc-v1 .v11-doc-status select.bc-v1-status-select:focus-visible{outline:2px solid var(--brand-primary);outline-offset:2px}
html.bc-v1 .v11-doc-status select.bc-v1-status-select:disabled{opacity:1;cursor:not-allowed}
html.bc-v1 .v11-doc-status .bc-v1-status-derived{align-self:flex-start;max-width:100%;height:auto!important;min-height:0!important;white-space:normal;overflow-wrap:anywhere;line-height:1.4;padding:5px 8px!important}
html.bc-v1 .v11-doc-status .bc-v1-status-derived svg{flex-shrink:0}
/* Shared document actions: a single scrollable dialog, with canonical business controls. */
html.bc-v1 .v11-doc-table{overflow:visible}
html.bc-v1 .v11-doc-actions>div{align-items:center}
html.bc-v1 .bc-v1-action-trigger{min-width:92px;min-height:44px;color:var(--brand-primary);background:var(--brand-primary-soft)}
html.bc-v1 .bc-v1-action-dialog{width:min(520px,calc(100vw - 32px));max-width:none;max-height:calc(100dvh - 32px);margin:auto;padding:0;overflow:auto;overscroll-behavior:contain;border:1px solid var(--line);border-radius:16px;background:white;color:var(--brand-primary);box-shadow:0 12px 48px #18362a33;text-align:left}
html.bc-v1 .bc-v1-action-dialog::backdrop{background:rgba(0,0,0,.45)}
html.bc-v1 .bc-v1-action-header{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 20px;background:white;border-bottom:1px solid var(--line)}
html.bc-v1 .bc-v1-action-header h2{margin:0;min-width:0;font-size:18px;line-height:1.4;font-weight:700;color:var(--brand-primary)}
html.bc-v1 .bc-v1-action-header h2 span{display:block;margin-top:2px;font-size:13px;font-weight:500;overflow-wrap:anywhere;color:var(--muted)}
html.bc-v1 .bc-v1-action-header .button{min-height:44px;flex-shrink:0}
html.bc-v1 .bc-v1-action-dialog .bc-v1-action-panel{position:static;width:auto;min-width:0;max-width:none;max-height:none;overflow:visible;z-index:auto;border:0;border-radius:0;box-shadow:none;background:transparent;display:flex;flex-direction:column;gap:12px;padding:16px 20px 20px}


html.bc-v1 .bc-v1-action-dialog .bc-v1-action-panel button{display:flex;align-items:center;gap:8px;text-align:left;width:100%;min-height:44px;margin:0;white-space:normal;overflow-wrap:anywhere;line-height:1.45}
html.bc-v1 .bc-doc-action-note{margin:-6px 0 0;font-size:11px;line-height:1.5;color:var(--muted)}
html.bc-v1 .bc-doc-action-group{display:flex;flex-direction:column;gap:4px;border-top:1px solid var(--line);padding-top:10px}
html.bc-v1 .bc-doc-action-group h3{margin:0 0 4px;font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
html.bc-v1 .bc-doc-action-group button{justify-content:flex-start;font-size:14px;border-color:transparent;background:transparent;box-shadow:none}
html.bc-v1 .bc-doc-action-group button:hover{background:var(--brand-primary-soft)}
html.bc-v1 .bc-v1-action-dialog .bc-v1-action-panel button[data-danger]{color:#c62828!important}
html.bc-v1 .bc-v1-action-dialog .bc-v1-action-panel button:focus-visible,html.bc-v1 .bc-v1-action-trigger:focus-visible{outline:2px solid var(--brand-primary);outline-offset:2px}
html.bc-v1 .bc-v1-badge{background:color-mix(in srgb,currentColor 7%,white);border-color:color-mix(in srgb,currentColor 25%,white)}
html.bc-v1 .v11-document-row .amount{font-variant-numeric:tabular-nums}
html.bc-v1 :is(#dh-factures-list,#dh-avoirs-list) .bc-v1-badge{min-width:82px}
@media(max-width:760px){
 html.bc-v1 .v11-document-row td{padding:0}
 html.bc-v1 .v11-document-row{padding:16px;gap:12px}
 html.bc-v1 .v11-doc-actions{grid-column:2;grid-row:2;overflow:visible}
 html.bc-v1 .v11-doc-actions>div{padding:0;justify-content:flex-end;min-width:0}
 html.bc-v1 .v11-doc-status{align-self:center}
 html.bc-v1 .bc-v1-action-dialog{width:100%;max-width:520px;max-height:calc(100dvh - 24px);margin:auto auto 0;border-radius:20px 20px 0 0}
 html.bc-v1 .bc-v1-action-dialog .bc-v1-action-panel{padding-bottom:calc(20px + env(safe-area-inset-bottom,0px))}
}
