:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#20312e;background:#fbfaf8;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}.app{display:flex;min-height:100vh}.sidebar{width:276px;flex-shrink:0;background:#f7f6f3;border-right:1px solid #e3e1dc;display:flex;flex-direction:column;padding:24px 17px;position:sticky;top:0;height:100vh}.brand{display:flex;align-items:center;gap:12px;margin-bottom:46px}.logo{background:#154638;color:#fff;border-radius:13px;width:48px;height:48px;display:grid;place-items:center;font-weight:700;font-size:19px}.brand strong,.account strong{display:block;font-size:15px}.brand small,.account small{display:block;color:#738480;letter-spacing:2px;font-size:10px;margin-top:3px}nav{display:grid;gap:6px}nav button{border:0;background:transparent;color:#687b77;text-align:left;border-radius:13px;padding:15px 14px;font-size:15px;font-weight:600}nav button:hover{background:#eaece8}nav button.active{background:#154638;color:white}.account{margin-top:auto;border-top:1px solid #e3e1dc;padding-top:18px;display:flex;gap:12px;align-items:center}.avatar{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:#eeeae4;color:#154638;font-size:12px;font-weight:700}.main{flex:1;min-width:0;padding:34px 46px 24px;overflow:hidden}header{display:flex;justify-content:space-between;align-items:center;gap:20px;border-bottom:1px solid #e4e1dc;padding-bottom:29px;margin-bottom:28px}.eyebrow{letter-spacing:3px;color:#6c807a;font-size:12px;font-weight:700}h1{font-weight:500;letter-spacing:-1.7px;font-size:clamp(27px,3vw,42px);margin:10px 0 7px}header p{color:#738480;margin:0;font-size:16px}.primary{background:#154638;color:white;border:0;border-radius:28px;padding:13px 23px;white-space:nowrap;box-shadow:0 2px 4px #00000012}.primary:hover{background:#0e382d}.outline,.chip,.arrow{border:1px solid #e2ded8;background:#fff;color:#2a3935;border-radius:24px;padding:10px 16px}.outline:hover,.chip:hover,.arrow:hover{background:#f3f3f0}.chip.selected{background:#154638;border-color:#154638;color:white}.toolbar{display:flex;gap:8px;align-items:center;justify-content:space-between;margin-bottom:18px;flex-wrap:wrap}.toolbar .left,.toolbar .right{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.arrow{width:42px;height:42px;padding:0;font-size:22px}.toolbar select,.toolbar input{background:white;border:1px solid #e2ded8;border-radius:22px;padding:10px 14px;max-width:210px;color:#283c37}.table-scroll{overflow-x:auto;border:1px solid #e4e0db;border-radius:20px;background:white}.schedule{width:100%;min-width:1050px;border-collapse:collapse;table-layout:fixed}.schedule th,.schedule td{border-right:1px solid #e7e4df;border-bottom:1px solid #e7e4df;text-align:left;vertical-align:top}.schedule tr:last-child td{border-bottom:0}.schedule th:last-child,.schedule td:last-child{border-right:0}.schedule th{background:#f7f6f4;color:#71817d;font-size:11px;letter-spacing:1.2px;padding:14px;text-align:center;font-weight:600}.schedule th:first-child{width:205px;text-align:left}.schedule th b{display:block;color:#2b3733;font-size:16px;letter-spacing:0;margin-top:4px}.schedule td{height:106px;padding:9px 7px}.schedule .person{padding:16px 13px;vertical-align:middle}.person-wrap{display:flex;gap:10px;align-items:center}.person-wrap .avatar{flex-shrink:0}.person strong{font-size:13px;display:block}.person small{font-size:11px;color:#788782}.slot{border:1px solid;border-radius:16px;padding:9px;margin-bottom:6px;cursor:pointer;overflow:hidden}.slot strong{font-size:11px;display:block;white-space:nowrap}.slot small{font-size:11px;display:block;margin-top:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.slot:hover{filter:brightness(.97)}.nettoyage{background:#e8efff;border-color:#c9d8ff;color:#2858dd}.renovation{background:#fdf0e1;border-color:#f6d4ae;color:#ae621a}.electricite{background:#fff7df;border-color:#f2e2a2;color:#9b7300}.conciergerie{background:#f0eaff;border-color:#dfd0ff;color:#7452c4}.espaces{background:#e6f4ec;border-color:#c9e7d6;color:#237a50}.cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.site-card,.stat,.panel{border:1px solid #e5e1db;border-radius:20px;background:white;padding:23px}.site-card h3{font-size:17px;margin:0 0 6px}.muted{color:#71827c}.site-card p{font-size:13px;line-height:1.7;margin:12px 0 0}.site-card .client{margin:0 0 20px}.tag{display:inline-block;padding:5px 12px;border-radius:20px;font-size:12px;font-weight:600;margin-right:6px}.tag.active{background:#e7f4ec;color:#27744a}.tag.scheduled{background:#e8efff;color:#2858dd}.tag.nettoyage{background:#e8efff;color:#2858dd}.tag.renovation{background:#fdf0e1;color:#ae621a}.tag.electricite{background:#fff7df;color:#9b7300}.tag.conciergerie{background:#f0eaff;color:#7452c4}.tag.espaces{background:#e6f4ec;color:#237a50}.filters{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:22px}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.stat strong{font-size:30px;font-weight:500}.stat small{display:block;color:#738480;margin-top:7px}.panel{margin-top:20px}.panel h2{font-size:19px;font-weight:600}.list-row{padding:15px 0;border-bottom:1px solid #eceae5;display:flex;align-items:center;justify-content:space-between;gap:15px}.list-row:last-child{border:0}.list-row small{display:block;margin-top:4px;color:#72827d}.actions{display:flex;gap:8px;flex-wrap:wrap}.small{font-size:12px;padding:8px 12px}.flash{background:#fff4df;border:1px solid #edcf8d;color:#77561c;padding:13px 16px;border-radius:13px;margin-bottom:18px;white-space:pre-wrap}footer{color:#87938e;font-size:11px;margin-top:32px}dialog{border:0;border-radius:20px;padding:0;box-shadow:0 20px 80px #0003;max-width:540px;width:calc(100% - 24px)}dialog::backdrop{background:#0e292c77}.modal{padding:28px}.modal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.modal h2{font-size:24px;font-weight:550;margin:0}.close{border:0;background:transparent;font-size:28px;color:#70817b}.fields{display:grid;grid-template-columns:1fr 1fr;gap:14px}.fields label{font-size:12px;font-weight:600;display:grid;gap:6px}.fields label:last-child{grid-column:span 2}.fields input,.fields select,.fields textarea{width:100%;border:1px solid #dcded8;border-radius:10px;padding:11px;color:#20312e;background:#fff}.hint{color:#74847e;font-size:12px;line-height:1.6}.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}.empty{padding:35px;text-align:center;color:#788782}@media(max-width:1050px){.sidebar{width:220px}.main{padding:25px}.cards{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:700px){.app{display:block}.sidebar{position:static;width:100%;height:auto;padding:12px}.brand{margin-bottom:10px}.account{display:none}nav{display:flex;overflow-x:auto}nav button{white-space:nowrap;padding:10px}.main{padding:18px}header{align-items:flex-start}header .primary{font-size:12px;padding:11px}h1{font-size:28px}.cards,.stats{grid-template-columns:1fr}.fields{grid-template-columns:1fr}.fields label:last-child{grid-column:auto}}
/* Compléments V0.5 */
.schedule td{vertical-align:top;min-width:148px}.schedule .slot{cursor:pointer;margin-bottom:6px}.slot .task-line{display:block;font-size:11px;font-weight:500;white-space:normal;margin-top:4px}.toolbar{flex-wrap:wrap}.modal{max-height:90vh;overflow:auto}.modal-actions{flex-wrap:wrap}.task-list{margin:12px 0 0;padding-left:20px}.task-list li{margin:5px 0}.hours-table{width:100%;border-collapse:collapse;background:#fff}.hours-table th,.hours-table td{padding:14px;border-bottom:1px solid #e7e6e2;text-align:left}.hours-table th{color:#62736e;font-size:12px}.person-detail{background:#fff;border:1px solid #e5e4df;border-radius:16px;padding:20px;margin-top:16px}.clock-actions{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0}.clock-actions button:disabled{opacity:.45;cursor:not-allowed}.warning-text{color:#a05a14}.slot .service-label{font-size:10px;text-transform:uppercase;letter-spacing:.05em;display:block;margin-bottom:3px}.site-card .actions{margin-top:12px}.filter-label{font-size:12px;color:#60736d}.table-scroll{overflow-x:auto}.muted{color:#657771}.hint{font-size:12px;color:#63736d}.empty{padding:18px;color:#657771}
.cell-add{margin-top:5px;border:1px dashed #cbd7d2;background:transparent;color:#6d8079;border-radius:7px;padding:3px 9px;cursor:pointer;font-size:13px}.cell-add:hover{background:#eaf3ef}.schedule td{height:95px}.schedule td:first-child{min-width:190px}.schedule .person small{white-space:normal}.site-card ul{font-size:13px;color:#657771}.toolbar select,.toolbar input{max-width:220px}@media(max-width:700px){.hours-table th,.hours-table td{padding:8px;font-size:12px}}

#weeklyDialog{max-width:940px}.weekly-modal{max-height:90vh;overflow:auto}.weekly-days{margin-top:20px;display:grid;gap:9px}.weekly-row{display:grid;grid-template-columns:55px 85px 145px minmax(170px,1fr) 105px 105px;gap:9px;align-items:end;border:1px solid #e3e7e2;border-radius:12px;padding:11px}.weekly-row label{display:grid;gap:5px;font-size:12px;color:#63736d}.weekly-row input,.weekly-row select{width:100%;padding:9px;border:1px solid #dcded8;border-radius:8px}.weekly-row .weekly-active{width:18px;height:18px;margin:10px}.weekly-row strong{align-self:center}.weekly-error{color:#9b2929;font-weight:600;white-space:pre-wrap}@media(max-width:850px){.weekly-row{grid-template-columns:65px 1fr 1fr}.weekly-row label:nth-last-child(3){grid-column:span 2}}@media(max-width:500px){.weekly-row{grid-template-columns:1fr 1fr}.weekly-row label:nth-last-child(3){grid-column:span 2}}

/* V0.7 : couleurs attribuées aux chantiers, indépendantes des services */
.site-legend{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin:10px 0 18px;font-size:12px;color:#475569}
.site-legend-item{display:inline-flex;align-items:center;gap:6px;background:white;border:1px solid #e5e7eb;padding:6px 10px;border-radius:30px}
.site-legend-item::before{content:"";width:10px;height:10px;border-radius:50%;background:var(--site-color);flex-shrink:0}
.schedule .slot{border-left:5px solid var(--site-color)!important;box-shadow:0 1px 3px #0000000b;min-width:135px}
.schedule .slot .site-name{display:block;font-weight:800;color:var(--site-color);font-size:12px;line-height:1.25;margin-bottom:5px}
.site-color-label{display:flex;align-items:center;gap:10px;margin:10px 0;color:#64748b;font-size:13px}
.site-color-label input{width:42px;height:30px;border:0;background:transparent;cursor:pointer}
.danger-action{color:#b42318!important;border-color:#f5c7c4!important}

.report-dialog{max-width:min(720px,96vw);max-height:90vh;overflow:auto;border:1px solid #ddd;border-radius:16px;padding:0}.report-dialog .modal{display:flex;flex-direction:column;gap:12px;min-width:min(620px,85vw);padding:25px}.report-dialog label{display:flex;flex-direction:column;gap:6px;font-weight:600}.report-dialog input,.report-dialog select,.report-dialog textarea{width:100%;padding:10px;border:1px solid #ddd;border-radius:8px;font:inherit}.report-dialog::backdrop{background:#0008}

/* V0.9 rapports */
.report-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:18px 0}.report-stat{background:white;border:1px solid #e1e8e3;border-radius:14px;padding:14px}.report-stat strong{font-size:26px;display:block;color:#154638}.report-stat span{font-size:12px;color:#60736d}.report-card{background:white;border:1px solid #e1e8e3;border-radius:18px;padding:22px;margin:12px 0}.report-card-head{display:flex;justify-content:space-between;align-items:start;gap:10px}.report-card h3{margin:9px 0;font-size:18px}.report-type{display:inline-block;border-radius:20px;padding:5px 10px;font-size:11px;font-weight:700;background:#e4f2e8;color:#14633b}.report-type.incident{background:#fff1df;color:#9c591a}.report-status{background:#f0f1f0;padding:6px 10px;border-radius:15px;font-size:12px}.report-status.approved{background:#e0f2e5;color:#126137}.report-photos{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0}.report-photos img{width:130px;height:110px;object-fit:cover;border-radius:10px;border:1px solid #e1e8e3}.photo-wrap{display:flex;flex-direction:column;gap:5px}.report-admin-comment{background:#f1f6f2;padding:12px;border-radius:9px}.report-card .actions{margin-top:16px}.report-dialog .modal{min-width:0}@media(max-width:700px){.report-stats{grid-template-columns:1fr 1fr}.report-card-head{flex-direction:column}}

/* V1.1 : espaces de travail distincts */
.role-switch{display:flex;align-items:center;gap:9px;flex-wrap:wrap;background:#edf5f0;border:1px solid #cfe2d7;border-radius:12px;padding:11px 15px;margin-bottom:22px;color:#245c45}
.role-switch button{background:white;border:1px solid #bdd3c6;color:#245c45;border-radius:8px;padding:9px 13px;cursor:pointer;font-weight:650}
.role-switch button.selected{background:#175b43;color:white;border-color:#175b43}
.role-switch span{font-size:11px;color:#61766b}
.role-caption{font-size:12px;color:#476959;background:#edf5f0;padding:10px;border-radius:7px}
body[data-role="employee"] .sidebar{background:#1f604c}
body[data-role="employee"] #primary[hidden]{display:none}

.design-dialog{width:min(650px,95vw)}.design-dialog .modal{max-height:85vh;overflow:auto}.design-check{display:flex!important;align-items:center;gap:10px}.design-check input{width:auto!important}.design-preview{padding:22px;border:1px solid #dce8e0;border-radius:12px;margin:10px 0}.design-preview h3{font-size:16px;margin:14px 0 8px}.design-preview p{margin:6px 0}

/* V1.3 visualisation photos */
.report-photos img{cursor:zoom-in;min-width:100px;min-height:90px;object-fit:cover}.photo-viewer{border:0;border-radius:14px;padding:18px;max-width:96vw;max-height:96vh;box-shadow:0 18px 80px #0006}.photo-viewer::backdrop{background:#101c19bd}.photo-viewer-bar{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-bottom:14px}.photo-viewer>img{display:block;max-width:90vw;max-height:75vh;object-fit:contain;margin:auto}.photo-wrap img{cursor:zoom-in}
