:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#18343d;background:#f4f7f6;--ink:#083d4f;--accent:#0f8a75;--danger:#ad2e24;--line:#cfddda}*{box-sizing:border-box}body{margin:0;padding-bottom:78px}header{height:68px;padding:calc(env(safe-area-inset-top) + 10px) 16px 8px;display:flex;align-items:center;gap:12px;background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:10}.brand{display:flex;flex-direction:column;line-height:1.05;flex:1}.brand strong{color:var(--ink);font-size:20px}.brand span{color:#587078;font-size:13px;letter-spacing:.08em;text-transform:uppercase}.pill{font-size:12px;border-radius:99px;padding:6px 9px;background:#dff3ec;color:#08614f}.pill.offline{background:#fff0c9;color:#734f00}main{max-width:900px;margin:auto;padding:18px 14px}.center{max-width:440px;margin:10vh auto;text-align:center}.card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:16px;margin-bottom:12px;box-shadow:0 2px 8px #17363f0c}.card h2,.card h3{margin:0 0 8px}.list-card{display:flex;align-items:center;gap:12px}.list-card .grow{flex:1}.muted,.hint{color:#657980;font-size:13px}.status{font-weight:700;font-size:12px;color:#875a00}.status.validated{color:#08705c}button,.button{border:0;border-radius:12px;background:var(--accent);color:#fff;min-height:46px;padding:11px 16px;font:inherit;font-weight:650;cursor:pointer}button.secondary,.button.secondary{background:#e5eeec;color:#18343d}button.danger{background:#fee5e2;color:var(--danger)}button.icon{font-size:34px;background:transparent;color:var(--ink);padding:0;min-height:40px}.primary-wide{width:100%;font-size:17px;margin:10px 0}label{display:block;font-weight:650;margin:14px 0 6px}input,textarea,select{width:100%;border:1px solid #aebfbc;border-radius:11px;padding:12px;font:inherit;background:#fff;color:#18343d;font-size:16px}textarea{resize:vertical}.row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.row>*{flex:1}.actions{display:flex;gap:10px;margin-top:18px}.actions>*{flex:1}.search{margin-bottom:16px}.photo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:10px}.photo{background:#fff;border:1px solid var(--line);border-radius:12px;overflow:hidden}.photo img{width:100%;height:140px;object-fit:cover}.photo div{padding:9px;font-size:13px}.warn{background:#fff5d9;border:1px solid #efd37a;padding:11px;border-radius:10px}.success{background:#e2f4ed;border:1px solid #9cd4c6;padding:11px;border-radius:10px}nav{position:fixed;bottom:0;left:0;right:0;height:68px;padding-bottom:env(safe-area-inset-bottom);background:#fff;border-top:1px solid var(--line);display:flex;z-index:15}nav button{flex:1;background:#fff;color:var(--ink);border-radius:0;font-size:21px;padding:4px}nav span{display:block;font-size:11px;font-weight:500}dialog{border:0;border-radius:18px;width:min(94vw,620px);max-height:92vh;padding:18px}dialog::backdrop{background:#092c3688}dialog img,dialog canvas{display:block;max-width:100%;max-height:42vh;margin:12px auto;border-radius:8px}#annotationTools button{font-size:12px;padding:7px;min-height:38px}#toast{position:fixed;bottom:84px;left:50%;transform:translateX(-50%);background:#143a45;color:#fff;padding:10px 16px;border-radius:10px;opacity:0;pointer-events:none;transition:.2s;z-index:30}#toast.show{opacity:1}.hidden{display:none!important}.sync-state{font-size:12px;padding:5px 8px;background:#edf3f1;border-radius:8px}.site-head{display:flex;align-items:flex-start;gap:10px}.site-head>div{flex:1}@media(min-width:700px){main{padding:26px}.two-cols{display:grid;grid-template-columns:1fr 1fr;gap:14px}}

