/* STATERA Atelier — charte STATERA (octobre 2026), alignée sur STATERA Honoraires
   Jost (léger pour les titres) · EB Garamond italique réservé aux devises
   noir pierre #161616 · blanc chaux #F4F3F0 · enduit #E7E5E0 · béton #BFBDB6 · filets fins, angles vifs, aucun dégradé */

@font-face { font-family: 'Jost'; src: url(../assets/fonts/jost-var.woff2) format('woff2'); font-weight: 300 600; font-display: swap; }
@font-face { font-family: 'EB Garamond'; src: url(../assets/fonts/eb-garamond-var-italic.woff2) format('woff2'); font-weight: 400 600; font-style: italic; font-display: swap; }

:root {
  --stone: #161616; --chaux: #F4F3F0; --enduit: #E7E5E0; --beton: #BFBDB6;
  --ink2: #57544F; --ink3: #8C8981; --rule: #D9D6CF; --paper: #FFFFFF; --desk: #D9D7D2;
  --ink: var(--stone); --line: var(--beton); --mute: var(--ink2); --mute2: var(--ink3); --white: var(--paper);
  --sans: 'Jost', 'Futura', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --motto: 'EB Garamond', Garamond, Georgia, serif;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --tab: 62px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--chaux); color: var(--stone); font-family: var(--sans); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
body { -webkit-tap-highlight-color: transparent; }
html, body, button, a, input, select, textarea, label { touch-action: manipulation; }
html:has(.viewer), html:has(.full), html:has(.sheet), html:has(.modal) { overflow: hidden; }
html:has(.viewer) body, html:has(.full) body, html:has(.sheet) body, html:has(.modal) body { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 1.5px solid var(--stone); outline-offset: 2px; }
.num, .stat b, .title { font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1; }

/* ---------- En-tête (comme STATERA Honoraires) ---------- */
.masthead { max-width: 1180px; margin: 0 auto; padding: calc(18px + var(--safe-t)) 20px 16px; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--stone); }
.masthead .brand { display: block; text-decoration: none; }
.masthead .brand svg { width: min(220px, 52vw); height: auto; display: block; }
.masthead nav { display: flex; gap: 4px; align-items: flex-end; }
.masthead nav a { min-height: 40px; display: inline-flex; align-items: center; padding: 0 10px; text-decoration: none; color: var(--ink2); font-size: 15px; border-bottom: 1.5px solid transparent; }
.masthead nav a[aria-current="page"] { color: var(--stone); border-bottom-color: var(--stone); }
.masthead .who { text-align: right; font-size: 12px; color: var(--ink2); line-height: 1.5; }
.masthead .who b { display: block; font-weight: 300; font-size: 18px; color: var(--stone); }
.shell { min-height: 100vh; min-height: 100dvh; }
.view { max-width: 1180px; margin: 0 auto; outline: none; }
.tabbar { display: none; }

/* ---------- Page ---------- */
.page { padding: 26px 20px 120px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.eyebrow { font-size: 12px; color: var(--ink2); }
.title { font-weight: 300; font-size: 36px; line-height: 1.08; margin: 4px 0 0; letter-spacing: 0; }
.title-sm { font-weight: 300; font-size: 24px; line-height: 1.15; margin: 0; }
.sub { font-size: 14px; color: var(--ink2); margin-top: 6px; }
.crumb { font-size: 13px; color: var(--ink2); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.section-t { font-weight: 300; font-size: 21px; line-height: 1.15; color: var(--stone); margin: 0 0 12px; }
.motto { font-family: var(--motto); font-style: italic; font-size: 17px; color: var(--ink2); }
hr.rule { border: 0; border-top: 1px solid var(--rule); margin: 24px 0; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border: 1px solid var(--stone); background: transparent; color: var(--stone); font-size: 14px; text-decoration: none; border-radius: 0; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--stone); color: var(--chaux); }
.btn-line { border-color: var(--beton); }
.btn-ghost { border-color: transparent; }
.btn-sm { min-height: 38px; padding: 6px 12px; font-size: 13px; }
.btn-icon { width: 44px; padding: 0; }
.btn-icon.btn-sm { width: 38px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

/* ---------- Champs (soulignés, comme Honoraires) ---------- */
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > span, .lbl-s { font-size: 12px; color: var(--ink2); }
.input, .select { width: 100%; min-height: 44px; border: 0; border-bottom: 1px solid var(--beton); background: transparent; padding: 8px 0; font-size: 16px; border-radius: 0; color: var(--stone); -webkit-appearance: none; appearance: none; }
.select { background-image: linear-gradient(45deg, transparent 50%, var(--ink2) 50%), linear-gradient(135deg, var(--ink2) 50%, transparent 50%); background-position: calc(100% - 9px) 52%, calc(100% - 4px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 22px; }
.textarea { width: 100%; min-height: 96px; border: 1px solid var(--beton); background: transparent; padding: 8px 10px; font-size: 16px; border-radius: 0; resize: vertical; line-height: 1.5; color: var(--stone); -webkit-appearance: none; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--stone); }
.input::placeholder, .textarea::placeholder { color: var(--ink3); }
.grid { display: grid; gap: 14px 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.check { display: flex; align-items: flex-start; gap: 10px; min-height: 40px; font-size: 14.5px; line-height: 1.45; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--stone); }
.seg { display: inline-flex; border: 1px solid var(--stone); }
.seg button { min-height: 40px; padding: 0 14px; border: 0; background: transparent; font-size: 13.5px; }
.seg button + button { border-left: 1px solid var(--stone); }
.seg button[aria-pressed="true"] { background: var(--stone); color: var(--chaux); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 38px; padding: 0 13px; border: 1px solid var(--beton); background: transparent; font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; }
.chip[aria-pressed="true"] { background: var(--stone); color: var(--chaux); border-color: var(--stone); }

/* ---------- Blocs : filets, pas de cartes ---------- */
.card { background: transparent; border: 0; border-top: 1px solid var(--stone); padding: 16px 0 22px; }
.card-stone { background: var(--enduit); padding: 16px; }
.tag { display: inline-flex; align-items: center; min-height: 22px; padding: 0 7px; border: 1px solid var(--stone); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.tag-fill { background: var(--stone); color: var(--chaux); }
.tag-dash { border-style: dashed; color: var(--ink2); border-color: var(--ink3); }
.kv { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--enduit); font-size: 14.5px; }
.kv:last-child { border-bottom: 0; }
.kv > span:first-child { color: var(--ink2); }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 10px 0 12px; border-top: 1px solid var(--stone); text-decoration: none; }
.stat b { font-size: 40px; font-weight: 300; line-height: 1.05; }
.stat span { font-size: 12px; color: var(--ink2); }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 2px 0 2px 12px; border-left: 2px solid var(--stone); font-size: 13.5px; line-height: 1.5; color: var(--stone); }
.alert-soft { border-left-color: var(--beton); color: var(--ink2); }
.empty { padding: 36px 20px; text-align: center; border: 1px dashed var(--beton); color: var(--ink2); display: flex; flex-direction: column; align-items: center; gap: 12px; font-size: 14.5px; line-height: 1.5; }
.empty .title-sm { color: var(--stone); }

