/* Traduction de chapitres — panneau de comparaison, glossaire, lots, export. */
.tr-overlay {
  --cream:#f6f4ef; --warm-white:#fffdf9; --sand:#dedbd3;
  --rose:#986344; --rose-dark:#7c4c33; --rose-light:#efe3d7;
  --text:#292d2b; --text-light:#565f59; --text-muted:#676d66;
  --green:#3e7057; --green-light:#e9f1eb; --red:#b33e3e; --amber-light:#f7eed9;
  position:fixed; inset:0; z-index:170; background:rgba(41,45,43,.45); display:flex; align-items:stretch; justify-content:center;
  padding:24px; font-family:'Lato',Arial,sans-serif; color:var(--text);
}
.tr-overlay[hidden] {display:none;}
body.tr-open {overflow:hidden;}
.tr-panel {background:var(--warm-white); border-radius:10px; width:100%; max-width:1280px; display:flex; flex-direction:column; overflow:auto; padding:24px 28px; box-shadow:0 20px 60px rgba(0,0,0,.2);}
.tr-head {display:flex; justify-content:space-between; align-items:flex-start; gap:16px;}
.tr-head h2 {font:28px/1.2 Georgia,serif; margin:6px 0 4px;}
.tr-direction {margin:0; color:var(--text-light); font-size:14px;}
.tr-overlay button {font-family:inherit; font-size:14px; min-height:40px; padding:8px 14px; border:1px solid var(--sand); background:var(--warm-white); color:var(--text); border-radius:6px; cursor:pointer;}
.tr-overlay button.atelier-primary {background:var(--rose-dark); color:#fff; border-color:var(--rose-dark);}
.tr-overlay button:disabled {opacity:.5; cursor:not-allowed;}
.tr-overlay :is(button,input,select,summary,a):focus-visible {outline:2px solid var(--rose-dark); outline-offset:3px;}
.tr-tabs {display:flex; gap:6px; flex-wrap:wrap; margin:18px 0 14px; border-bottom:1px solid var(--sand); padding-bottom:10px;}
.tr-tabs button.active {background:var(--rose-light); border-color:var(--rose);}
.tr-body {flex:none;}
.tr-select {display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-bottom:14px; font-size:14px;}
.tr-select select, .tr-select input, .tr-glossary-form input, .tr-title-input, .tr-suggestions input {font:inherit; font-size:14px; padding:8px 10px; border:1px solid var(--sand); border-radius:6px; background:#fff; min-height:40px; max-width:100%;}
.tr-select select {min-width:min(420px,100%);}
.tr-compare {display:grid; grid-template-columns:1fr 1fr; gap:20px;}
.tr-column {border:1px solid var(--sand); border-radius:8px; padding:16px; background:#fff; min-width:0; align-self:start;}
.tr-column h3 {font:20px Georgia,serif; margin:8px 0 12px;}
.tr-source {font:16px/1.7 Georgia,serif; max-height:calc(60vh + 42px); overflow:auto; overflow-wrap:anywhere;}
.tr-source p {margin:0 0 .8em;}
.tr-title-input {width:100%; margin:8px 0 12px; font:18px Georgia,serif;}
#tr-editor.ql-container {height:auto; background:#fff;}
#tr-editor .ql-editor {min-height:320px; max-height:60vh; overflow-y:auto; font:16px/1.7 Georgia,serif; color:var(--text);}
#tr-editor .ql-editor p {margin-bottom:.8em;}
.tr-actions {display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-top:12px;}
#tr-save-state {font-size:13px; color:var(--text-muted);}
.tr-banner {background:var(--rose-light); border-radius:6px; padding:10px 14px; margin:0 0 12px; font-size:14px; line-height:1.5;}
.tr-banner.tr-warn {background:var(--amber-light);}
.tr-empty {padding:20px 0; color:var(--text-light);}
.tr-hint {font-size:13px; color:var(--text-muted);}
.tr-checklist, .tr-joblist, .tr-suggestions {list-style:none; padding:0; margin:12px 0; display:grid; gap:6px;}
.tr-checklist label {display:flex; gap:8px; align-items:center; font-size:14px;}
.tr-checklist small {color:var(--text-muted);}
.tr-joblist li {font-size:14px; padding:6px 10px; border-radius:6px; background:#fff; border:1px solid var(--sand);}
.tr-job-done {border-color:var(--green)!important; background:var(--green-light)!important;}
.tr-job-failed {border-color:var(--red)!important;}
.tr-job-changed {background:var(--amber-light)!important;}
.tr-overlay progress {width:100%; height:12px; accent-color:var(--rose-dark);}
.tr-glossary-form {display:flex; flex-wrap:wrap; gap:8px; margin:12px 0;}
.tr-glossary-table {border-collapse:collapse; margin:12px 0; font-size:14px;}
.tr-glossary-table td {padding:6px 10px; border-bottom:1px solid var(--sand);}
.tr-suggestions li {display:flex; flex-wrap:wrap; gap:8px; align-items:center;}
.tr-suggestions span {min-width:140px;}
.tr-notice {margin-top:18px; font-size:13px; line-height:1.6; color:var(--text-light); border-top:1px solid var(--sand); padding-top:12px;}
.tr-notice summary {cursor:pointer; font-weight:700; color:var(--text);}
.tr-notice a {color:var(--rose-dark);}
.tr-loading {color:var(--text-muted); font-size:14px;}
@media (max-width: 860px) {
  .tr-overlay {padding:0;}
  .tr-panel {border-radius:0; padding:16px;}
  .tr-compare {grid-template-columns:1fr;}
  .tr-source {max-height:40vh;}
}
.tr-sr {position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap;}
