/* FA DESIGN — feuille de style */
:root{--accent:#209151;--accent-dark:#1d8349;--accent-soft:#e9f6ef;--line:#e8edea;--muted:#868c89;--text:#343b38;--ok:#289575;--bad:#d85a6a;--warn:#dcaa38;font-family:Inter,'Segoe UI',Arial,sans-serif;font-size:13px;color:var(--text);background:#fff}
*{box-sizing:border-box}
body{margin:0}
button,input,select,textarea{font:inherit}
button{cursor:pointer;color:inherit;border:0;background:none;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:30px}
button:disabled{opacity:.5;cursor:wait}
a{color:inherit;text-decoration:none}
svg{width:16px;height:16px;flex-shrink:0;stroke-width:1.8}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid #25a75d;outline-offset:2px}
input,select,textarea{border:1px solid #e0e9e4;background:#fff;border-radius:5px;padding:8px 10px;color:#58655e;max-width:100%;min-width:0}
select{font-size:12px}
textarea{resize:vertical;min-height:90px;line-height:1.5}
h1{font-size:23px;font-weight:650;letter-spacing:-.4px;margin:0 0 5px;color:#313c37;overflow-wrap:anywhere}
h2{font-size:14px;font-weight:600;margin:0;display:flex;align-items:center;gap:10px}
h3{font-size:13px;font-weight:600;margin:0}
p{color:var(--muted);line-height:1.6;margin:5px 0;font-size:12px}
.muted{color:var(--muted)}
.boot{display:grid;place-items:center;min-height:100vh;color:var(--muted)}

/* Barre du haut */
.topbar{position:fixed;inset:0 0 auto;height:52px;background:#f7f9f8;border-bottom:1px solid #dfe6e1;display:flex;align-items:center;gap:16px;padding:0 18px;z-index:20}
.top-brand{font-weight:650;gap:10px;font-size:12px;white-space:nowrap;color:#253d30}
.company-logo{height:36px;max-width:70px;object-fit:contain;mix-blend-mode:multiply}
.top-separator{opacity:.35;margin:0 4px}
.top-workspace{font-weight:400;color:#68796e;font-size:11px}
.global-search{position:absolute;left:50%;transform:translateX(-50%);width:360px;max-width:30vw;border:1px solid #e0e5e2;border-radius:6px;background:#fff;color:#647268;justify-content:flex-start;padding:0 12px;font-size:11px}
.global-search kbd{margin-left:auto;font-size:9px;border:1px solid #e0e5e2;padding:2px 4px;border-radius:3px;color:#728276}
.top-create{margin-left:auto;font-size:11px;color:#19713f;gap:6px}
.top-user{display:flex;align-items:center;gap:8px;font-size:11px;color:#526159}
.top-avatar{height:28px;width:28px;background:var(--accent-soft);color:#1e894d;border-radius:50%;display:grid;place-items:center;font-size:10px;font-weight:600}

/* Menu latéral */
aside{position:fixed;top:52px;bottom:0;left:0;width:250px;background:#f8fbf9;border-right:1px solid #e4e9e6;display:flex;flex-direction:column;padding:16px 10px 14px;z-index:10;transition:transform .2s}
.workspace{display:flex;gap:10px;align-items:center;padding:4px 8px 16px;margin:0 0 12px;border-bottom:1px solid var(--line)}
.workspace-logo{height:44px;max-width:66px;object-fit:contain;mix-blend-mode:multiply}
.workspace strong{font-size:13px;flex:1}
.workspace small{font-size:10px;color:#89928e;display:block;margin-top:3px;font-weight:400}
nav{display:grid;gap:2px}
nav button{justify-content:flex-start;padding:7px 12px;font-size:12px;font-weight:450;color:#646b68;min-height:33px;border-radius:5px}
nav button.active{background:var(--accent-soft);color:#1e894d;font-weight:600}
nav button:hover,.project-nav button:hover{background:#edf2ef}
.count{color:#8e9692;font-size:10px;margin-left:auto}
.count:empty{display:none}
.side-heading{display:flex;align-items:center;justify-content:space-between;font-size:10px;letter-spacing:.8px;margin:22px 12px 6px;color:#949b98;font-weight:700}
.side-heading button{min-height:22px}
.side-heading svg{width:14px}
.project-nav{display:grid;gap:3px;overflow-y:auto;overflow-x:hidden;flex:1;min-height:50px;align-content:start;margin:4px 0}
.project-nav>span{font-size:11px;padding:8px 12px}
.project-nav button{justify-content:flex-start;width:100%;min-width:0;text-align:left;padding:7px 9px;font-size:11px;color:#67706c;border-radius:5px;gap:7px;overflow:hidden}
.project-nav button>svg:first-child{width:11px}
.project-nav button>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.project-nav .selected{background:#eef3f0;color:#4c5952;font-weight:600}
.project-children{margin:3px 0 8px 22px;border-left:1px solid #dde8e2;padding-left:8px}
.project-children button{min-height:28px}
.project-children button.active{background:#eaf7f0;color:#1f8d4f}
.sidebar-add{justify-content:flex-start;color:#939b97;font-size:11px;padding:7px 13px;flex-shrink:0}
.side-bottom{border-top:1px solid var(--line);padding:12px 10px 0;color:#747c78;font-size:11px;display:flex;align-items:center;gap:8px;flex-shrink:0}
.side-bottom small{display:block;font-size:9px;margin-top:2px}
.online-dot{width:7px;height:7px;border-radius:50%;background:#53b299;margin-left:auto;flex-shrink:0}
.online-dot.off{background:#d85a6a}

/* Contenu */
.shell{margin-left:250px;padding-top:52px;min-height:100vh;display:flex;flex-direction:column;min-width:0}
header{height:46px;padding:0 27px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:12px}
.breadcrumb{display:flex;align-items:center;gap:10px;font-size:11px;color:#919b96;min-width:0;flex:1;overflow:hidden}
.breadcrumb strong{color:#5e6a64;font-weight:450;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.breadcrumb svg{width:13px}
.header-count{font-size:10px;color:#939996;white-space:nowrap}
main{padding:25px 28px 40px;width:100%;flex:1;min-width:0}
footer{display:flex;justify-content:space-between;padding:14px 28px;border-top:1px solid #f0f2f0;color:#a6afaa;font-size:9px}
.page-heading{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:19px;flex-wrap:wrap}
.page-heading p{font-size:11px;color:#919b96}
.heading-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}

/* Boutons */
.primary,.secondary,.danger{padding:7px 12px;border-radius:6px;font-weight:500;font-size:11px;white-space:nowrap}
.primary{background:var(--accent);color:#fff;border:1px solid var(--accent)}
.primary:hover{background:var(--accent-dark)}
.secondary{background:#fff;border:1px solid #dde7e1}
.secondary:hover{background:#f5f9f7}
.danger{background:#fff;color:#c04556;border:1px solid #f0cdd3}
.danger:hover{background:#fdf2f4}
.icon{width:32px;height:32px;border:1px solid #e0ebe5;border-radius:5px}
.text-button{font-size:11px;color:#1f8f50;display:inline-flex;align-items:center;gap:6px;min-height:24px}
.text-button.red{color:#c04556}
.text-button svg{width:13px}

/* Indicateurs */
.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:8px 0 26px}
.metric{border:1px solid var(--line);padding:16px;border-radius:8px;min-width:0}
.metric>div{font-size:10px;color:var(--muted);display:flex;align-items:center;justify-content:space-between;gap:8px}
.metric svg{color:#9faaa5}
.metric>strong{display:block;font-size:24px;font-weight:600;letter-spacing:-.5px;margin-top:12px;overflow-wrap:anywhere}
.metric small{display:block;font-size:10px;color:var(--muted);margin-top:4px}
.positive{color:var(--ok)}
.negative{color:var(--bad)}
.section-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:24px 0 14px;flex-wrap:wrap}
.section-toolbar h2{font-size:13px}
.search{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:5px;padding:0 10px;color:#8b9690}
.search input{border:0;background:none;width:190px;padding:8px 0}

/* Cartes chantiers */
.project-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.project-card{display:block;text-align:left;border:1px solid var(--line);border-radius:9px;padding:20px;min-width:0;transition:border-color .15s,box-shadow .15s}
.project-card:hover{border-color:#25a75d;box-shadow:0 4px 14px #68907c11}
.card-top{display:flex;align-items:center;gap:8px;margin-bottom:16px}
.card-top>.badge{margin-left:auto}
.project-symbol{width:36px;height:36px;display:grid;place-items:center;border-radius:7px;background:#ecf7f1;color:#1f8e4f}
.project-card h3{font-size:15px;overflow-wrap:anywhere}
.project-card p{margin:3px 0 0}
.address{display:flex;gap:6px;align-items:center;font-size:11px;color:#89928d;min-height:30px;margin:10px 0 12px}
.address svg{width:13px}
.budget-line{display:flex;flex-wrap:wrap;gap:5px;justify-content:space-between;font-size:10px;color:#818c85}
.budget-line strong{color:#485c50;font-weight:500}
.bar{height:6px;border-radius:3px;background:#edf1ee;margin:9px 0 18px;overflow:hidden}
.bar>span{display:block;height:100%;background:#25a75d;border-radius:3px}
.bar>span.over{background:var(--bad)}
.card-bottom{display:flex;justify-content:space-between;gap:8px;font-size:10px;color:#77887d;padding-top:12px;border-top:1px solid #edf0ee}
.card-bottom span{display:flex;align-items:center;gap:5px}
.card-bottom svg{width:13px}
.badge{display:inline-flex;align-items:center;padding:4px 8px;background:#f0f2f1;color:#6d7971;border-radius:4px;font-size:10px;white-space:nowrap;font-weight:500}
.badge.green{background:#e3f5ec;color:#279868}
.badge.orange{background:#fdf3df;color:#b07d14}
.badge.red{background:#fbe9e9;color:#ba5353}
.badge.blue{background:#e8effc;color:#4a6fbf}
.empty{min-height:220px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:15px;color:#8b9690;text-align:center}
.empty>svg{width:32px;height:32px;color:#abc0b5}
.empty h3{font-weight:500;color:#87938d}

/* Onglets */
.tabs{display:flex;gap:23px;border-bottom:1px solid var(--line);margin:0 0 20px;overflow-x:auto}
.tabs button{padding:9px 0 11px;font-size:11px;color:#7d8882;border-bottom:2px solid transparent;white-space:nowrap;border-radius:0}
.tabs button.active{color:#219654;border-color:#219654;font-weight:600}
.overview-grid{display:grid;grid-template-columns:1.15fr 1fr;gap:32px}
.overview-grid>section+section{border-left:1px solid var(--line);padding-left:28px}
.info-list{display:grid;grid-template-columns:auto 1fr;gap:8px 16px;font-size:12px;margin:10px 0}
.info-list dt{color:var(--muted)}
.info-list dd{margin:0}

/* Graphique */
.chart-wrap{display:flex;align-items:center;justify-content:center;gap:40px;min-height:250px;padding:20px 0;flex-wrap:wrap}
.donut{width:190px;height:190px;border-radius:50%;display:grid;place-items:center;flex-shrink:0}
.donut>div{width:146px;height:146px;background:#fff;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px}
.donut small{font-size:10px;color:var(--muted)}
.donut strong{font-size:21px;font-weight:600;color:#3a4740}
.legend{display:grid;gap:16px;min-width:210px}
.legend>div{display:flex;align-items:center;gap:9px;font-size:11px;color:#83908a}
.legend strong{color:#4c5952;margin-left:auto;font-weight:600;padding-left:12px}
.dot{height:8px;width:8px;border-radius:50%;flex-shrink:0}
.task-preview>div{display:flex;align-items:center;gap:10px;border-bottom:1px solid var(--line);padding:13px 0}
.task-preview>div>svg{color:#a3b4a9;width:14px}
.task-preview>div>div{flex:1;min-width:0}
.task-preview strong{font-size:12px;font-weight:500}
.task-preview small,td small{display:block;font-size:10px;color:var(--muted);margin-top:4px}
.team-summary{border-top:1px solid var(--line);padding:18px 0}
.avatar-list{display:flex;gap:7px;margin-top:12px;flex-wrap:wrap}
.avatar{width:26px;height:26px;display:inline-flex;align-items:center;justify-content:center;background:#eaf7f0;color:#1f8c4e;font-weight:600;font-size:9px;border-radius:50%;flex-shrink:0}
.insights{display:grid;gap:10px;margin-top:6px}
.insight{display:flex;gap:10px;align-items:flex-start;padding:12px 14px;border-radius:7px;background:#f6fbf8;font-size:12px;line-height:1.5}
.insight svg{margin-top:2px}
.insight.bad{background:#fdf1f3;color:#9f3c4b}
.insight.warn{background:#fdf7e8;color:#8a6510}
.insight.good{background:#eef8f3;color:#24785e}

/* Tableaux */
.table-scroll{overflow-x:auto;border:1px solid #ecf1ee;border-radius:6px}
table{border-collapse:collapse;width:100%;text-align:left;font-size:12px}
th{font-size:10px;font-weight:450;color:#9aa7a0;background:#fff;padding:10px 14px;height:34px;white-space:nowrap}
td{padding:8px 14px;border-top:1px solid #edf2ef;font-size:11px;height:46px}
th+th,td+td{border-left:1px solid #eef4f1}
td.num,th.num{text-align:right;white-space:nowrap}
tbody tr:hover{background:#fafdfb}
td strong{font-weight:500}
.person{display:flex;align-items:center;gap:10px}
.row-actions{display:flex;gap:10px;flex-wrap:wrap}
tr.inactive td{opacity:.55}

/* Équipe */
.worker-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.worker{display:flex;align-items:center;gap:14px;border:1px solid var(--line);border-radius:6px;padding:18px}
.worker>strong{margin-left:auto;font-size:13px;white-space:nowrap}
.worker small{display:block;font-weight:400;font-size:10px;color:var(--muted)}

/* Tâches */
.viewbar{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);height:43px}
.view-switch{display:flex;gap:22px;height:100%}
.view-switch button{border-bottom:2px solid transparent;padding:0 2px;font-size:11px;color:#86908b;gap:7px;border-radius:0}
.view-switch button.active{color:#1f8f50;border-bottom-color:#1f8f50;font-weight:600}
.view-total{font-size:10px;color:#97a19c}
.task-toolbar{display:flex;align-items:center;gap:12px;margin:18px 0 24px;flex-wrap:wrap}
.task-search{display:flex;gap:7px;align-items:center;color:#9ea7a2;min-width:120px;flex:1}
.task-search input{border:0;padding:7px 0;font-size:11px;width:100%;max-width:260px;background:none}
.task-filters{display:flex;gap:10px}
.task-filters label{display:flex;align-items:center;border:1px solid #e8eeeb;border-radius:5px;padding-left:8px;color:#a5b0ab}
.task-filters label>svg{width:12px;height:12px}
.task-filters select{border:0;padding:6px;font-size:10px;background:none;max-width:160px;color:#84918b}
.task-groups{display:grid;gap:26px;grid-template-columns:minmax(0,1fr)}
.task-group{min-width:0}
.group-heading{display:flex;align-items:center;gap:9px;min-height:33px;margin:0 0 9px}
.collapse-group{width:18px;color:#96a49d;min-height:24px}
.collapse-group svg{width:12px}
.status-pill{display:flex;align-items:center;gap:6px;text-transform:uppercase;font-size:9px;font-weight:650;letter-spacing:.4px;border-radius:4px;padding:4px 8px}
.status-pill svg{width:11px;height:11px}
.status-pill.todo{background:#eef3f0;color:#7c8681}
.status-pill.doing{background:#ecf7f1;color:#229d57}
.status-pill.done{background:#ddf4e9;color:#2d9a74}
.group-count{font-size:10px;color:#9aa6a0}
.group-add{color:#a8b3ae;min-height:23px;width:24px}
.task-table table{min-width:640px}
.task-table th:first-child{width:43%;min-width:240px;padding-left:18px}
.task-table td:first-child{padding-left:18px}
.task-title{display:flex;align-items:center;gap:10px;text-align:left;font-size:12px;font-weight:450;line-height:1.45;min-height:27px;justify-content:flex-start;padding:0;width:100%;color:#49544e}
.task-title:hover{color:#1f8c4e}
.task-title small{font-size:9px;color:#a5b2ac;margin-top:2px}
.task-status-dot{height:12px;width:12px;border:1.8px solid #beccc4;border-radius:50%;flex-shrink:0}
.task-status-dot.doing{border-color:#25a75d;background:#e7f6ee}
.task-status-dot.done{border-color:#55b990;background:#d4f0e4}
.task-person{display:inline-flex;align-items:center;gap:7px;font-size:10px;color:#7d8d85;max-width:190px}
.task-person>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.unassigned{font-size:10px;color:#acb7b2}
.priority{display:inline-flex;align-items:center;gap:5px;font-size:10px;white-space:nowrap}
.priority svg{width:12px;height:12px}
.priority.high{color:var(--warn)}
.priority.urgent{color:#dc617b}
.priority.normal{color:#9199b2}
.overdue{color:#d87582}
.status-select{border:0;background:#f2f9f5;color:#859c90;border-radius:4px;font-size:10px;padding:5px 7px;max-width:110px;min-height:25px}
.add-row{width:100%;justify-content:flex-start;min-height:34px;font-size:10px;color:#a4b4ac;gap:9px;padding:5px 18px;border-top:1px solid #edf2ef;border-radius:0}
.add-row:hover{background:#f9fcfa;color:#209151}
.kanban{display:grid;gap:17px;grid-template-columns:repeat(3,minmax(0,1fr));align-items:start}
.kanban>section{background:#f7faf8;border:1px solid #ebf3ee;border-radius:8px;padding:13px;min-height:280px}
.kanban>section.doing{background:#f7fcf9}
.kanban>section.done{background:#f5faf8}
.kanban .group-add{margin-left:auto}
.task-card{background:#fff;border:1px solid #e5f0ea;border-radius:7px;padding:14px;margin-bottom:11px}
.task-card .task-title{margin:8px 0 14px;font-weight:550}
.task-project{font-size:9px;color:#a3b5ac;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.task-card-meta{display:flex;justify-content:space-between;gap:5px;font-size:9px;color:#a2b2aa;align-items:center}
.task-card-bottom{display:flex;align-items:center;justify-content:space-between;border-top:1px solid #eff6f2;padding-top:10px;margin-top:12px;gap:8px}
.task-card-bottom .task-person>span:last-child{display:none}
.board-empty{height:110px;display:grid;place-items:center;font-size:10px;color:#aab8b1;text-align:center}
.calendar-toolbar{display:flex;justify-content:space-between;align-items:center;margin:0 0 15px}
.calendar-toolbar h2{text-transform:capitalize;font-size:15px}
.calendar-toolbar>div{display:flex;gap:5px}
.calendar-scroll{overflow:auto;border:1px solid var(--line);border-radius:7px}
.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));min-width:660px}
.calendar-weekday{background:#f8fcfa;padding:10px;text-align:center;color:#92a39a;font-size:10px;border-right:1px solid var(--line)}
.calendar-day{min-height:104px;border-top:1px solid var(--line);border-right:1px solid var(--line);padding:6px;overflow:hidden}
.calendar-day.outside{background:#fbfdfc}
.calendar-number{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;font-size:10px;color:#92a59c;margin-bottom:4px}
.calendar-number.today{background:#229d58;color:#fff}
.calendar-task{font-size:10px;display:block;text-align:left;width:100%;border-radius:4px;padding:5px 6px;margin-bottom:4px;white-space:normal;overflow-wrap:anywhere;background:#edf5f0;color:#83988e;min-height:24px}
.calendar-task.doing{background:#e9f6ef;color:#219654}
.calendar-task.done{background:#e4f5ed;color:#4f9f7b}
.calendar-note{font-size:10px;margin-top:12px}

/* Pointage */
.point-controls{display:flex;gap:18px;align-items:flex-end;padding:6px 0 20px;flex-wrap:wrap}
.point-controls label{display:grid;gap:7px;color:#738279;font-size:11px}
.rate-tag{display:flex;align-items:center;gap:10px;color:#1f8c4e;background:#f1f9f4;padding:11px;border-radius:5px;font-size:12px}
.form-footer{display:flex;justify-content:space-between;gap:16px;align-items:center;padding:18px 0;font-size:12px;color:var(--muted)}
td input{min-width:150px;width:100%}
.budget-summary{display:flex;justify-content:space-between;padding:14px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);font-size:12px}

/* Plans */
.plan-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.plan-card{border:1px solid var(--line);border-radius:7px;overflow:hidden;min-width:0}
.plan-preview{height:150px;background:#f2f9f5;display:flex;align-items:center;justify-content:center}
.plan-preview>svg{width:46px;height:46px;color:#95b1a3}
.plan-preview img{width:100%;height:100%;object-fit:contain}
.plan-card>div{padding:15px}
.plan-card h3{overflow-wrap:anywhere}
.plan-card p{margin:7px 0}
.plan-card .row-actions{margin-top:8px}
.progress{height:8px;border-radius:4px;background:#ebf5ef;overflow:hidden;margin-top:6px}
.progress>span{display:block;height:100%;width:0;background:var(--accent);transition:width .2s}

/* Fenêtres */
dialog{border:1px solid #dce9e2;border-radius:10px;padding:0;width:500px;max-width:calc(100vw - 24px);max-height:90vh;box-shadow:0 24px 80px #16362326;color:#4c5f56}
dialog::backdrop{background:#19713f40;backdrop-filter:blur(2px)}
.modal-heading{display:flex;align-items:center;justify-content:space-between;padding:18px 24px;border-bottom:1px solid var(--line)}
.modal-heading h2{font-size:16px}
.modal-heading .icon{border:0}
.modal-fields{display:grid;gap:16px;padding:22px 24px}
.modal-fields label{display:grid;gap:7px;font-size:12px;color:#76837c}
.modal-fields input,.modal-fields select,.modal-fields textarea{width:100%}
.two-col{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.modal-footer{display:flex;gap:10px;justify-content:flex-end;align-items:center;padding:14px 24px;border-top:1px solid var(--line);background:#fff;position:sticky;bottom:0}
.modal-footer .danger{margin-right:auto}
#form-error{color:#be4747;padding:0 24px;margin:0 0 10px}
#form-error:empty{display:none}
.check-list{max-height:300px;overflow:auto;display:grid;gap:2px}
.check-list label{display:flex;align-items:center;gap:10px;padding:9px 0;border-bottom:1px solid var(--line)}
.check-list input{width:16px;accent-color:var(--accent)}
.check-list small{margin-left:auto;color:var(--muted)}
dialog.task-drawer{position:fixed;inset:52px 0 0 auto;margin:0;width:520px;max-width:100vw;height:calc(100vh - 52px);max-height:none;border-radius:0;border:0;border-left:1px solid #ddebe3;box-shadow:-12px 0 70px #19713f20}
.task-drawer .modal-fields label:first-of-type>input{font-size:18px;font-weight:600;border:0;border-bottom:1px solid #e7f2ec;border-radius:0;padding:8px 0;color:#41564c}
.drawer-location{display:flex;align-items:center;gap:7px;color:#a1b3aa;font-size:11px}
.hint{font-size:11px;color:var(--muted);margin:0}

#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);max-width:90vw;background:#19713f;color:#fff;padding:12px 20px;border-radius:6px;box-shadow:0 5px 20px #0002;font-size:12px;display:none;z-index:60}
#toast.show{display:block}
#toast.error{background:#a53e3e}
#install-app{position:fixed;bottom:18px;right:18px;z-index:40;border:1px solid #25a75d;background:var(--accent);color:#fff;border-radius:8px;padding:10px 16px;box-shadow:0 4px 20px #2b3a3330;font-size:12px}
#install-app[hidden]{display:none}

/* Réglages */
.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.settings-grid section{border:1px solid var(--line);padding:20px;border-radius:9px;min-width:0}
.settings-grid p{margin:10px 0}
.settings-grid .row-actions{margin-top:12px}
.audit-list details{border:1px solid var(--line);border-radius:6px;padding:12px;margin-bottom:8px}
.audit-list summary{cursor:pointer;font-size:12px}
.audit-diff{display:grid;grid-template-columns:1fr 1fr;gap:15px;padding-top:12px}
.audit-diff pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:10px;background:#f5f9f7;padding:10px;border-radius:6px;max-height:300px;overflow:auto}

/* Connexion */
.login-screen{max-width:420px;margin:9vh auto;padding:28px}
.login-screen>img{height:90px;display:block;margin:0 auto 22px;mix-blend-mode:multiply}
.login-screen h1{font-size:22px;text-align:center}
.login-screen>p{text-align:center}
.login-screen form,.login-screen label{display:grid;gap:10px}
.login-screen form{gap:18px;margin-top:22px}
.login-screen label{font-size:12px;color:#76837c}
.login-screen #login-error{color:#b1394c;min-height:1em}
.login-screen button{min-height:40px}

/* Écrans moyens */
@media(max-width:1150px){
  aside{width:220px}.shell{margin-left:220px}
  .top-workspace,.top-separator{display:none}
  main{padding:22px}
  .project-grid,.plan-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .overview-grid{grid-template-columns:1fr}
  .overview-grid>section+section{border-left:0;padding-left:0;border-top:1px solid var(--line);padding-top:10px}
  .metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
}
/* Téléphone */
@media(max-width:760px){
  .topbar{gap:8px;padding:0 10px;z-index:30}
  .top-brand .company-name{display:none}
  .global-search{position:static;transform:none;width:32px;max-width:none;overflow:hidden;font-size:0;padding:0 7px;margin-left:auto;border:0;background:none}
  .global-search kbd{display:none}
  .top-create{font-size:0;margin:0;gap:0}
  .top-user>span:last-child{display:none}
  aside{width:250px;transform:translateX(-100%);z-index:25}
  .menu-open aside{transform:translateX(0);box-shadow:30px 0 100vw 100vw #19713f40}
  .shell{margin-left:0}
  .mobile-menu{display:flex}
  header{padding:0 14px}
  .header-count{display:none}
  main{padding:20px 14px}
  h1{font-size:20px}
  .project-grid,.worker-grid,.plan-grid,.settings-grid,.audit-diff,.two-col{grid-template-columns:1fr}
  .metrics{gap:9px}
  .metric{padding:12px}.metric>strong{font-size:19px}
  .kanban{display:flex;overflow:auto;gap:12px;padding-bottom:12px;scroll-snap-type:x mandatory}
  .kanban>section{flex:0 0 85%;scroll-snap-align:start}
  .task-filters{width:100%}
  .search{width:100%}.search input{width:100%}
  .chart-wrap{gap:24px}.legend{width:100%}
  .form-footer{flex-direction:column;align-items:stretch}
  #point-form .table-scroll{border:0}
  #point-form table,#point-form tbody{display:block}
  #point-form thead{display:none}
  #point-form tbody tr{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:14px 0;border-bottom:1px solid var(--line)}
  #point-form td{display:block;padding:0;border:0;height:auto}
  #point-form td:first-child{grid-column:1/-1}
  #point-form td:nth-child(3){align-self:center;text-align:right}
  #point-form td:nth-child(4){grid-column:1/-1}
  #point-form td select,#point-form td input{width:100%;min-width:0}
  dialog.task-drawer{inset:52px 0 0 0;width:100vw}
  footer{padding:14px}
}
.mobile-menu{display:none}
@media(max-width:760px){.mobile-menu{display:flex;border:0}}
@media print{aside,.topbar,header,footer,#install-app,.primary,.secondary,.text-button{display:none!important}.shell{margin:0;padding:0}}

/* Couleurs de marque FA DESIGN : vert du logo + anthracite. « En cours » en bleu. */
:root{--accent:#1f8e4f;--accent-dark:#177541;--accent-soft:#e3f3e9;--text:#1c2321}
.status-pill.doing{background:#e6eefb;color:#3f67b5}
.task-status-dot.doing{border-color:#7f9fdc;background:#e4ecfb}
.calendar-task.doing{background:#e6eefb;color:#3f67b5}
.kanban>section.doing{background:#f5f8fe}
.status-pill.done{background:#ddf4e9;color:#1f8e4f}
.company-logo,.workspace-logo{mix-blend-mode:normal}
.company-logo{height:30px;width:auto}
.workspace-logo{height:40px;width:auto}
.login-screen>img{height:150px;mix-blend-mode:normal}
/* Identité v2 */
:root{--accent:#1a8048;--accent-dark:#136238;--accent-soft:#e2f2e8;--text:#1a1f1d}
.login-screen>img{height:190px}

/* Comptes rendus */
.report-filter{margin:0 0 14px;width:max-content;max-width:100%;overflow-x:auto}
.report-filter .count{margin-left:4px}
.report-list{display:grid;gap:10px}
.report-card{display:flex;align-items:flex-start;gap:14px;width:100%;text-align:left;border:1px solid var(--line);border-radius:9px;padding:16px 18px;background:#fff;transition:border-color .15s,box-shadow .15s}
.report-card:hover{border-color:#bfdccb;box-shadow:0 6px 20px #1a804812}
.report-card>svg{margin-left:auto;align-self:center;color:#a3b4a9;flex-shrink:0}
.report-icon{width:36px;height:36px;border-radius:8px;display:grid;place-items:center;flex-shrink:0;background:var(--accent-soft);color:var(--accent)}
.report-icon.architecte{background:#e8effc;color:#4a6fbf}
.report-body{display:grid;gap:5px;min-width:0;flex:1}
.report-top{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.report-top strong{font-size:14px;font-weight:600}
.report-top .badge svg,.report-body small svg{width:12px;height:12px;margin-right:3px;vertical-align:-2px}
.report-body small{color:var(--muted);font-size:11px}
.report-excerpt{color:#5d6a64;font-size:12px;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.report-back{margin:0 0 12px}
.report-doc{border:1px solid var(--line);border-radius:10px;padding:26px 30px;max-width:860px}
.report-doc-head h2{font-size:20px;margin:10px 0 6px}
.report-doc-head p{color:var(--muted);margin:4px 0}
.report-doc-head p strong{color:var(--text);font-weight:500}
.report-actions{margin:18px 0 6px;flex-wrap:wrap}
.report-file{display:flex;align-items:center;gap:12px;border:1px solid var(--line);border-radius:8px;padding:12px 14px;margin:16px 0;flex-wrap:wrap}
.report-file>div{flex:1;min-width:160px;display:grid;gap:3px}
.report-file small{color:var(--muted)}
.report-file>svg{color:var(--accent);width:22px;height:22px}
.report-image{max-width:100%;border-radius:8px;border:1px solid var(--line);margin:0 0 16px}
.report-text{font-size:14px;line-height:1.65;color:#2b3330;margin-top:18px}
.report-text h3{font-size:14px;font-weight:700;color:var(--accent-dark);margin:20px 0 6px;text-transform:uppercase;letter-spacing:.03em}
.report-text h3:first-child{margin-top:0}
.report-text p{margin:0 0 10px}
.report-text ul,.report-text ol{margin:0 0 10px;padding-left:20px}
.report-text li{margin:3px 0}
.report-draft{margin-top:20px;border-top:1px solid var(--line);padding-top:12px}
.report-draft summary{cursor:pointer;color:var(--muted);font-size:12px}
.report-draft .report-text{font-size:13px;color:#5d6a64}
.ai-loading{display:flex;align-items:center;gap:16px;padding:30px 0;color:#4c5f56;line-height:1.6}
.ai-loading small{color:var(--muted)}
.spinner{width:28px;height:28px;border-radius:50%;border:3px solid var(--accent-soft);border-top-color:var(--accent);animation:spin .8s linear infinite;flex-shrink:0}
@keyframes spin{to{transform:rotate(360deg)}}
.ai-tasks{border:1px solid var(--line);border-radius:8px;padding:12px 14px;display:grid;gap:10px;margin:0}
.ai-tasks legend{padding:0 6px;font-weight:600;color:var(--text);display:flex;align-items:center;gap:6px}
.ai-tasks legend small{font-weight:400;color:var(--muted)}
.ai-tasks legend svg{width:15px;height:15px;color:var(--accent)}
.modal-fields .ai-tasks label{display:flex;gap:10px;align-items:flex-start;color:var(--text);font-size:13px}
.ai-tasks input{width:auto!important;margin-top:3px}
.ai-tasks label span{display:grid;gap:2px}
.ai-tasks label small{color:var(--muted);font-size:11px}
.ai-summary{background:#f6fbf8;border-radius:8px;padding:14px 16px}
.ai-summary h3{display:flex;align-items:center;gap:6px;font-size:13px;margin:0}
.ai-summary h3 svg{width:15px;color:var(--accent)}
.ai-summary .report-text{margin-top:8px;font-size:13px}
.modal-fields .inline-check{display:flex;align-items:center;gap:8px;color:var(--text);font-size:13px}
.modal-fields .inline-check input{width:auto}
.steps{margin:0;padding-left:18px;line-height:1.7;color:#4c5f56}
.steps a{color:var(--accent)}
.modal-footer button[value=ia]{display:inline-flex;align-items:center;gap:6px}
dialog.task-drawer .modal-fields textarea{min-height:200px}
@media(max-width:760px){.report-doc{padding:18px 16px}.report-card{padding:14px}.report-text{font-size:14px}}

/* Impression / PDF d'un compte rendu */
#print-area{display:none}
@media print{
  @page{size:A4;margin:16mm 15mm}
  body.printing-report>*:not(#print-area){display:none!important}
  body.printing-report #print-area{display:block}
  .print-doc{font-family:Inter,'Segoe UI',Arial,sans-serif;color:#1a1f1d;font-size:11pt}
  .print-head{display:flex;justify-content:space-between;align-items:center;border-bottom:3px solid #1a8048;padding-bottom:10px;margin-bottom:14px}
  .print-head img{height:58px;width:auto}
  .print-head div{text-align:right;display:grid;gap:3px}
  .print-head strong{font-size:13pt;text-transform:uppercase;letter-spacing:.04em}
  .print-head span{color:#555}
  .print-info{border-collapse:collapse;width:100%;margin:0 0 14px;font-size:10pt}
  .print-info th{text-align:left;width:110px;color:#1a8048;font-weight:600;padding:3px 10px 3px 0;vertical-align:top}
  .print-info td{padding:3px 0}
  .print-doc h1{font-size:15pt;margin:8px 0 10px}
  .print-doc .report-text{font-size:11pt;line-height:1.5;color:#1a1f1d;margin:0}
  .print-doc .report-text h3{color:#136238;font-size:11pt;break-after:avoid}
  .print-doc li,.print-doc p{break-inside:avoid}
  .print-foot{margin-top:24px;border-top:1px solid #ccc;padding-top:6px;font-size:8.5pt;color:#777;text-align:center}
}
.report-filter button{padding:8px 2px}
@media print{.print-info,.print-info tbody{display:table!important;width:100%}.print-info tr{display:table-row!important}.print-info th,.print-info td{display:table-cell!important;border:0;border-bottom:1px solid #e3e7e4}}
@media print{.print-info th,.print-info td{height:auto!important;vertical-align:top!important;padding:4px 10px 4px 0!important;font-size:10pt;line-height:1.4;white-space:normal}}
