/* Tokens de maquette. Préférence existante : workspace.planning.theme.crm */
:root,[data-ws-theme="light"]{--ws-bg:#F6F7FB!important;--ws-soft:#F6F7FB!important;--ws-panel:#FFFFFF!important;--ws-panel2:#F1F2F7!important;--ws-text:#18212F!important;--ws-muted:#606A7E!important;--ws-line:#D7DCE7!important;--ws-primary:#6D3CE8!important;--ws-accent:#6D3CE8!important;--success-bg:#E2F4EB!important;--success-text:#176747!important;--warning-bg:#FFF0D5!important;--warning-text:#825000!important;--danger-bg:#FCE7EA!important;--danger-text:#A32940!important;--overlay:rgba(12,18,35,.52)!important;--focus-ring:#6D3CE8!important}
[data-ws-theme="medium"]{--ws-bg:#172039!important;--ws-soft:#1D2943!important;--ws-panel:#24314C!important;--ws-panel2:#2C3C59!important;--ws-text:#F5F8FF!important;--ws-muted:#BDCBE3!important;--ws-line:#435571!important;--ws-accent:#BDA6FF!important;--success-bg:#183F39!important;--success-text:#99EDC5!important;--warning-bg:#4B3924!important;--warning-text:#FFDA93!important;--danger-bg:#4F2A3A!important;--danger-text:#FFADB9!important;--overlay:rgba(5,9,20,.72)!important;--focus-ring:#BDA6FF!important}
[data-ws-theme="dark"]{--ws-bg:#10131B!important;--ws-soft:#151A25!important;--ws-panel:#191E2B!important;--ws-panel2:#232A3A!important;--ws-text:#F4F6FC!important;--ws-muted:#A9B3C7!important;--ws-line:#313B50!important;--ws-accent:#A98BFF!important;--success-bg:#15382F!important;--success-text:#99EDC5!important;--warning-bg:#43321F!important;--warning-text:#FFDA93!important;--danger-bg:#422633!important;--danger-text:#FFADB9!important;--overlay:rgba(0,0,0,.75)!important;--focus-ring:#A98BFF!important}

/* Corrections de couleurs uniquement : structure des fenêtres MAJ 51 conservée. */
html[data-ws-theme] body.tfb-crm [data-crm-native].org-clean{--bg-primary:var(--ws-bg)!important;--bg-secondary:var(--ws-panel)!important;--bg-tertiary:var(--ws-panel2)!important;--bg:var(--ws-bg)!important;--bg2:var(--ws-panel)!important;--bg3:var(--ws-panel2)!important;--text-primary:var(--ws-text)!important;--text-secondary:var(--ws-muted)!important;--text-tertiary:var(--ws-muted)!important;--text:var(--ws-text)!important;--text2:var(--ws-muted)!important;--border-color:var(--ws-line)!important;--border:var(--ws-line)!important;--primary:var(--ws-primary)!important;--primary-light:var(--ws-panel2)!important;--high:var(--danger-text)!important;--medium:var(--warning-text)!important;--low:var(--success-text)!important;color:var(--ws-text)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .org-page-top h1{color:var(--ws-text)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .org-page-top p{color:var(--ws-muted)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean button:not(.today-btn):not(.primary):not(.chat-toggle-btn):not(.org-primary),html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .nav-btn{border:1px solid var(--ws-line)!important;background:var(--ws-panel)!important;color:var(--ws-muted)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean button:not(:disabled):hover{border-color:var(--ws-line)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .primary,html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .today-btn,html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .org-primary{border:1px solid var(--ws-accent)!important;background:var(--ws-primary)!important;color:#fff!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .primary:hover,html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .today-btn:hover{background:var(--ws-primary)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean input:not([type=checkbox]):not([type=file]),html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean select,html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean textarea{background:var(--ws-panel)!important;border:1px solid var(--ws-line)!important;color:var(--ws-text)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean input::placeholder,html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean textarea::placeholder{color:var(--ws-muted)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean label{color:var(--ws-muted)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .search-bar{background:var(--ws-panel)!important;border:1px solid var(--ws-line)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .search-icon{color:var(--ws-muted)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .view-toggle-btn{border:1px solid var(--ws-line)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .view-toggle-btn.active{background:var(--ws-panel2)!important;border-color:var(--ws-line)!important;color:var(--ws-accent)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .users-bar>.label{color:var(--ws-muted)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .users-bar .avatar{border:2px solid var(--ws-panel)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .filter-indicator{background:var(--ws-panel2)!important;color:var(--ws-muted)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .entities-tabs{border-bottom:1px solid var(--ws-line)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .entity-tab{color:var(--ws-muted)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .entity-tab.active{background:var(--ws-panel2)!important;color:var(--ws-accent)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .entity-tab .badge{background:var(--ws-panel2)!important;color:var(--ws-accent)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .column{background:var(--ws-panel2)!important;border:1px solid var(--ws-line)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .column-header h2{color:var(--ws-muted)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .column-header h2:before{background:var(--ws-muted)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .column.doing .column-header h2:before{background:var(--ws-primary)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .column.waiting .column-header h2:before{background:var(--warning-text)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .column.postponed .column-header h2:before{background:var(--ws-muted)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .column.done .column-header h2:before{background:var(--success-text)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .column-header .count{background:var(--ws-panel2)!important;color:var(--ws-muted)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .task{background:var(--ws-panel)!important;border:1px solid var(--ws-line)!important;border-left:1px solid var(--ws-line)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .task:hover{border-color:var(--ws-line)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .task-title{color:var(--ws-text)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .task-entity-badge{background:var(--ws-panel2)!important;color:var(--ws-accent)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .task-assignee{border:2px solid var(--ws-panel)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .task-due{background:var(--ws-bg)!important;color:var(--ws-muted)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .task-due.overdue{color:var(--danger-text)!important;background:var(--danger-bg)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .task-comment-count{color:var(--ws-muted)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .task-subtasks-preview{color:var(--ws-muted)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .progress-bar{background:var(--ws-panel2)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .progress-fill{background:var(--ws-accent)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .task.is-urgent{border-color:var(--danger-bg)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .urgent-star:after{background:var(--danger-bg)!important;color:var(--danger-text)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .task-edit-btn{background:var(--ws-bg)!important;color:var(--ws-muted)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .attachment-item{background:var(--ws-bg)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .list-view-container{border:1px solid var(--ws-line)!important;background:var(--ws-panel)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .list-table{background:var(--ws-panel)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .list-table th{background:var(--ws-bg)!important;color:var(--ws-muted)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .list-table td{border-color:var(--ws-line)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .chat-toggle-btn{background:var(--ws-primary)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .chat-panel{border:1px solid var(--ws-line)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean [id$=currentUserBadge]{border:1px solid var(--ws-line)!important;background:var(--ws-panel)!important;color:var(--ws-muted)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .user-menu{border:1px solid var(--ws-line)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .user-menu-item:hover{background:var(--ws-panel2)!important;color:var(--ws-accent)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean[data-crm-native=agenda]>header>.tabs{background:var(--ws-panel2)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean[data-crm-native=agenda]>header>.tabs .active{background:var(--ws-panel)!important;color:var(--ws-accent)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .org-connection>summary{color:var(--ws-muted)!important;background:var(--ws-panel)!important;border:1px solid var(--ws-line)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .org-connection>summary:before{background:var(--success-text)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .org-connection>.legend{background:var(--ws-panel)!important;border:1px solid var(--ws-line)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean [id$=googleStatusLabel]{color:var(--success-text)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .agenda-calendar{border:1px solid var(--ws-line)!important;background:var(--ws-panel)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean[data-crm-native=agenda] .agenda-calendar>.toolbar{border-bottom:1px solid var(--ws-line)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .month-label{color:var(--ws-text)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .agenda-arrows button{border:1px solid var(--ws-line)!important;background:var(--ws-panel)!important;color:var(--ws-muted)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .agenda-period>.today-btn{background:var(--ws-panel)!important;border:1px solid var(--ws-line)!important;color:var(--ws-muted)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .view-toggle{background:var(--ws-panel2)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .view-toggle .active{background:var(--ws-panel)!important;color:var(--ws-accent)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .agenda-filterbar{border-bottom:1px solid var(--ws-line)!important;background:var(--ws-panel)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .agenda-filter-label{color:var(--ws-muted)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .user-filter button{border:1px solid var(--ws-line)!important;background:var(--ws-panel)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .user-filter button.active{color:var(--ws-accent)!important;background:var(--ws-panel2)!important;border-color:var(--ws-line)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .agenda-availability button{background:var(--ws-bg)!important;color:var(--ws-muted)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .cal-header{background:var(--ws-bg)!important;color:var(--ws-muted)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .cal-header>div{border-right:1px solid var(--ws-line)!important;border-bottom:1px solid var(--ws-line)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .cal-grid{background:var(--ws-panel)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .cal-day{border-right:1px solid var(--ws-line)!important;border-bottom:1px solid var(--ws-line)!important;background:var(--ws-panel)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .cal-day:hover{background:var(--ws-panel2)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .cal-day.weekend{background:var(--ws-bg)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .cal-day.other-month{background:var(--ws-bg)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .other-month .day-num{color:var(--ws-muted)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .cal-day.today{background:var(--ws-panel2)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .day-num{color:var(--ws-muted)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .today .day-num{color:var(--ws-accent)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .task-chip{background:var(--ws-panel2)!important;color:var(--ws-accent)!important;border-left:2px solid var(--ws-line)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .task-chip.done{background:var(--success-bg)!important;color:var(--success-text)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .more-chip{color:var(--ws-muted)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .agenda-footer{background:var(--ws-panel)!important;color:var(--ws-muted)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .vybe-agenda-notice{color:var(--ws-muted)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .week-day-scroll{background:var(--ws-panel)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .day-panel{border:1px solid var(--ws-line)!important;background:var(--ws-panel)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .day-panel h2{color:var(--ws-text)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .panel-task{border:1px solid var(--ws-line)!important;border-left:3px solid var(--ws-line)!important;background:var(--ws-panel)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .panel-task-meta{color:var(--ws-muted)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .panel-close,html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .panel-close-bottom{background:var(--ws-bg)!important;border-color:var(--ws-line)!important;color:var(--ws-muted)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .modal-content{border:1px solid var(--ws-line)!important;background:var(--ws-panel)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .modal-header{border-bottom:1px solid var(--ws-line)!important;background:var(--ws-panel)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .modal-footer{border-top:1px solid var(--ws-line)!important;background:var(--ws-panel)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .modal-close{background:var(--ws-bg)!important;color:var(--ws-muted)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .form-group label{color:var(--ws-muted)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .assignee-chip{border:1px solid var(--ws-line)!important;background:var(--ws-panel)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .assignee-chip.selected{background:var(--ws-panel2)!important;border-color:var(--ws-line)!important;color:var(--ws-accent)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .pin-overlay{background:#18212f66!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .pin-box{background:var(--ws-panel)!important;border:1px solid var(--ws-line)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .pin-box>.user-name{color:var(--ws-text)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .pin-back{background:var(--ws-panel)!important;border:1px solid var(--ws-line)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .login-error{color:var(--danger-text)!important}
@media(min-width:1500px){}
@media(max-width:1200px){}
@media(max-width:760px){html[data-ws-theme] body.tfb-crm .proto-app.menu-open .proto-mobile-shade{background:#18212f55!important}
}
@media(prefers-reduced-motion:reduce){}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .task.is-urgent{border:1px solid var(--danger-text)!important;border-top:3px solid var(--danger-text)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .column[data-status=todo] h2:before{background:var(--ws-muted)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .column[data-status=doing] h2:before{background:var(--ws-primary)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .column[data-status=waiting] h2:before{background:var(--warning-text)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .column[data-status=postponed] h2:before{background:var(--ws-muted)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .column[data-status=done] h2:before{background:var(--success-text)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean [id$=currentUserBadge]{border:1px solid var(--ws-line)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean [id$=currentUserBadge]:after{color:var(--ws-muted)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .today .day-num{background:var(--ws-primary)!important;color:#fff!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .task-desc{color:var(--ws-muted)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .task-creator{color:var(--ws-muted)!important}
@media(max-width:760px){}
html[data-ws-theme] body.tfb-crm [data-crm-native].org-clean .task.is-urgent{border:1px solid var(--danger-text)!important;border-top:3px solid var(--danger-text)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .org-shortcuts{color:var(--ws-muted)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .org-shortcut-links a{border:1px solid var(--ws-line)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .org-connection>summary:before{background:var(--ws-muted)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .event-place{color:var(--ws-muted)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .event-panel-note{color:var(--ws-muted)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm .org-clean .create-form-actions{background:var(--ws-panel)!important;border-top:1px solid var(--ws-line)!important}
@media(max-width:1250px){}
@media(max-width:760px){}
@media(max-width:380px){}
html[data-ws-theme] body.tfb-crm.tfb-crm [data-crm-native].org-clean .modal{background:var(--overlay)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm [data-crm-native].org-clean .modal-content{background:var(--ws-panel)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm [data-crm-native].org-clean .modal-header,html[data-ws-theme] body.tfb-crm.tfb-crm [data-crm-native].org-clean .modal-footer{background:var(--ws-panel)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm [data-crm-native].org-clean .pin-overlay{background:var(--overlay)!important}
html[data-ws-theme] body.tfb-crm.tfb-crm [data-crm-native].org-clean .pin-box{background:var(--ws-panel)!important}
@media(max-width:760px){}

html[data-ws-theme] body.tfb-crm [data-crm-native].org-clean{--shadow:0 1px 3px transparent!important;--shadow-lg:0 16px 50px var(--overlay)!important}html[data-ws-theme] body.tfb-crm .crm-native .today .day-num{color:white!important}html[data-ws-theme] body.tfb-crm .crm-native [data-external-notice]{background:var(--warning-bg);color:var(--warning-text);padding:12px;border-radius:10px;font-size:12px;margin-bottom:12px}

html[data-ws-theme=light]{color-scheme:light}html[data-ws-theme=medium],html[data-ws-theme=dark]{color-scheme:dark}