/* Terrain and Bureau share the same project navigation identity. */
.app-header{background:#102c37;color:#fff;border-bottom:0;gap:9px;height:70px;padding:calc(env(safe-area-inset-top) + 8px) 16px 8px}
.app-header #back{color:#fff;flex:none;width:30px}
.app-brand{display:flex;align-items:center;gap:9px;flex:1;min-width:0;color:#fff;text-decoration:none}
.app-brand-mark{width:36px;height:36px;flex:none;display:grid;place-items:center;border-radius:10px;background:#d6ef75;color:#19333b;font-size:21px;font-weight:900}
.app-brand-name{min-width:0;display:grid;line-height:1.12}.app-brand-name strong{font-size:14px;white-space:nowrap}.app-brand-name small{font-size:11px;color:#b5c9cd}
.app-switch{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:7px 12px;border:1px solid #6d9298;border-radius:9px;background:transparent;color:#e2eff0;text-decoration:none;font-size:13px;font-weight:750}
.app-header .pill{flex:none;background:#235363;color:#fff;font-size:11px}.app-header .pill.offline{background:#fff0c9;color:#734f00}
@media(max-width:420px){.app-brand-name strong{display:none}.app-brand-name small{color:#d6ef75;font-size:13px;font-weight:750}.app-header{gap:7px;padding-left:12px;padding-right:12px}.app-switch{padding:7px 10px}}
@media(max-width:600px){.app-header{height:calc(60px + env(safe-area-inset-top));padding-top:calc(env(safe-area-inset-top) + 6px);padding-bottom:6px}}
.client-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.client-actions>*{min-width:0;white-space:normal;padding:10px;line-height:1.2}.client-actions #clientMaintenance{grid-column:1/-1}
.client-management{margin-top:18px}.client-management summary{color:#657980;font-size:13px}.client-management button{margin-bottom:0}
.client-tools{margin:12px 0 0;padding:10px;background:#f8fbf9}.client-tools summary{color:#315a53;font-weight:700}.client-tools .actions{margin-top:10px}
@media(max-width:699px){.site-head{display:block}.site-head h1{font-size:clamp(23px,6.5vw,29px);line-height:1.14;overflow-wrap:anywhere}.site-head #editClient{width:100%;min-height:40px;margin-top:10px}}
@media(min-width:700px){.client-actions{grid-template-columns:repeat(3,minmax(0,1fr))}.client-actions #clientMaintenance{grid-column:auto}}

.maintenance-projections{display:grid;grid-template-columns:repeat(auto-fit,minmax(175px,1fr));gap:8px}.maintenance-projections>div{background:#edf3f1;border-radius:10px;padding:10px}.maintenance-projections small{display:block;margin-top:5px}.maintenance-copy{margin-left:8px}details{margin:14px 0;padding:12px;border:1px solid var(--line);border-radius:12px}summary{cursor:pointer}

.maintenance-tabs{display:flex;gap:8px;margin-top:15px}.maintenance-tabs button{flex:1;background:#e5eeec;color:var(--ink)}.maintenance-tabs button[aria-selected=true]{background:var(--accent);color:#fff}

/* Galerie et affichage sur grand écran */
.section-head{justify-content:space-between;margin:22px 0 12px}.section-head>*{flex:0 0 auto;margin:0}.section-head button{min-width:160px}.photo-grid{grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px}.photo{min-width:0;display:flex;flex-direction:column}.photo>div{padding:12px;flex:1;display:flex;flex-direction:column}.photo>div>p{overflow-wrap:anywhere}.photo>div>.row,.photo>div>.actions{margin-top:auto}.photo-zoom{display:block;position:relative;width:100%;height:190px;min-height:0;padding:0;border-radius:0;background:#e7efed;overflow:hidden;color:#fff}.photo-zoom img{display:block;width:100%;height:100%;object-fit:contain;transition:transform .18s}.photo-zoom span{position:absolute;right:8px;bottom:8px;padding:5px 8px;border-radius:7px;background:#123b46cc;font-size:12px}.photo-zoom:hover img{transform:scale(1.025)}.photo-zoom:focus-visible{outline:3px solid var(--accent);outline-offset:-3px}.photo-viewer{width:min(96vw,1200px);max-width:96vw;max-height:96vh;padding:12px;background:#13272d;color:#fff}.photo-viewer-head{display:flex;align-items:center;gap:16px;justify-content:space-between}.photo-viewer-head p{margin:8px;overflow-wrap:anywhere}.photo-viewer-head button{flex:none}.photo-viewer img{display:block;width:auto;max-width:100%;max-height:calc(96vh - 90px);height:auto;object-fit:contain;margin:8px auto;border-radius:4px}
@media(max-width:699px){.photo-grid{grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:10px}.photo-zoom{height:145px}.section-head button{min-width:0}}
@media(min-width:1100px){body{padding-bottom:0}header{height:72px;padding:10px 24px}main{width:calc(100% - 280px);max-width:1320px;margin:0 24px 0 256px;padding:30px 24px 60px}nav#bottom{top:72px;bottom:0;right:auto;width:232px;height:auto;padding:22px 12px;display:flex;flex-direction:column;gap:6px;border-top:0;border-right:1px solid var(--line);align-items:stretch}nav#bottom button{flex:0 0 auto;display:flex;align-items:center;gap:12px;width:100%;min-height:48px;padding:10px 14px;border-radius:10px;text-align:left;font-size:23px}nav#bottom button:hover,nav#bottom button:focus-visible{background:#e8f3f0}nav#bottom span{display:inline;font-size:15px;font-weight:600}.card{padding:24px;margin-bottom:18px}.photo-grid{grid-template-columns:repeat(auto-fill,minmax(250px,1fr))}.photo-zoom{height:220px}.wizard .steps{flex-wrap:wrap;overflow:visible}.site-head h1{margin-top:0}#toast{bottom:24px}}

.context-nav{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 12px}.context-nav button{min-height:40px;padding:8px 12px;font-size:14px}.context-nav button:first-child{font-weight:750}@media(max-width:699px){.context-nav button:first-child{width:100%}.context-nav button:not(:first-child){flex:1}}

/* Common visual language for the dossiers home and its mobile workflow. */
:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#18323b;background:#f3f6f4;--ink:#18323b;--accent:#1d7154;--line:#dce6e4;font-synthesis:none}
button:focus-visible,.button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #77ad95;outline-offset:2px}
.card{border-color:#dce7e0;border-radius:14px;box-shadow:none}
button,.button{border-radius:9px}
button.secondary,.button.secondary{background:#e7efeb;color:#244c42}
input,textarea,select{border-color:#cfdcd4;border-radius:9px}
nav#bottom{border-color:#dce6e4}
nav#bottom button{color:#31564e;font-weight:650}
nav#bottom button:hover,nav#bottom button:focus-visible{background:#eff6f1}
.portfolio-home{max-width:760px;margin:0 auto}
:root:has(.portfolio-home),body:has(.portfolio-home){background:#fff}
#app:has(.portfolio-home){padding-top:22px}
.portfolio-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 8px 10px}
.portfolio-eyebrow{display:block;color:#58867b;font-size:11px;font-weight:800;letter-spacing:.12em}
.portfolio-heading h1{margin:3px 0 0;font-size:27px;line-height:1.1;letter-spacing:-.04em}
.portfolio-count{border-radius:100px;background:#eaf2ef;color:#315a53;padding:5px 10px;font-size:12px;font-weight:750}
.portfolio-search{display:block;margin:0 0 10px;font-weight:400}
.portfolio-search input{height:43px;border:1px solid #d4e1dc;border-radius:10px;background:#f8faf9;padding:11px 13px;font-size:14px}
.portfolio-create{display:block;width:100%;min-height:43px;background:#1d7154;font-size:16px;font-weight:750}
.portfolio-sync{margin:12px 2px 14px;color:#718680;font-size:12px}
.portfolio-list{display:grid;gap:9px}
.portfolio-row{display:flex;align-items:stretch;gap:7px;min-width:0}
.portfolio-item{display:flex;align-items:center;gap:10px;width:100%;min-height:66px;padding:12px 14px;text-align:left;background:#f8faf9;color:#213c43;border:1px solid #dce7e0;border-radius:11px;font-weight:400}
.portfolio-delete{flex:none;border:1px solid #e4b7b2;border-radius:11px;background:#fff5f3;color:#a43024;font-size:12px;font-weight:750;padding:0 10px}
.portfolio-delete:hover,.portfolio-delete:focus-visible{background:#ffe8e3;border-color:#ce7066}
.portfolio-item:hover,.portfolio-item:focus-visible{background:#edf5ef;border-color:#a9cbb6}
.portfolio-item-copy{min-width:0;display:grid;gap:3px;flex:1}
.portfolio-item strong{font-size:14px;line-height:1.25;overflow-wrap:anywhere}
.portfolio-item small{color:#617978;font-size:12px;line-height:1.35;overflow-wrap:anywhere}
.portfolio-arrow{color:#347b5b;font-size:25px;line-height:1}
.portfolio-empty{padding:22px 14px;border:1px dashed #cfdcd4;border-radius:11px;color:#617978;text-align:center}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.site-head h1{letter-spacing:-.04em;line-height:1.1}
.client-tools,.client-management{border-color:#dce7e0;background:#f8faf9}
.client-tools summary,.client-management summary{color:#315a53}
@media(max-width:699px){#app:has(.portfolio-home){padding:17px 14px 90px}.portfolio-heading{margin-bottom:11px}.portfolio-sync{margin:11px 2px 20px}}
.dossier-form{max-width:760px;margin:0 auto}
.dossier-form h1{margin:5px 0 6px;font-size:clamp(25px,5vw,32px);letter-spacing:-.04em}
.dossier-form>p{margin:0 0 20px;line-height:1.5}
.dossier-form input{font-weight:400}
.dossier-type-choice{display:flex;flex-wrap:wrap;gap:10px;margin:0 0 16px;padding:12px 14px;border:1px solid #dce7e0;border-radius:11px}
.dossier-type-choice legend{padding:0 5px;font-weight:700}
.dossier-type-choice label{display:flex;align-items:center;gap:8px;margin:0;padding:9px 13px;border:1px solid #dce7e0;border-radius:9px;background:#f8faf9;cursor:pointer}
.dossier-type-choice input{width:auto;margin:0}
.dossier-type-choice label:has(input:checked){border-color:#315a53;background:#edf5ef}
.dossier-form-options{margin:12px 0;padding:12px 14px;background:#f8faf9;border-color:#dce7e0}
.dossier-form-options summary{color:#315a53;font-weight:700}
.dossier-form-options[open] summary{margin-bottom:12px}
.dossier-form-options label{font-size:14px}
.dossier-form-options #clientRadio h2{font-size:18px}
@media(max-width:699px){.dossier-form{padding:18px}.dossier-form .actions{display:grid;grid-template-columns:1fr 1fr}.dossier-form .actions button{min-width:0;padding:10px;font-size:14px}}
.dossier-sites h2{font-size:22px;letter-spacing:-.035em;margin:20px 0 11px}
.client-estimate-details{background:#fff;border:1px solid #dce7e0;border-radius:14px;margin:16px 0;padding:13px 16px}
.client-estimate-details summary{color:#315a53;font-weight:750}
.client-estimate-details #clientEstimate{margin-top:14px}
@media(max-width:699px){.dossier-sites .list-card{display:block}.dossier-sites .list-card .actions{margin-top:12px}.dossier-sites .list-card .actions .open-site{flex:1}.dossier-sites .list-card .actions .delete-site{flex:0 0 auto}.dossier-sites .list-card .actions button{min-height:38px;padding:7px 10px;font-size:13px}}
.dossier-tabs{position:static;z-index:auto;display:flex;height:auto;gap:18px;overflow-x:auto;padding:0;margin:4px 0 18px;border-top:0;border-bottom:1px solid #d6e2dc;background:transparent}.dossier-tabs button{flex:0 0 auto;min-height:42px;padding:10px 2px;border:0;border-bottom:3px solid transparent;border-radius:0;background:transparent;color:#6b8182;font-size:14px;font-weight:700;white-space:nowrap}.dossier-tabs button[aria-current="page"]{color:#145e46;border-bottom-color:#267c59}.dossier-tabs button:not([aria-current]):hover,.dossier-tabs button:not([aria-current]):focus-visible{color:#145e46;border-bottom-color:#267c59;outline:none}
@media(max-width:600px){.dossier-tabs{gap:15px}.dossier-tabs button{font-size:12px}}
.client-actions #addSite{grid-column:1/-1}