/* Listes */
.list { border-top: 1px solid var(--stone); }
.row { display: flex; align-items: center; gap: 14px; min-height: 62px; padding: 10px 0; border-bottom: 1px solid var(--enduit); text-decoration: none; color: inherit; background: transparent; width: 100%; text-align: left; border-left: 0; border-right: 0; border-top: 0; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-t { font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-s { font-size: 12.5px; color: var(--ink3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-code { font-size: 12px; letter-spacing: .06em; color: var(--ink2); font-variant-numeric: tabular-nums; width: 72px; flex-shrink: 0; }
.chev { color: var(--ink3); flex-shrink: 0; }

/* Onglets du projet */
.ptabs { display: flex; border-bottom: 1px solid var(--rule); overflow-x: auto; scrollbar-width: none; margin: 0 -20px 24px; padding: 0 20px; position: sticky; top: 0; background: var(--chaux); z-index: 5; }
.ptabs::-webkit-scrollbar { display: none; }
.ptabs a { display: flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 12px; text-decoration: none; font-size: 15px; color: var(--ink2); border-bottom: 1.5px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.ptabs a[aria-current="page"] { color: var(--stone); border-bottom-color: var(--stone); }
.ptabs .n { font-size: 11px; color: var(--ink3); font-variant-numeric: tabular-nums; }

/* Phases */
.track { display: grid; overflow-x: auto; padding: 14px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin-bottom: 22px; gap: 0; scrollbar-width: none; }
.track button { display: flex; flex-direction: column; gap: 7px; align-items: flex-start; background: none; border: 0; padding: 0; text-align: left; min-height: 44px; }
.track .dot { display: flex; align-items: center; width: 100%; }
.track .dot i { width: 11px; height: 11px; border: 1px solid var(--ink3); background: var(--chaux); flex-shrink: 0; }
.track .dot b { flex: 1; height: 1px; background: var(--rule); }
.track .done i { background: var(--stone); border-color: var(--stone); }
.track .done b { background: var(--stone); }
.track .cur i { border: 3px solid var(--stone); }
.track .nm { font-size: 11.5px; letter-spacing: .08em; color: var(--ink2); }
.track .cur .nm, .track .done .nm { color: var(--stone); }

/* ---------- Calques : feuilles, dialogues, message ---------- */
#layer { position: relative; z-index: 50; }
.scrim { position: fixed; inset: 0; background: rgba(22, 22, 22, .42); z-index: 50; }
.sheet { position: fixed; z-index: 51; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--chaux); border-left: 1px solid var(--stone); display: flex; flex-direction: column; }
.sheet-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(14px + var(--safe-t)) 20px 12px; border-bottom: 1px solid var(--stone); }
.sheet-b { flex: 1; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 16px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.sheet-f { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 20px calc(12px + var(--safe-b)); border-top: 1px solid var(--rule); flex-wrap: wrap; }
.modal { position: fixed; z-index: 51; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(500px, calc(100% - 32px)); max-height: calc(100% - 48px); background: var(--chaux); border: 1px solid var(--stone); display: flex; flex-direction: column; }
.full { position: fixed; z-index: 60; inset: 0; background: var(--chaux); display: flex; flex-direction: column; }
#toast { position: fixed; left: 50%; bottom: calc(28px + var(--safe-b)); transform: translateX(-50%); z-index: 90; pointer-events: none; }
#toast div { background: var(--stone); color: var(--chaux); padding: 12px 16px; font-size: 13px; margin-top: 8px; max-width: min(92vw, 520px); }

/* ---------- Notes ---------- */
.note-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 24px; }
.note-card { border-top: 1px solid var(--stone); padding: 14px 0 18px; display: flex; flex-direction: column; gap: 8px; text-decoration: none; min-height: 160px; }
.note-card .nt { font-size: 18px; font-weight: 300; }
.note-card .ex { font-size: 13.5px; color: var(--ink2); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.note-card svg.mini { width: 100%; height: 70px; background: var(--paper); border: 1px solid var(--enduit); }
.items { display: flex; flex-direction: column; gap: 6px; }
.item { display: flex; gap: 10px; align-items: center; }
.sketch-wrap { position: relative; background: var(--paper); border: 1px solid var(--beton); touch-action: pan-y; overflow: hidden; }
.sketch-wrap.finger { touch-action: none; }
.sketch-wrap svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sketch-grid { background-image: linear-gradient(var(--enduit) 1px, transparent 1px), linear-gradient(90deg, var(--enduit) 1px, transparent 1px); background-size: 24px 24px; }
.toolbar { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.tool { min-width: 44px; min-height: 44px; padding: 0 11px; border: 1px solid var(--beton); background: transparent; color: var(--stone); font-size: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex-shrink: 0; text-decoration: none; }
.tool[aria-pressed="true"] { background: var(--stone); color: var(--chaux); border-color: var(--stone); }

/* ---------- Plans ---------- */
.plan-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px 24px; }
.plan-card { text-decoration: none; display: flex; flex-direction: column; border-top: 1px solid var(--stone); padding-top: 12px; }
.plan-card .thumb { aspect-ratio: 1.414; background: var(--paper); border: 1px solid var(--rule); display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--ink3); }
.plan-card .thumb img { width: 100%; height: 100%; object-fit: contain; }
.plan-card .meta { padding: 10px 0 0; display: flex; flex-direction: column; gap: 6px; }
.plan-card .pt { font-size: 16px; text-decoration: none; }

/* Visionneuse : chrome clair, table de travail grise comme l'aperçu d'Honoraires */
.viewer { position: fixed; inset: 0; z-index: 40; background: var(--desk); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); }
.viewer > * { min-width: 0; }
.viewer.with-panel { grid-template-columns: minmax(0, 1fr) 380px; }
.viewer.with-panel .v-top, .viewer.with-panel .v-bot { grid-column: 1 / -1; }
.v-top { display: flex; align-items: center; gap: 10px; padding: calc(8px + var(--safe-t)) 12px 8px; background: var(--chaux); color: var(--stone); flex-wrap: wrap; border-bottom: 1px solid var(--stone); }
.v-top > .toolbar, .v-bot > .toolbar, .pen-strip { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.v-top > .toolbar::-webkit-scrollbar, .v-bot > .toolbar::-webkit-scrollbar, .pen-strip::-webkit-scrollbar { display: none; }
.v-title { flex: 1; min-width: 160px; display: flex; flex-direction: column; gap: 1px; }
.v-title b { font-weight: 300; font-size: 20px; line-height: 1.15; }
.v-title span { font-size: 12px; color: var(--ink2); }
.v-stage { position: relative; overflow: hidden; touch-action: none; background: var(--desk); }
.v-sheet { position: absolute; left: 0; top: 0; transform-origin: 0 0; background: var(--paper); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.v-sheet .pdf { position: absolute; inset: 0; width: 100%; height: 100%; }
.v-sheet canvas.detail { position: absolute; }
.v-sheet svg.ink { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.v-stage.erasing svg.v-ink path { pointer-events: visiblePainted; cursor: pointer; }
.v-load { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--chaux); border: 1px solid var(--stone); padding: 14px 18px; font-size: 13px; z-index: 4; min-width: 220px; text-align: center; pointer-events: none; }
.v-load i { display: block; height: 2px; background: var(--rule); margin-top: 10px; overflow: hidden; position: relative; }
.v-load i::after { content: ''; position: absolute; left: -40%; top: 0; bottom: 0; width: 40%; background: var(--stone); animation: slide 1.1s linear infinite; }
@keyframes slide { to { left: 100%; } }
.pin { position: absolute; width: 0; height: 0; }
.pin button { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); pointer-events: auto; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--paper); background: var(--stone); color: var(--paper); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 0; line-height: 1; box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.pin button b { font-size: 13px; font-weight: 600; }
.pin button i { font-style: normal; font-size: 8px; letter-spacing: .04em; }
.pin.leve button { background: var(--paper); color: var(--ink2); border: 2px dashed var(--ink3); }
.pin.sel button { background: var(--paper); color: var(--stone); border: 3px solid var(--stone); width: 48px; height: 48px; box-shadow: 0 0 0 5px rgba(22,22,22,.18); }
.vtext { position: absolute; pointer-events: auto; transform: translate(0, -50%); transform-origin: 0 50%; font-family: var(--sans); font-size: 15px; background: rgba(255,255,255,.9); padding: 2px 6px; border: 1px solid var(--stone); white-space: pre; color: var(--stone); }
.v-bot { display: flex; align-items: center; gap: 8px; padding: 8px 12px calc(8px + var(--safe-b)); background: var(--chaux); border-top: 1px solid var(--stone); flex-wrap: wrap; justify-content: space-between; }
.v-bot .info { font-size: 12px; color: var(--ink2); }
.v-bot .select { min-height: 40px; width: auto; max-width: 300px; }
.v-panel { background: var(--chaux); border-left: 1px solid var(--stone); display: flex; flex-direction: column; min-height: 0; grid-row: 2; grid-column: 2; }
.hintbar { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); background: var(--stone); color: var(--chaux); padding: 8px 14px; font-size: 13px; pointer-events: none; z-index: 3; }
.photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.photo { position: relative; aspect-ratio: 1; background: var(--enduit); border: 1px solid var(--rule); padding: 0; overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-add { border-style: dashed; border-color: var(--beton); display: flex; align-items: center; justify-content: center; font-size: 12.5px; color: var(--ink2); flex-direction: column; gap: 4px; background: transparent; }

/* Éditeur de photo */
.ped-stage { flex: 1; position: relative; background: var(--desk); display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; }
.ped-box { position: relative; }
.ped-box img { width: 100%; height: 100%; display: block; }
.ped-box svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Points */
.pt-num { width: 42px; height: 42px; border-radius: 50%; background: var(--stone); color: var(--paper); display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; line-height: 1; }
.pt-num b { font-size: 14px; font-weight: 600; }
.pt-num i { font-size: 8px; font-style: normal; }
.pt-num.leve { background: transparent; color: var(--ink2); border: 2px dashed var(--ink3); }
.pt-thumb { width: 54px; height: 54px; object-fit: cover; flex-shrink: 0; border: 1px solid var(--rule); }

/* Fichiers */
.folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 20px; margin-bottom: 24px; border-top: 1px solid var(--stone); }
.folder { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 4px; background: transparent; border: 0; border-bottom: 1px solid var(--enduit); text-align: left; color: var(--ink2); }
.folder[aria-pressed="true"] { color: var(--stone); border-bottom: 1.5px solid var(--stone); }
.folder b { font-weight: 400; font-size: 14px; flex: 1; letter-spacing: .04em; }
.folder small { font-size: 12px; color: var(--ink3); }
.fname { font-variant-numeric: tabular-nums; letter-spacing: .01em; }

/* Tableaux */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; border-top: 1px solid var(--stone); }
.tbl th { text-align: left; font-weight: 400; font-size: 12px; color: var(--ink2); padding: 10px 10px 8px 0; border-bottom: 1px solid var(--beton); }
.tbl td { padding: 9px 10px 9px 0; border-bottom: 1px solid var(--enduit); vertical-align: middle; }
.tbl-wrap { overflow-x: auto; }
.lotblock { border-top: 1px solid var(--stone); margin-bottom: 14px; }
.pt-line { display: flex; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--enduit); }

