:root{
  --blue:#0b5ed7;--navy:#123052;--bg:#f5f7fb;--green:#218653;--amber:#a96800;
  --text:#405466;--muted:#748494;--line:#e3e8ee;--white:#fff;
  --safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px);
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:var(--bg);color:var(--navy);font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Roboto,Helvetica,Arial,sans-serif;-webkit-tap-highlight-color:transparent;-webkit-font-smoothing:antialiased}
body{min-height:100vh;overscroll-behavior-y:none}
button,input{font:inherit}button{cursor:pointer}.icon{display:inline-block;vertical-align:middle;flex:0 0 auto}
#app{min-height:100vh}.shell{width:100%;max-width:760px;margin:0 auto;min-height:100vh;padding-top:var(--safe-top);padding-bottom:calc(84px + var(--safe-bottom));background:var(--bg)}

/* Header identique à l'app Expo */
.top{background:#fff;border-bottom:1px solid #e5eaf0;padding:12px 18px;position:sticky;top:0;z-index:12}
.brand{display:flex;align-items:center;justify-content:space-between;gap:12px}.brandText{font-size:25px;font-weight:900;color:var(--navy);letter-spacing:-1.2px;line-height:1}.brandText .blue{color:var(--blue)}.tagline{font-size:10.5px;color:#6c7b8a;margin-top:3px}.statusPill{display:flex;align-items:center;background:#edf8f1;padding:7px 10px;border-radius:18px;color:#36754f;font-size:10.5px;font-weight:750;white-space:nowrap}.statusDot{width:7px;height:7px;border-radius:50%;background:#2ca45d;margin-right:6px}.offline .statusPill{background:#fff5d8;color:#7c5b00}.offline .statusDot{background:#d19b00}
.offlinePill{display:none;margin:9px 16px 0;background:#fff5d8;color:#7c5b00;border:1px solid #eedca7;border-radius:12px;padding:8px 10px;font-size:11px;font-weight:800}.offline .offlinePill{display:block}

.main{padding:15px 16px 0}.homeTitle{font-size:24px;font-weight:850;color:var(--navy);letter-spacing:-.5px;margin:0}.homeSubtitle{font-size:13.5px;line-height:19px;color:#657687;margin:4px 0 0}
.searchWrap{height:47px;background:#fff;border:1px solid #e0e6ed;border-radius:14px;display:flex;align-items:center;padding:0 13px;margin:10px 0 13px;box-shadow:0 1px 1px rgba(18,48,82,.015)}.searchIcon{color:#6d7d8e;display:grid;place-items:center}.search{flex:1;height:100%;border:0;outline:0;background:transparent;margin-left:9px;font-size:14.5px;color:var(--navy);padding:0;min-width:0}.search::placeholder{color:#8b98a5}.clearSearch{border:0;background:transparent;color:#8896a4;display:grid;place-items:center;padding:4px;margin-right:-5px}

.security{background:#eef8f2;border:1px solid #d5eadc;border-radius:14px;padding:13px;display:flex;gap:10px;align-items:flex-start;margin-bottom:14px}.securityIcon{color:var(--green);margin-top:1px}.security b{font-size:12.5px;font-weight:800;color:#276c46;display:block}.security span{font-size:11.5px;line-height:16px;color:#47725a;display:block;margin-top:2px}.security.compact{margin-top:4px;margin-bottom:0;align-items:center}

.moduleGrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:18px}.module{min-height:116px;background:#fff;border:1px solid #e3e9ef;border-radius:15px;padding:11px;text-align:left;color:var(--navy);box-shadow:none}.module:active{transform:scale(.985);background:#fafcff}.quickIcon{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;font-size:21px}.quickIcon.blueBg{background:#eef5ff}.quickIcon.greenBg{background:#f1f7f4}.quickIcon.amberBg{background:#fff6e8}.module strong{display:block;font-size:13px;font-weight:800;margin-top:9px;line-height:1.15}.module small{display:block;font-size:10.5px;color:#738393;margin-top:3px;line-height:1.2}

.section{padding:0}.sectionHead{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.sectionHead h2{font-size:14.5px;font-weight:850;color:var(--navy);margin:0}.sectionHead span{font-size:10.5px;color:#8090a0;font-weight:700}.list{padding-bottom:8px}
.card{position:relative;width:100%;background:#fff;border:1px solid #e3e8ee;border-radius:14px;padding:12px 58px 12px 12px;margin:0 0 9px;display:flex;align-items:center;text-align:left;color:var(--navy);box-shadow:none;cursor:pointer;min-height:94px}.card:active{background:#fafcff}.card:focus-visible{outline:2px solid #9fc7ef;outline-offset:2px}.cardIcon{width:46px;height:46px;border-radius:13px;background:#f2f5f9;display:grid;place-items:center;margin-right:11px;font-size:24px;flex:0 0 auto}.cardMain{flex:1;min-width:0}.badgeLine{display:flex;align-items:center;margin-bottom:3px;min-width:0}.micro{font-size:8.5px;letter-spacing:.8px;color:var(--blue);font-weight:900;background:transparent;padding:0}.scope{font-size:8.5px;color:#8996a3;margin-left:7px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cardTitle{font-size:14.5px;font-weight:800;color:var(--navy);line-height:1.25}.cardSub{font-size:11.5px;line-height:15.5px;color:#748494;margin-top:3px}.star{width:40px;height:40px;border:0;background:transparent;display:grid;place-items:center;padding:0;color:#7e8d9b}.card>.star{position:absolute;right:12px;top:50%;transform:translateY(-50%);margin:0;color:var(--blue);z-index:2}.card>.star:active{transform:translateY(-50%) scale(.94)}.star.active{color:#d99a00}
.empty{text-align:center;color:#81909f;padding:40px 15px;font-size:12px}.emptyIcon{color:#8b99a7;margin-bottom:8px}.empty strong{display:block;font-size:14px;font-weight:800;color:var(--navy);margin-bottom:3px}

/* Navigation iOS-like */
.bottom{position:fixed;z-index:30;left:0;right:0;bottom:0;background:rgba(255,255,255,.985);border-top:1px solid #e1e7ed;padding:8px max(8px,env(safe-area-inset-left)) calc(7px + var(--safe-bottom));backdrop-filter:saturate(180%) blur(18px);-webkit-backdrop-filter:saturate(180%) blur(18px)}.bottomInner{width:min(760px,100%);margin:0 auto;display:grid;grid-template-columns:repeat(5,1fr)}.tab{border:0;background:transparent;color:#758596;padding:0 2px;min-height:55px;font-size:8.5px;font-weight:650;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:3px}.tabIcon{height:25px;display:grid;place-items:center}.tab.active{color:var(--blue);font-weight:800}

/* Détails */
.topbar{display:flex;align-items:center;justify-content:space-between;padding:15px 18px 7px}.back{border:0;background:transparent;color:var(--blue);font-size:13px;font-weight:750;padding:7px 0;display:flex;align-items:center;gap:2px}.detail{padding:2px 18px 44px}.kicker{font-size:10px;font-weight:900;letter-spacing:1.1px;color:var(--blue);margin:7px 0 0}.detail h1{font-size:26px;line-height:32px;font-weight:900;color:var(--navy);margin:6px 0 0;letter-spacing:-.5px}.detailSubtitle{font-size:12px;font-weight:650;color:#778697;margin-top:4px}.lead{font-size:14px;line-height:21px;color:#4e6071;margin:11px 0 15px}.panel{background:#fff;border:1px solid #e2e8ee;border-radius:15px;padding:15px;margin-bottom:11px;box-shadow:none}.panel h3{font-size:15px;font-weight:850;color:var(--navy);margin:0 0 9px}.bullet{display:flex;align-items:flex-start;margin-bottom:7px;gap:0}.dot{width:5px;height:5px;border-radius:50%;background:var(--blue);margin-top:7px;margin-right:9px;flex:0 0 auto}.bullet span:last-child{flex:1;font-size:13px;line-height:19px;color:#405466}.alert{background:#fff7f1;border-color:#f0d7c7}.alert h3{color:#984714}.alert .dot{background:#bb6b31}.primary{height:49px;background:var(--blue);border:0;border-radius:14px;color:#fff;font-size:14px;font-weight:850;width:100%;display:flex;align-items:center;justify-content:center;gap:8px;margin-top:2px}.secondary{min-height:46px;border:1px solid #d8e1eb;border-radius:13px;background:#fff;color:var(--navy);font-size:12.5px;font-weight:800;padding:11px 14px;width:100%;margin:7px 0}.danger{color:#a23c31;border-color:#efcbc7;background:#fff8f7}.tiny{font-size:10.5px;line-height:15px;color:#728293}.prototypeNote{font-size:10.5px;line-height:15px;color:#8a6b34;margin-top:9px;font-style:italic}
.infoPanel{background:#eef5ff;border:1px solid #d9e7fb;border-radius:14px;padding:13px;display:flex;gap:10px;margin-bottom:14px}.infoPanelTitle{font-size:13px;font-weight:850;color:#315f92}.infoPanelText{font-size:11.5px;line-height:16.5px;color:#527397;margin-top:2px}

/* Checklist */
.params{display:grid;grid-template-columns:1fr 1fr;gap:10px}.field label{display:block;font-size:11px;font-weight:800;color:#586a7b;margin-bottom:5px}.inputWithUnit{height:47px;border:1px solid #d9e1e8;border-radius:12px;display:flex;align-items:center;background:#fafcfd}.num{flex:1;min-width:0;height:45px;border:0;background:transparent;outline:0;font-size:18px;font-weight:800;color:var(--navy);padding:0 12px}.inputUnit{font-size:11px;color:#718090;padding-right:11px}.progress{background:#eef5ff;border-radius:14px;padding:13px;margin-bottom:12px}.progress.complete{background:#eef8f2}.progressLine{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;font-size:12px;font-weight:850;color:#315f92}.complete .progressLine{color:#276c46}.progressLine span:last-child{font-weight:900;color:var(--blue)}.complete .progressLine span:last-child{color:var(--green)}.track{height:7px;background:#d7e5f7;border-radius:5px;overflow:hidden}.fill{height:100%;background:var(--blue);border-radius:5px}.complete .fill{background:var(--green)}.optionalNote{font-size:9.5px;line-height:14px;color:#728293;margin-top:7px}.checkSection{background:#fff;border:1px solid #e1e7ed;border-radius:16px;padding:14px;margin-bottom:12px}.checkSection h3{font-size:14.5px;font-weight:850;color:var(--navy);margin:0 0 2px}.checkRow{display:flex;align-items:flex-start;padding:9px 2px;border-bottom:1px solid #eef2f5;gap:10px}.checkRow:last-child{border-bottom:0}.checkRow input{position:absolute;opacity:0;pointer-events:none}.checkBox{width:23px;height:23px;border-radius:7px;border:1.5px solid #aebbc7;display:grid;place-items:center;flex:0 0 auto;margin-top:1px;color:#fff}.checkRow.done{background:#f5fbf7}.checkRow.done .checkBox{background:var(--green);border-color:var(--green)}.checkLabel{flex:1;font-size:12.5px;line-height:18.5px;color:#3e5264}.checkRow.done .checkLabel{color:#32674a;font-weight:650}.optionalBadge{display:inline-block;font-size:7.5px;font-weight:900;letter-spacing:.5px;color:#7a6b49;background:#fff7df;border-radius:8px;padding:3px 6px;margin-left:7px;vertical-align:2px}.selectors{display:flex;gap:7px;flex-wrap:wrap}.chip{flex:1;min-width:88px;border:1px solid #d8e0e8;background:#f8fafc;color:#607284;border-radius:11px;padding:9px 10px;font-size:11.5px;font-weight:750;text-align:center}.chip.active{border-color:var(--blue);background:#edf5ff;color:var(--blue);font-weight:850}.doseResult{background:#f2f7ff;border-radius:13px;padding:13px;margin-top:12px}.doseResult span:first-child{font-size:10.5px;font-weight:800;color:#6680a0}.doseResult strong{display:block;font-size:23px;font-weight:900;color:var(--navy);margin-top:2px}.rassRow{display:grid;grid-template-columns:36px 1fr;gap:0;padding:8px 0;border-bottom:1px solid #eef2f5;font-size:11.5px;line-height:16px;color:#465a6c}.rassScore{font-size:13px;font-weight:900;color:var(--blue)}

/* CMF */
.cmfHero{background:linear-gradient(180deg,#fff 0%,#f8fbfe 100%);border:1px solid #dbe5ee;border-radius:24px;padding:12px 10px 14px;margin:14px 0;box-shadow:0 10px 28px rgba(16,53,88,.08)}
.faceSvg{width:100%;height:auto;display:block;max-height:560px;touch-action:manipulation;overflow:visible}.skullSvg{padding:2px 0 0}
.skullBase{fill:url(#boneFill);stroke:#6f8ca5;stroke-width:3.2}.suture,.boneDetail,.palateLine,.jawInner{fill:none;stroke:#a4b7c7;stroke-width:2;stroke-linecap:round;opacity:.8}.temple{opacity:.55}.zone{cursor:pointer;transform-box:fill-box;transform-origin:center;transition:transform .14s ease,filter .14s ease}.zone:active{transform:scale(.985);filter:brightness(.97)}
.zoneBone{fill:url(#boneSoft);stroke:#7895ad;stroke-width:2.4;transition:fill .14s ease,stroke .14s ease,filter .14s ease}.zone:hover .zoneBone,.zone:focus .zoneBone{stroke:#2475d0}.zone.active .zoneBone{fill:#dcecff;stroke:#0b6fe8;stroke-width:3.2;filter:drop-shadow(0 3px 6px rgba(11,111,232,.18))}
.socket{fill:#d8e3ec;stroke:#6d879f;stroke-width:2.6;pointer-events:none}.orbitGlow{fill:transparent;stroke:transparent;stroke-width:10;pointer-events:none}.zone.active .socket{fill:#c6dbed;stroke:#0b6fe8}.nasalCavity{fill:#c9d7e2;stroke:#6d879f;stroke-width:2;pointer-events:none}.zone.active .nasalCavity{fill:#b5d3ec;stroke:#0b6fe8}
.zoneLabel{pointer-events:none}.zoneLabel rect{fill:#fff;stroke:#c8d6e2;stroke-width:1.5;filter:drop-shadow(0 2px 3px rgba(21,55,88,.08))}.zoneLabel text{font-size:13px;font-weight:900;letter-spacing:.3px;fill:#143a62;text-anchor:middle}.zoneLabel.small text{font-size:12px}.zoneLabel.mini text{font-size:10px}.zone.active .zoneLabel rect{fill:#0b6fe8;stroke:#0b6fe8}.zone.active .zoneLabel text{fill:#fff}
.teeth{pointer-events:none}.teeth rect{fill:#fff;stroke:#9cafbe;stroke-width:1.3}.zone.active .teeth rect{stroke:#0b6fe8}.cmfLegend{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;padding:4px 3px 1px}.cmfLegend button{appearance:none;border:1px solid #d8e3ed;background:#fff;color:#24496f;border-radius:12px;padding:8px 6px;font-size:11px;font-weight:800;display:flex;align-items:center;justify-content:center;gap:5px;min-height:38px}.cmfLegend button:active{background:#edf6ff;border-color:#9fc7ef}.cmfLegend button span{width:20px;height:20px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:#e9f3fd;color:#0b6fe8;font-size:10px;font-weight:900}
.scenario{width:100%;border:1px solid #dfe6ed;background:#fff;border-radius:14px;padding:12px;margin:0 0 8px;text-align:left;color:var(--navy)}.scenario strong{font-size:13px}.level{display:inline-block;margin-top:5px;font-size:9px;font-weight:900;background:#edf4fb;color:#315f92;border-radius:999px;padding:4px 7px}.scenario.critical{background:#fff0ee;border-color:#f0c7c2}.scenario.critical .level{background:#fbe0dd;color:#a43d32}.scenario.urgent{background:#fff7e8;border-color:#ead7ad}.scenario.urgent .level{background:#f7e8c8;color:#8e5b00}

@media(min-width:761px){.shell{border-left:1px solid #e4e9ef;border-right:1px solid #e4e9ef}.top{top:0}}
@media(max-width:370px){.main{padding-left:12px;padding-right:12px}.module{padding:9px}.module strong{font-size:12px}.module small{font-size:9.5px}.detail{padding-left:14px;padding-right:14px}}
@media(display-mode:standalone){body{background:var(--bg)}.shell{min-height:100dvh}}

@media (max-width:390px){.cmfHero{padding:9px 6px 12px}.cmfLegend{grid-template-columns:repeat(2,1fr)}.zoneLabel text{font-size:12px}.zoneLabel.mini text{font-size:9px}}
