/* Devis et Factures : parcours, lignes claires colorées par état (affichage seulement) — fond blanc, pas de bleu foncé */
.dr-hidden{display:none!important}
.dr-pipeline{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px;margin:0 0 14px}
.dr-step{all:unset;box-sizing:border-box;cursor:pointer;background:#fff;color:#1c2c49;border:1px solid #d5e2f3;border-radius:14px;padding:12px 14px;display:flex;flex-direction:column;gap:2px;min-width:0}
.dr-step:hover{border-color:#378ADD;background:#F6F9FF}
.dr-step:focus-visible{outline:3px solid #85B7EB;outline-offset:2px}
.dr-step span{font-size:.8rem;color:#5b6b86}
.dr-step b{font-size:1.6rem;font-weight:700;line-height:1.1;color:#0C447C}
.dr-step small{font-size:.78rem;color:#5b6b86}
.dr-step.dr-step-green{border:2px solid #639922}.dr-step.dr-step-green b{color:#3B6D11}
.dr-step.dr-step-amber{border:2px solid #EF9F27}.dr-step.dr-step-amber b{color:#854F0B}
/* Réponses clients repliées */
.dr-responses{background:#FAEEDA!important;color:#412402;border:1px solid #EF9F27!important;border-radius:14px!important;box-shadow:none!important}
.dr-responses .panel-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:0!important}
.dr-responses .panel-head h2{color:#633806!important;font-size:1rem;margin:0}
.dr-responses .dr-toggle{width:auto;min-height:0;background:#fff!important;color:#633806!important;border:1px solid #EF9F27!important;border-radius:8px;padding:6px 12px}
.dr-responses.dr-collapsed .quote-response-row{display:none!important}
.dr-responses .dr-head-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.dr-responses #quoteResponsesReadAll{width:auto;min-height:0;background:#633806!important;color:#fff!important;border:1px solid #633806!important;border-radius:8px;padding:6px 12px;font-weight:600}
.dr-responses .quote-response-row{background:#fff!important;border:1px solid #FAC775!important;border-radius:10px;margin-top:8px;padding:8px 10px}
.dr-responses .quote-response-row strong{color:#1c2c49!important}
.dr-responses .quote-response-row p{color:#5b6b86!important}
/* Panneau de la liste */
.dr-panel-host{background:#fff!important;border:1px solid #d5e2f3!important;border-radius:16px!important;color:#1c2c49}
.dr-panel-host .toolbar input,.dr-panel-host input[type=search]{background:#fff!important;color:#1c2c49!important;border:1px solid #B5D4F4!important;border-radius:10px}
.dr-panel-host input::placeholder{color:#6b7c96}
.dr-panel-host .hint{color:#4a5a75!important}
.dr-chips{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px}
.dr-chip{width:auto;min-height:0;padding:6px 13px;border-radius:999px!important;background:#fff!important;color:#0C447C!important;border:1px solid #85B7EB!important;font-weight:600;font-size:.85rem;box-shadow:none!important}
.dr-chip:hover{background:#E6F1FB!important}
.dr-chip.on{background:#185FA5!important;color:#fff!important;border-color:#185FA5!important}
.dr-chip.dr-chip-red{border-color:#E24B4A!important;color:#A32D2D!important}
.dr-chip.dr-chip-red.on{background:#A32D2D!important;color:#fff!important}
/* Lignes */
.dr-list{display:flex;flex-direction:column;gap:8px}
.dr-row{display:grid;grid-template-columns:minmax(120px,150px) minmax(0,1fr) 110px minmax(150px,200px) auto;gap:12px;align-items:center;background:#fff;color:#1c2c49;border:1px solid #d5e2f3;border-radius:12px;padding:10px 14px}
.dr-row:hover{border-color:#85B7EB;background:#F6F9FF}
.dr-row.dr-late{border:2px solid #E24B4A;background:#FFF8F8}
.dr-row.dr-warn{border:2px solid #EF9F27}
.dr-row.dr-archived{opacity:.7}
.dr-row small{display:block;color:#5b6b86;font-size:.78rem;margin-top:2px}
.dr-row small.dr-latetext{color:#A32D2D!important;font-weight:700}
.dr-ref strong{color:#1c2c49;font-size:.95rem}
.dr-who{min-width:0}.dr-name{font-weight:700;color:#1c2c49}
.dr-client{background:none!important;border:0!important;padding:0!important;min-height:0!important;width:auto!important;color:#185FA5!important;font:inherit;font-weight:700;text-decoration:underline;cursor:pointer;box-shadow:none!important;text-align:left}
.dr-amount{font-size:1.05rem;font-weight:700;text-align:right;white-space:nowrap;color:#1c2c49}
.dr-state{display:flex;flex-direction:column;align-items:flex-start;gap:4px}
/* Pastilles : fond clair, texte foncé de la même couleur */
.dr-pill{display:inline-block;font-size:.75rem;font-weight:700;padding:3px 10px;border-radius:999px;white-space:nowrap;border:1px solid transparent}
.dr-blue{background:#E6F1FB;color:#0C447C;border-color:#85B7EB}.dr-green{background:#EAF3DE;color:#27500A;border-color:#97C459}
.dr-amber{background:#FAEEDA;color:#633806;border-color:#EF9F27}.dr-red{background:#FCEBEB;color:#791F1F;border-color:#F09595}
.dr-gray{background:#F1EFE8;color:#444441;border-color:#B4B2A9}.dr-teal{background:#E1F5EE;color:#085041;border-color:#5DCAA5}
.dr-violet{background:#EEEDFE;color:#3C3489;border-color:#AFA9EC}
.dr-send .badge{font-size:.72rem}
.dr-send button.badge{cursor:pointer}
.dr-actions{display:flex;gap:6px;justify-content:flex-end;flex-wrap:wrap}
.dr-actions button{width:auto;min-height:0;padding:6px 11px;border-radius:8px;background:#fff!important;color:#0C447C!important;border:1px solid #85B7EB!important;box-shadow:none!important;white-space:nowrap}
.dr-actions button:hover{background:#E6F1FB!important}
.dr-actions .dr-go{background:#1D9E75!important;color:#fff!important;border-color:#1D9E75!important;font-weight:700}
.dr-actions .dr-go:hover{background:#0F6E56!important}
.dr-empty{padding:10px 0}
/* Bouton mis en évidence dans la fenêtre du document */
.dr-focus{outline:3px solid #EF9F27!important;outline-offset:3px;box-shadow:0 0 0 6px rgba(239,159,39,.25)!important}
@media(max-width:900px){.dr-row{grid-template-columns:1fr auto}.dr-who,.dr-state{grid-column:1/-1}.dr-actions{grid-column:1/-1;justify-content:flex-start}}

/* Variante validée le 14/11 : fond d'Ultratelier conservé (pas de panneau blanc), lignes en bleu moyen (pas de bleu foncé) */
.dr-panel-host{background:transparent!important;border:0!important;box-shadow:none!important}
.dr-row{background:#185FA5;color:#fff;border:1px solid #378ADD}
.dr-row:hover{background:#1E6BB5;border-color:#B5D4F4}
.dr-row small{color:#E6F1FB}
.dr-row.dr-late{background:#185FA5;border:2px solid #E24B4A;box-shadow:0 0 0 1px #F09595}
.dr-row.dr-warn{border:2px solid #FAC775}
.dr-row small.dr-latetext{color:#FFD9D9!important}
.dr-ref strong,.dr-name,.dr-amount{color:#fff}
.dr-client{color:#fff!important}
.dr-actions button{background:transparent!important;color:#fff!important;border:1px solid #E6F1FB!important}
.dr-actions button:hover{background:rgba(255,255,255,.15)!important}
.dr-actions .dr-go{background:#1D9E75!important;border-color:#1D9E75!important}
.dr-send .badge{box-shadow:none}

/* Alignement (14/11) : colonnes de largeur fixe, identiques sur toutes les lignes, quel que soit le nombre de boutons */
.dr-row{grid-template-columns:160px minmax(0,1fr) 130px 210px 230px}
.dr-amount{text-align:right}
.dr-state{align-items:flex-start;min-width:0}
.dr-actions{justify-content:flex-end;flex-wrap:nowrap}
@media(max-width:1100px){.dr-row{grid-template-columns:140px minmax(0,1fr) 110px 180px 200px}}
@media(max-width:900px){.dr-row{grid-template-columns:1fr auto}.dr-who,.dr-state{grid-column:1/-1}.dr-actions{grid-column:1/-1;justify-content:flex-start;flex-wrap:wrap}}
.dr-row{border-width:2px!important;border-style:solid!important}

/* « Préparé par … » sur les devis et factures */
.doc-author{margin:0 0 10px;padding:7px 12px;border-radius:10px;background:#E6F1FB;color:#0C447C;border:1px solid #B5D4F4;font-size:.86rem;font-weight:600}


/* « Préparé par » (interne) : fenêtre de préparation et fiche du document */
.doc-prep{background:#E6F1FB;border:1px solid #85B7EB;border-radius:10px;padding:8px 12px;margin:0 0 12px}
.doc-prep>span{font-weight:700;color:#0C447C}.doc-prep small{font-weight:400;color:#4a5a75}
.doc-prep select{max-width:280px}
.doc-prep-detail{display:flex;flex-wrap:wrap;align-items:center;gap:10px;background:#E6F1FB;border:1px solid #85B7EB;border-radius:10px;padding:8px 12px;margin:0 0 12px;color:#0C447C;font-weight:700}
.doc-prep-detail small{font-weight:400;color:#4a5a75}
.doc-prep-detail select{width:auto;min-width:180px}
.doc-prep-detail .doc-prep-status{color:#3B6D11;font-weight:700}

/* « Préparé par » : boutons Jordan / Sam */
.doc-prep{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px}
.doc-prep .doc-prep-label{font-weight:700;color:#0C447C}
.doc-prep-buttons{position:relative;display:inline-flex;gap:8px;align-items:center}
.doc-prep-btn{width:auto!important;min-height:0!important;padding:8px 22px!important;border-radius:999px!important;background:#fff!important;color:#0C447C!important;border:2px solid #378ADD!important;font-weight:700!important;font-size:.95rem;box-shadow:none!important;cursor:pointer}
.doc-prep-btn:hover{background:#E6F1FB!important}
.doc-prep-btn.on{background:#185FA5!important;color:#fff!important;border-color:#185FA5!important}
.doc-prep-btn:focus-visible{outline:3px solid #85B7EB;outline-offset:2px}
.doc-prep-value{position:absolute!important;left:0;bottom:0;width:1px!important;height:1px!important;min-height:0!important;opacity:0;padding:0!important;border:0!important;pointer-events:none}
.doc-prep-detail .doc-prep-hint{color:#854F0B}

/* Calculateur d'acompte (devis) */
.dep-calc{grid-column:1/-1;background:#E6F1FB;border:1px solid #85B7EB;border-radius:12px;padding:10px 12px;margin:0 0 12px;color:#0C447C}
.dep-calc-head{display:flex;flex-wrap:wrap;justify-content:space-between;gap:6px;margin-bottom:8px}
.dep-calc-head span{color:#4a5a75;font-size:.85rem}
.dep-calc-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.dep-chip{width:auto!important;min-height:0!important;padding:8px 18px!important;border-radius:999px!important;background:#fff!important;color:#0C447C!important;border:2px solid #378ADD!important;font-weight:700!important;box-shadow:none!important}
.dep-chip:hover{background:#E6F1FB!important}
.dep-chip.on{background:#185FA5!important;color:#fff!important;border-color:#185FA5!important}
.dep-custom{display:inline-flex;align-items:center;gap:6px;margin:0}
.dep-custom input{width:70px!important;min-height:0;padding:6px 8px}
.dep-round{display:inline-flex;align-items:center;gap:6px;margin:0 0 0 auto;font-size:.88rem}
.dep-round input{width:auto;margin:0}
.dep-result{margin:8px 0 0!important;font-size:.92rem}
.dep-select{display:inline-flex;align-items:center;gap:8px;margin:0;font-weight:700}
.dep-select select{width:auto!important;min-width:130px}

/* Numéro de document cliquable (même action que « Ouvrir ») */
.dr-refbtn{all:unset;cursor:pointer;color:#fff;border-radius:4px}
.dr-refbtn strong{text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}
.dr-refbtn:hover strong{text-decoration-thickness:2px}
.dr-refbtn:focus-visible{outline:2px solid #fff;outline-offset:2px}

/* « ＋ Nouveau client » dans la fenêtre devis / facture */
.doc-new-client{align-self:start;justify-self:start;width:auto!important;min-height:0!important;padding:8px 16px!important;border-radius:999px!important;background:#fff!important;color:#0C447C!important;border:2px solid #378ADD!important;font-weight:700!important}
.doc-new-client:hover{background:#E6F1FB!important}
.doc-new-client-offer{grid-column:1/-1;justify-self:start;background:#185FA5!important;color:#fff!important;border-color:#185FA5!important}
.doc-new-client-offer:hover{background:#0C447C!important}

.doc-new-client[hidden]{display:none!important}