.saved { font-size: 12px; color: var(--ink3); min-height: 18px; }
.dotsep::before { content: '·'; margin: 0 6px; color: var(--ink3); }
.muted { color: var(--ink2); }
.small { font-size: 13px; }
.mt { margin-top: 20px; }
.mb { margin-bottom: 22px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 48px; align-items: start; }
.cols > * { min-width: 0; }
.flexb { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Couleurs et épaisseurs du trait */
.pen-strip { display: flex; align-items: center; gap: 4px; width: 100%; padding-top: 2px; color: var(--stone); }
.pen-strip .sep { width: 1px; align-self: stretch; background: var(--rule); margin: 0 6px; flex-shrink: 0; }
.pen-strip .lbl-p { font-size: 12px; color: var(--ink2); flex-shrink: 0; margin-right: 2px; }
.pen-strip.light { flex-wrap: wrap; }
.swatch { width: 40px; height: 40px; flex-shrink: 0; border: 1px solid transparent; background: transparent; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.swatch i { width: 24px; height: 24px; border-radius: 50%; display: block; box-shadow: 0 0 0 1px rgba(22,22,22,.18); }
.swatch[aria-pressed="true"] { border-color: var(--stone); }
.wbtn { width: 44px; height: 40px; flex-shrink: 0; border: 1px solid transparent; background: transparent; color: inherit; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.wbtn b { display: block; width: 22px; border-radius: 4px; background: currentColor; }
.wbtn[aria-pressed="true"] { border-color: var(--stone); }

/* ---------- Tablette portrait et téléphone ---------- */
@media (max-width: 1400px) { .viewer .tool-l { display: none; } }
@media (max-width: 1000px) {
  .cols { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .viewer.with-panel { grid-template-columns: minmax(0, 1fr) 350px; }
}
@media (max-width: 900px) {
  .masthead nav, .masthead .who { display: none; }
  .masthead { padding: calc(12px + var(--safe-t)) 18px 12px; }
  .masthead .brand svg { width: 150px; }
  .view { padding-bottom: calc(var(--tab) + var(--safe-b)); }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(244,243,240,.96); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-top: 1px solid var(--stone); padding-bottom: var(--safe-b); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: var(--tab); color: var(--ink3); text-decoration: none; font-size: 11.5px; }
  .tabbar a[aria-current="page"] { color: var(--stone); }
  .page { padding: 20px 18px 40px; }
  .ptabs { margin: 0 -18px 20px; padding: 0 18px; }
  .title { font-size: 30px; }
  .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-l { display: none; }
  .v-top { gap: 8px; padding: calc(8px + var(--safe-t)) 8px 8px; }
  .v-top .v-title { flex: 1 1 calc(100% - 60px); }
  .v-top > .toolbar { flex: 1 1 100%; }
  .v-top .tool { min-width: 42px; padding: 0 8px; }
  .v-bot .info { display: none; }
  .viewer.with-panel { grid-template-columns: minmax(0, 1fr); }
  .viewer.with-panel .v-panel { position: fixed; left: 0; right: 0; bottom: 0; max-height: 62dvh; border-left: 0; border-top: 1px solid var(--stone); z-index: 45; }
  .sheet { width: 100%; top: auto; max-height: 92dvh; border-left: 0; border-top: 1px solid var(--stone); }
  .row-code { display: none; }
}
@media (max-width: 560px) {
  .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
  .span2 { grid-column: auto; }
  .page-head { margin-bottom: 16px; }
  .btn { padding: 10px 13px; }
  .v-title b { font-size: 17px; }
}
@media print { .masthead, .tabbar, .ptabs, .actions { display: none !important; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Entreprises : étiquettes sous le nom sur téléphone */
.row-tags{display:flex;gap:6px;flex-shrink:0;align-items:center}
.row-x{display:none;font-size:12px;color:var(--ink3);letter-spacing:.02em}
@media (max-width:700px){.row-tags{display:none}.row-x{display:block}}

/* Mode rendez-vous client */
body.rdv-mode .masthead, body.rdv-mode .tabbar{display:none}
.rdv{max-width:1180px;margin:0 auto;padding:22px 28px 60px}
.rdv-head{display:flex;justify-content:space-between;align-items:center;padding-bottom:16px;border-bottom:1px solid var(--stone)}
.rdv-logo svg{height:46px;width:auto;display:block}
.rdv-actions{display:flex;gap:8px}
.rdv-hero{padding:34px 0 18px}
.rdv-title{font-weight:300;font-size:clamp(34px,5vw,56px);letter-spacing:-.01em;margin:6px 0 4px;line-height:1.05}
.rdv-sub{color:var(--ink2);font-size:17px}
.rdv-phases{display:grid;grid-template-columns:repeat(10,1fr);gap:4px;margin:8px 0 26px}
.rdv-ph{border-top:3px solid var(--rule);padding-top:8px;font-size:11px;color:var(--ink3);min-width:0}
.rdv-ph b{display:block;font-weight:500;font-size:12px;letter-spacing:.08em;color:var(--ink3)}
.rdv-ph span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rdv-ph.done{border-color:var(--ink2)} .rdv-ph.done b{color:var(--ink2)}
.rdv-ph.now{border-color:var(--stone);color:var(--stone)} .rdv-ph.now b{color:var(--stone)}
.rdv-phtext{grid-column:1/-1;margin:14px 0 0;font-size:16px;color:var(--ink2)} .rdv-phtext b{color:var(--stone);font-weight:500}
.rdv-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 40px}
.rdv-card{border-top:1px solid var(--stone);padding:16px 0 26px;min-width:0}
.rdv-card h2{font-size:11px;letter-spacing:.18em;text-transform:uppercase;font-weight:500;color:var(--ink3);margin:0 0 12px}
.rdv-card h3{font-size:11px;letter-spacing:.14em;text-transform:uppercase;font-weight:500;color:var(--ink3);margin:16px 0 6px}
.rdv-list{margin:0;padding:0;list-style:none}
.rdv-list li{padding:8px 0;border-bottom:1px solid var(--rule);font-size:16px}
.rdv-list small{color:var(--ink3)}
.rdv-area{font-size:17px;min-height:120px}
.rdv-plans{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:14px}
.rdv-plan{text-decoration:none;color:inherit;display:block}
.rdv-plan img,.rdv-plan .ph{width:100%;aspect-ratio:1.414;object-fit:contain;background:#fff;border:1px solid var(--rule);display:block}
.rdv-plan span{display:block;font-size:13px;margin-top:6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rdv-google{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:10px;margin-bottom:12px}
.gbtn{display:flex;gap:12px;align-items:center;padding:14px;border:1px solid var(--rule);text-decoration:none;color:var(--stone);background:var(--chaux);min-width:0}
.gbtn:hover{border-color:var(--stone)}
.gbtn b{display:block;font-weight:500;font-size:15px}
.gbtn small{display:block;color:var(--ink3);font-size:12px}
.gbtn-in span{flex:1;min-width:0} .gbtn-in .input{font-size:13px;padding:4px 0}
@media (max-width:760px){.rdv{padding:16px 18px 50px}.rdv-grid{grid-template-columns:1fr}.rdv-phases{grid-template-columns:repeat(5,1fr);row-gap:12px}.rdv-logo svg{height:34px}}

/* Écoute IA */
.listen-consent{display:flex;gap:10px;align-items:flex-start;font-size:14px;color:var(--ink2);margin-bottom:12px}
.listen-consent input{width:20px;height:20px;flex-shrink:0;accent-color:var(--stone)}
.listen-bar{display:flex;gap:14px;align-items:center;flex-wrap:wrap;margin-bottom:10px}
.listen-btn.on{background:#B3261E;border-color:#B3261E}
.listen-live{min-height:20px;font-style:italic;color:var(--ink3);font-size:14px;margin-bottom:4px}
.listen-tx{font-size:15px}
.listen-steps{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:14px 0 8px}

/* Google Drive */
.drive-crumbs{display:flex;flex-wrap:wrap;align-items:center;gap:2px;margin:4px 0 12px;font-size:14px}
.linkish{background:none;border:0;padding:4px 2px;color:var(--stone);font:inherit;cursor:pointer;text-decoration:underline;text-underline-offset:3px;text-decoration-color:var(--beton)}
.linkish:last-child{text-decoration:none;font-weight:500}

/* Croquis : fond uni par défaut, points en option, plein écran */
.sketch-wrap { background: #fff; }
.sketch-dots { background-color: #fff; background-image: radial-gradient(circle, #CFCCC5 1px, transparent 1.2px); background-size: 22px 22px; }
.tool-strong { border-color: var(--stone); }
.sk-full { position: fixed; inset: 0; z-index: 60; background: var(--chaux); display: flex; flex-direction: column; padding: max(12px, env(safe-area-inset-top)) 16px max(10px, env(safe-area-inset-bottom)); gap: 10px; }
.sk-full-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sk-full .pen-strip { margin: 0; }
.sk-full-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.sk-full-stage .sketch-wrap { aspect-ratio: auto; box-shadow: 0 1px 0 var(--rule); }
.sk-full-hint { text-align: center; }

/* Choix des pages d'un PDF */
.page-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-top: 12px; }
.pp-cell { display: flex; flex-direction: column; gap: 4px; padding: 6px; background: #fff; border: 1px solid var(--rule); text-align: left; cursor: pointer; position: relative; font: inherit; color: var(--stone); }
.pp-cell[aria-pressed="true"] { border: 2px solid var(--stone); padding: 5px; }
.pp-cell[aria-pressed="true"]::after { content: '✓'; position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; background: var(--stone); color: var(--chaux); font-size: 13px; display: grid; place-items: center; }
.pp-img { aspect-ratio: 1.414; display: grid; place-items: center; background: #fff; overflow: hidden; }
.pp-canvas { width: 100%; height: 100%; object-fit: contain; }
.pp-n { font-weight: 500; font-size: 14px; }
.pp-t { display: block; min-height: 1.2em; }

/* Visionneuse : couche nette au-dessus de la feuille (points, textes, traits vectoriels) */
.v-stage svg.v-ink { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: hidden; }
.v-over { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.v-sheet canvas.detail { image-rendering: auto; }
.pin button { background: var(--lc, var(--stone)); }
.pin.leve button { background: var(--paper); }
.pin.prev button { opacity: .55; }
.v-visit { display: block; width: max-content; margin-left: 8px; font-size: 12px; padding: 1px 8px; border: 1px solid currentColor; color: inherit; text-decoration: none; }

/* Carnet de croquis : onglets, fond photo/plan, calques */
.sk-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.sk-tab { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px; border: 1px solid var(--beton); background: #fff; font: inherit; font-size: 14px; color: inherit; cursor: pointer; }
.sk-tab[aria-selected="true"] { background: #161616; color: #fff; border-color: #161616; }
.sk-add { border-style: dashed; color: var(--muted, #6b6862); }
.sk-tag { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.sketch-wrap img.sk-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; pointer-events: none; user-select: none; -webkit-user-select: none; }
.sk-op { display: inline-flex; align-items: center; gap: 8px; }
.sk-op input { width: 110px; accent-color: #161616; }
.row-btn { cursor: pointer; font: inherit; }
.row-btn svg { flex-shrink: 0; }
.mini-sk { position: relative; }
.mini-sk img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; }
.drive-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.drive-filters input[type=search] { flex: 1 1 260px; }
.drive-filters select { flex: 0 1 200px; }
.chk { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 12px; border: 1px solid var(--beton); background: #fff; cursor: pointer; }
.chk input { width: 20px; height: 20px; accent-color: #161616; }
.cr-echanges { white-space: pre-wrap; font-size: 14.5px; line-height: 1.55; background: #fff; border: 1px solid var(--rule); padding: 14px 16px; max-height: 420px; overflow: auto; }
/* Écoute en cours : bandeau visible sur toutes les pages */
.listen-float { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 9000; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; background: #161616; color: #fff; box-shadow: 0 8px 28px rgba(0,0,0,.28); font-size: 14px; max-width: calc(100vw - 24px); }
.listen-float .lf-dot { width: 10px; height: 10px; border-radius: 50%; background: #E5484D; flex-shrink: 0; animation: lfpulse 1.4s ease-in-out infinite; }
.listen-float .lf-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.listen-float .lf-btn { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid rgba(255,255,255,.4); background: transparent; color: #fff; font: inherit; text-decoration: none; cursor: pointer; white-space: nowrap; }
.listen-float .lf-stop { background: #B3261E; border-color: #B3261E; }
@keyframes lfpulse { 50% { opacity: .35; } }
@media print { .listen-float { display: none !important; } }
.note-card-visit { border-left: 3px solid #161616; }
/* Dossier de phase */
.dos-covers { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.dos-cover { display: flex; flex-direction: column; gap: 6px; padding: 6px; border: 1px solid var(--rule); background: #fff; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.dos-cover[aria-pressed="true"] { border-color: #161616; box-shadow: inset 0 0 0 1px #161616; }
.dos-cover img { display: block; width: 100%; height: auto; aspect-ratio: 1.414; object-fit: contain; background: #fff; border: 1px solid var(--rule); }
.dos-cover-ph { width: 100%; aspect-ratio: 1.414; background: var(--chaux, #F4F3F0); display: flex; align-items: center; justify-content: center; color: var(--beton); font-size: 28px; }
.dos-cover .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dos-piece { gap: 8px; }
.dos-piece input[type=checkbox] { width: 22px; height: 22px; accent-color: #161616; }
.dos-covers { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.dos-cover { min-width: 0; }
.dos-cover .small { display: block; max-width: 100%; }
.sheet .seg { flex-wrap: wrap; }
.dos-piece .row-main { min-width: 0; }
.dos-piece .row-main input { width: 100%; }
.dos-piece-th { display: block; width: 64px; height: 45px; object-fit: contain; background: #fff; border: 1px solid var(--rule); flex-shrink: 0; }
/* Honoraires : suivi de facturation */
.fee-alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; margin: 12px 0; background: #F7EFE0; border-left: 3px solid #B7791F; color: #161616; text-decoration: none; }
.fee-alert.late { background: #F8E9E7; border-left-color: #A23B2A; }
.fee-alert-link { align-items: center; }
.fee-alert-link .small { margin-left: auto; white-space: nowrap; }
.fee-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.fee-kpi { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: #fff; border: 1px solid var(--rule); }
.fee-kpi b { font-weight: 400; font-size: 22px; }
.fee-kpi.strong { border-color: #B7791F; background: #FBF6EC; }
.fee-bar { display: flex; height: 10px; background: var(--enduit, #E7E5E0); overflow: hidden; }
.fee-bar i { display: block; height: 100%; }
.fee-bar .paid, .lg.paid { background: #161616; }
.fee-bar .billed, .lg.billed { background: #8C8981; }
.fee-bar .due, .lg.due { background: #D9A441; }
.fee-legend { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fee-legend .lg { display: inline-block; width: 10px; height: 10px; margin-left: 8px; }
.fee-row { gap: 8px; flex-wrap: wrap; }
.fee-row.due { background: #FBF6EC; }
.fee-row.avoir { opacity: .8; font-style: italic; }
.fee-st { min-width: 72px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--beton); }
.fee-st.on { color: #161616; }
.fee-tag { background: #F7EFE0; border-color: #B7791F; color: #7A4F10; }
.fee-tag.late { background: #F8E9E7; border-color: #A23B2A; color: #A23B2A; }

.fee-row.ok .fee-st { color: #2E7D32; }
.fee-row.wait { background: #F4F3F0; }
.fee-row.wait .fee-st { color: #7A4F10; }
.fee-alert .btn { white-space: nowrap; align-self: center; }

.fee-row.ok .fee-st { color: #2E7D32; }
.fee-row.wait { background: #F4F3F0; }
.fee-row.wait .fee-st { color: #7A4F10; }
.fee-alert .btn { white-space: nowrap; align-self: center; }
/* Assistant de rangement */
.rg-row { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.rg-row.on { background: #FBF6EC; }
.rg-src { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rg-src input[type=checkbox] { width: 22px; height: 22px; accent-color: #161616; }
.rg-name { font-weight: 500; color: inherit; word-break: break-all; }
.rg-dst { display: grid; grid-template-columns: auto minmax(120px, 1fr) minmax(160px, 1.3fr); gap: 8px; align-items: center; padding-left: 30px; }
.rg-dst .input { grid-column: 2 / -1; font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
@media (max-width: 700px) { .rg-dst { grid-template-columns: 1fr; padding-left: 0; } .rg-dst .input { grid-column: auto; } }
/* Import de contrat : vérification ligne par ligne */
.ci-head { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 14px 16px; background: #fff; border: 1px solid var(--rule); margin-bottom: 8px; }
.ci-head > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ci-head b { font-weight: 400; overflow-wrap: anywhere; }
.ci-total { font-size: 20px; white-space: nowrap; }
.ci-phase { margin: 14px 0 4px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--beton); }
.ci-line { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.ci-lab { display: flex; gap: 10px; align-items: flex-start; }
.ci-t { font-size: 15px; line-height: 1.35; }
.ci-n { flex: 0 0 22px; height: 22px; border-radius: 50%; background: var(--enduit, #E7E5E0); font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.ci-ctl { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(130px, .7fr) minmax(110px, .6fr) 24px; gap: 10px; align-items: center; padding-left: 32px; }
.ci-ctl .select { min-width: 0; width: 100%; }
.ci-ht { display: flex; align-items: center; gap: 6px; }
.ci-ht .input { text-align: right; min-width: 0; width: 100%; }
.ci-ht span, .ci-ttc { font-size: 13px; color: var(--beton); white-space: nowrap; }
.ci-st.ok, .ci-check.ok b { color: #2F6B3A; }
.ci-st.ko, .ci-check.ko b { color: #B7791F; }
.ci-checks { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.ci-check { display: flex; gap: 10px; align-items: baseline; font-size: 14px; }
.ci-check.ko { color: #7A4E10; }
.ci-sched { display: flex; flex-direction: column; margin-top: 8px; }
.ci-srow { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--rule); }
.ci-srow .ci-l { display: flex; flex-direction: column; gap: 2px; }
.ci-srow small { color: var(--beton); font-size: 12px; }
.ci-srow b { font-weight: 400; white-space: nowrap; }
.ci-srow.tot b, .ci-srow.tot .ci-l { font-weight: 600; }
.ci-srow.tot { border-bottom: 0; margin-bottom: 6px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
@media (max-width: 700px) { .ci-ctl { grid-template-columns: 1fr 1fr; padding-left: 0; } .ci-head { grid-template-columns: 1fr; } }
.ci-srow.tot .ci-n { visibility: hidden; }
/* Dossier : pièces */
.dos-piece.off { opacity: .55; }
.dos-piece .row-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dos-cart { border: 1px solid var(--rule); background: #fff; font: inherit; font-size: 12px; padding: 6px 8px; white-space: nowrap; cursor: pointer; }
.dos-cart.own { background: #161616; color: #fff; border-color: #161616; }
.dos-warn { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: #7A4E10; margin: 8px 0; }
.dos-warn:empty { display: none; }
.dos-warn b { color: #161616; font-weight: 600; }
/* Dossier de phase v2 : un PDF par ligne */
.dos-top { align-items: end; }
.dos-sec { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.dos-groups { display: flex; flex-direction: column; border-top: 1px solid var(--rule); }
.dos-g { border-bottom: 1px solid var(--rule); }
.dos-g.off .dos-g-head > :not(.dos-tick):not(.dos-g-more) { opacity: .5; }
.dos-g-head { display: grid; grid-template-columns: 30px 86px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 12px 0; }
.dos-g-th { display: block; width: 86px; height: 60px; object-fit: contain; background: #fff; border: 1px solid var(--rule); }
.dos-g-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; text-align: left; background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.dos-g-t { font-size: 15.5px; line-height: 1.3; overflow-wrap: anywhere; }
.dos-g-tag { align-self: flex-start; font-size: 11.5px; letter-spacing: .04em; padding: 2px 8px; background: var(--enduit, #E7E5E0); color: #4A4844; }
.dos-g-more { white-space: nowrap; }
.dos-g-mv { display: flex; }
.dos-tick { width: 26px; height: 26px; border: 1.5px solid #161616; background: #fff; color: #fff; font-size: 16px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; border-radius: 0; }
.dos-tick.on { background: #161616; }
.dos-g-pages { display: flex; flex-direction: column; gap: 2px; padding: 0 0 12px 42px; }
.dos-p { display: grid; grid-template-columns: 26px 64px 78px minmax(0, 1fr) 76px 56px auto; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--rule); }
.dos-p.off > :not(.dos-tick) { opacity: .45; }
.dos-p-th { display: block; width: 64px; height: 45px; object-fit: contain; background: #fff; border: 1px solid var(--rule); }
.dos-p-n { font-size: 12px; color: var(--beton); white-space: nowrap; }
.dos-p .input { min-width: 0; width: 100%; font-size: 14px; }
.dos-fold { border-top: 1px solid var(--rule); margin-top: 14px; }
.dos-fold:last-of-type { border-bottom: 1px solid var(--rule); }
.dos-fold summary { display: flex; align-items: baseline; gap: 12px; padding: 14px 0; cursor: pointer; list-style: none; }
.dos-fold summary::-webkit-details-marker { display: none; }
.dos-fold summary::after { content: '▾'; margin-left: auto; color: var(--beton); }
.dos-fold[open] summary::after { content: '▴'; }
.dos-fold-t { font-size: 19px; font-weight: 300; }
.dos-fold-b { display: flex; flex-direction: column; gap: 14px; padding-bottom: 16px; }
@media (max-width: 760px) {
  .dos-g-head { grid-template-columns: 30px 64px minmax(0, 1fr); }
  .dos-g-th { width: 64px; height: 45px; }
  .dos-g-more, .dos-g-mv { grid-column: 3; justify-self: start; }
  .dos-g-pages { padding-left: 0; }
  .dos-p { grid-template-columns: 26px 64px minmax(0, 1fr) 70px 50px; }
  .dos-p-n, .dos-p .dos-cart { grid-column: 3 / -1; }
}

/* Écran de verrouillage Face ID */
.lockscreen { position: fixed; inset: 0; z-index: 100; background: var(--chaux); display: flex; align-items: center; justify-content: center; padding: calc(24px + var(--safe-t)) 24px calc(24px + var(--safe-b)); }
.lock-in { display: flex; flex-direction: column; align-items: center; gap: 22px; width: min(360px, 100%); }
.lock-in .btn { width: 100%; justify-content: center; }
html:has(.lockscreen) body { overflow: hidden; }
/* Aperçu du sélecteur d'apps : contenu masqué quand l'Atelier passe en arrière-plan */
html.veiled #app, html.veiled #layer { visibility: hidden; }
