/* ════════════════════════════════════════════════════════════════
   JTS Chantiers — style iOS
   ════════════════════════════════════════════════════════════════ */
:root {
  --bg: #f2f2f7;
  --card: #ffffff;
  --card-2: #f8f8fa;
  --text: #1c1c1e;
  --text-2: #6e6e73;
  --text-3: #aeaeb2;
  --sep: rgba(60, 60, 67, 0.14);
  --fill: rgba(118, 118, 128, 0.12);
  --fill-2: rgba(118, 118, 128, 0.07);
  --bar: rgba(249, 249, 251, 0.86);
  --accent: #e2611b;
  --accent-tint: rgba(226, 97, 27, 0.12);
  --green: #34c759;
  --orange: #ff9500;
  --red: #ff3b30;
  --blue: #007aff;
  --purple: #af52de;
  --gray: #8e8e93;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 28px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --tabbar: 58px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --card: #1c1c1e;
    --card-2: #2c2c2e;
    --text: #f5f5f7;
    --text-2: #98989d;
    --text-3: #636366;
    --sep: rgba(84, 84, 88, 0.55);
    --fill: rgba(118, 118, 128, 0.24);
    --fill-2: rgba(118, 118, 128, 0.14);
    --bar: rgba(22, 22, 24, 0.86);
    --accent: #ff7a2e;
    --accent-tint: rgba(255, 122, 46, 0.16);
    --green: #30d158;
    --orange: #ff9f0a;
    --red: #ff453a;
    --blue: #0a84ff;
    --purple: #bf5af2;
    --shadow: none;
    --shadow-sm: none;
  }
}
:root[data-theme="dark"] {
    --bg: #000000;
    --card: #1c1c1e;
    --card-2: #2c2c2e;
    --text: #f5f5f7;
    --text-2: #98989d;
    --text-3: #636366;
    --sep: rgba(84, 84, 88, 0.55);
    --fill: rgba(118, 118, 128, 0.24);
    --fill-2: rgba(118, 118, 128, 0.14);
    --bar: rgba(22, 22, 24, 0.86);
    --accent: #ff7a2e;
    --accent-tint: rgba(255, 122, 46, 0.16);
    --green: #30d158;
    --orange: #ff9f0a;
    --red: #ff453a;
    --blue: #0a84ff;
    --purple: #bf5af2;
    --shadow: none;
    --shadow-sm: none;
}
:root { --d-fg: 255, 255, 255; --d-orange-t: #ffc266; --d-red-t: #ff8c84; --d-green-t: #7ee2a0; --d-blue-t: #8fb6ff; --d-purple-t: #d9a6f5; --d-tip: #1d222d; }
:root[data-theme="dark"] { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: none;
}
body.no-scroll { overflow: hidden; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: var(--accent); text-decoration: none; }
img, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }

/* ─── Icônes ───────────────────────────────────────────────────── */
.ic { display: inline-flex; width: 22px; height: 22px; flex: none; }
.ic svg { width: 100%; height: 100%; }
.ic.xl { width: 46px; height: 46px; color: var(--text-3); }
.ic.chev { width: 16px; height: 16px; color: var(--text-3); }
.tint-blue { color: var(--blue); }
.tint-red { color: var(--red); }
.tint-orange { color: var(--orange); }

/* ─── Mise en page ─────────────────────────────────────────────── */
.screen { min-height: 100dvh; padding-bottom: calc(var(--tabbar) + var(--safe-b) + 28px); }
.page { max-width: 640px; margin: 0 auto; padding: 0 16px; }
.page.wide { max-width: 1180px; }
.host { min-height: 100dvh; }

.lh { display: grid; gap: 6px; padding: calc(var(--safe-t) + 18px) 0 14px; }
.lh-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.lh-row > div:first-child { min-width: 0; }
.lh-title { margin: 0; font-size: clamp(26px, 7.4vw, 34px); line-height: 1.12; font-weight: 700; letter-spacing: -0.022em; overflow-wrap: anywhere; }
.lh-sub { font-size: 13.5px; color: var(--text-2); font-weight: 600; margin-bottom: 2px; }
.lh-right { flex: none; display: flex; align-items: center; gap: 8px; padding-bottom: 4px; }
.back-btn { display: inline-flex; align-items: center; gap: 2px; margin-left: -8px; border: 0; background: none; color: var(--accent); font-size: 17px; padding: 4px 4px; width: max-content; }
.back-btn .ic { width: 24px; height: 24px; }
.today-date { color: var(--text-2); font-size: 15px; margin: -8px 0 16px; }

/* ─── Barre d'onglets ──────────────────────────────────────────── */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; justify-content: space-around;
  height: calc(var(--tabbar) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: var(--bar); border-top: 0.5px solid var(--sep);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
}
.tab {
  position: relative; flex: 1; max-width: 120px; border: 0; background: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--gray); font-size: 10.5px; font-weight: 500; letter-spacing: 0.01em;
}
.tab .ic { width: 26px; height: 26px; }
.tab.on { color: var(--accent); }
.tab-badge, .side-badge {
  background: var(--red); color: #fff; font-size: 11.5px; font-weight: 700; line-height: 1;
  min-width: 18px; height: 18px; padding: 3px 5px; border-radius: 999px; text-align: center;
}
.tab-badge { position: absolute; top: 5px; left: calc(50% + 6px); }

/* ─── Groupes et lignes ────────────────────────────────────────── */
.group { margin: 22px 0; }
.group-title { font-size: 13px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-2); padding: 0 16px 7px; font-weight: 500; }
.group-card { background: var(--card); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); }
.row {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 50px; padding: 11px 16px; border: 0; background: none; text-align: left;
}
.row + .row::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: 0.5px solid var(--sep); }
.row.tap:active { background: var(--fill); }
@media (hover: hover) { .row.tap:hover { background: var(--fill-2); } }
.row-left { display: flex; flex: none; }
.row-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.row-title { font-size: 16.5px; overflow-wrap: anywhere; }
.row-sub { font-size: 13.5px; color: var(--text-2); overflow-wrap: anywhere; }
.row-right { flex: none; color: var(--text-2); font-size: 15px; display: flex; align-items: center; gap: 8px; }
.row.danger .row-title { color: var(--red); }
.row.accent .row-title { color: var(--accent); font-weight: 500; }
.row.dim { opacity: 0.55; }
.num { font-variant-numeric: tabular-nums; }
.b { font-weight: 700; }
.muted { color: var(--text-2); }
.small { font-size: 13.5px; }
.block { display: block; }
.center { text-align: center; }
.hint { font-size: 13.5px; color: var(--text-2); margin: 8px 4px; }
.hint.center { margin: 14px auto; }

/* ─── Boutons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 12px; padding: 12px 18px; font-size: 16px; font-weight: 600;
  background: var(--fill); color: var(--text); transition: transform 0.12s ease, opacity 0.2s ease, background 0.2s ease;
}
.btn:active:not(:disabled) { transform: scale(0.98); opacity: 0.85; }
.btn:disabled { opacity: 0.4; }
.btn .ic { width: 20px; height: 20px; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.tinted { background: var(--accent-tint); color: var(--accent); }
.btn.plain { background: none; color: var(--accent); }
.btn.danger { background: var(--red); color: #fff; }
.btn.plain.danger { background: none; color: var(--red); }
.btn.glass { background: rgba(255, 255, 255, 0.2); color: #fff; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.btn.big { width: 100%; min-height: 52px; font-size: 17px; border-radius: 14px; }
.btn.small { padding: 8px 13px; font-size: 14.5px; border-radius: 10px; }
.btn.small .ic { width: 18px; height: 18px; }
.btn.block { width: 100%; margin: 6px 0; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-col { display: grid; gap: 6px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; border: 0;
  width: 34px; height: 34px; background: var(--fill); color: var(--text-2); border-radius: 10px;
}
.icon-btn.round { border-radius: 999px; }
.icon-btn .ic { width: 18px; height: 18px; }
.icon-btn:disabled { opacity: 0.35; }
.icon-btn.glass { background: rgba(0, 0, 0, 0.45); color: #fff; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); width: 38px; height: 38px; }
.link {
  display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 0;
  color: var(--accent); font-weight: 600; font-size: 15px; text-align: left;
}
.link.center { display: flex; margin: 6px auto 0; justify-content: center; }
.link.danger { color: var(--red); }
.link .ic { width: 18px; height: 18px; }

/* ─── Pastilles ────────────────────────────────────────────────── */
.pill { display: inline-flex; align-items: center; font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; background: var(--fill); color: var(--text-2); }
.pill.purple { background: color-mix(in srgb, var(--purple) 15%, transparent); color: var(--purple); }
.pill.blue { background: color-mix(in srgb, var(--blue) 14%, transparent); color: var(--blue); }
.pill.red { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
.pill.green { background: color-mix(in srgb, var(--green) 16%, transparent); color: color-mix(in srgb, var(--green) 78%, var(--text)); }
.pill.orange { background: color-mix(in srgb, var(--orange) 16%, transparent); color: color-mix(in srgb, var(--orange) 82%, var(--text)); }
.pill.gray { background: var(--fill); color: var(--text-2); }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; display: inline-block; background: var(--gray); }
.dot.green { background: var(--green); }
.dot.orange { background: var(--orange); }
.dot.red { background: var(--red); }
.dot.blue { background: var(--blue); }
.dot.gray { background: var(--text-3); }
.dot.pulse, .chrono-card.running .dot { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 55%, transparent); } 50% { box-shadow: 0 0 0 6px transparent; } }

.sync-badge { display: inline-flex; align-items: center; gap: 6px; border: 0; padding: 6px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.sync-badge .ic { width: 15px; height: 15px; }
.sync-badge.ok { background: color-mix(in srgb, var(--green) 14%, transparent); color: color-mix(in srgb, var(--green) 80%, var(--text)); }
.sync-badge.wait { background: color-mix(in srgb, var(--orange) 15%, transparent); color: color-mix(in srgb, var(--orange) 85%, var(--text)); }
.sync-badge.off { background: var(--fill); color: var(--text-2); }

/* ─── Chrono ───────────────────────────────────────────────────── */
.chrono-card {
  background: var(--card); border-radius: 24px; padding: 22px 18px 24px; text-align: center;
  box-shadow: var(--shadow); display: grid; gap: 10px;
}
.chrono-status { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 14.5px; font-weight: 600; color: var(--text-2); }
.clock { font-size: clamp(54px, 17vw, 72px); font-weight: 250; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1; margin-top: 4px; }
.chrono-caption { font-size: 13.5px; color: var(--text-2); margin-top: -4px; margin-bottom: 6px; }
.chrono-chantier, .chrono-crew {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  border: 0; border-radius: 14px; background: var(--fill-2); padding: 12px 14px; font-size: 15.5px;
}
.chrono-chantier { font-weight: 600; }
.chrono-chantier span:nth-child(2), .chrono-crew span:nth-child(2) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.chrono-chantier .ic, .chrono-crew .ic { color: var(--text-2); width: 20px; height: 20px; }
.chrono-change { color: var(--accent); font-weight: 600; font-size: 14.5px; flex: none !important; }
.chrono-chantier:disabled, .chrono-crew:disabled { opacity: 1; }
.controls { display: flex; justify-content: center; gap: 36px; margin-top: 14px; }
.round-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; border: 0; background: none; padding: 0; }
.round-in {
  width: 86px; height: 86px; border-radius: 50%; display: grid; place-items: center;
  box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--ring, var(--fill));
  transition: transform 0.12s ease;
}
.round-btn:active .round-in { transform: scale(0.94); }
.round-in .ic { width: 32px; height: 32px; }
.round-label { font-size: 14px; font-weight: 600; }
.round-btn.green .round-in { background: color-mix(in srgb, var(--green) 20%, transparent); color: var(--green); --ring: color-mix(in srgb, var(--green) 20%, transparent); }
.round-btn.green .round-label { color: color-mix(in srgb, var(--green) 80%, var(--text)); }
.round-btn.orange .round-in { background: color-mix(in srgb, var(--orange) 20%, transparent); color: var(--orange); --ring: color-mix(in srgb, var(--orange) 20%, transparent); }
.round-btn.orange .round-label { color: color-mix(in srgb, var(--orange) 85%, var(--text)); }
.round-btn.red .round-in { background: color-mix(in srgb, var(--red) 16%, transparent); color: var(--red); --ring: color-mix(in srgb, var(--red) 16%, transparent); }
.round-btn.red .round-label { color: var(--red); }
.seg-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--text-3); }
.seg-dot.live { background: var(--green); animation: pulse 1.8s ease-in-out infinite; }

/* ─── Bandeaux ─────────────────────────────────────────────────── */
.banner { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: 16px; margin: 0 0 14px; }
.banner > .ic { margin-top: 1px; }
.banner-main { flex: 1; display: grid; gap: 2px; font-size: 14px; color: var(--text-2); }
.banner-main strong { font-size: 15px; color: var(--text); }
.banner.warn { background: color-mix(in srgb, var(--orange) 14%, var(--card)); }
.banner.warn > .ic { color: var(--orange); }
.banner.info { background: color-mix(in srgb, var(--blue) 9%, var(--card)); }
.banner.info > .ic { color: var(--blue); }
.banner.ok { background: color-mix(in srgb, var(--green) 12%, var(--card)); margin-top: 14px; }
.banner.ok > .ic { color: var(--green); }
.banner.compact { padding: 10px 12px; margin: 0; }
.banner .btn { flex: none; align-self: center; }

/* ─── Feuilles ─────────────────────────────────────────────────── */
.sheet-backdrop { position: fixed; inset: 0; z-index: 900; background: rgba(0, 0, 0, 0.36); opacity: 0; transition: opacity 0.3s ease; }
.sheet-backdrop.show { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 901;
  display: flex; flex-direction: column; max-height: calc(100dvh - var(--safe-t) - 28px);
  background: var(--bg); border-radius: 16px 16px 0 0;
  transform: translateY(105%); transition: transform 0.36s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.12);
}
.sheet.full { height: calc(100dvh - var(--safe-t) - 28px); }
.sheet.show { transform: translateY(0); }
.sheet-head { padding: 7px 16px 6px; flex: none; }
.grabber { width: 38px; height: 5px; border-radius: 3px; background: var(--text-3); opacity: 0.55; margin: 0 auto 8px; }
.sheet-title-row { display: flex; align-items: center; gap: 12px; min-height: 36px; }
.sheet-title { flex: 1; margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.sheet-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 16px 20px; overscroll-behavior: contain; }
.sheet-body > div > .group:first-child { margin-top: 8px; }
.sheet-foot { flex: none; padding: 12px 16px calc(12px + var(--safe-b)); border-top: 0.5px solid var(--sep); background: var(--bg); }
.sheet-text { color: var(--text-2); font-size: 15.5px; margin: 4px 0 12px; }
@media (min-width: 760px) {
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: 560px; max-height: 86vh; border-radius: 18px; transform: translate(-50%, calc(-50% + 30px)); opacity: 0; transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.2s ease; }
  .sheet.full { height: min(780px, 86vh); }
  .sheet.show { transform: translate(-50%, -50%); opacity: 1; }
  .grabber { display: none; }
  .sheet-head { padding-top: 14px; }
  .sheet-foot { border-radius: 0 0 18px 18px; padding-bottom: 14px; }
}

/* ─── Formulaires ──────────────────────────────────────────────── */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field-label { font-size: 13.5px; font-weight: 600; color: var(--text-2); padding-left: 2px; }
.field-input {
  width: 100%; border: 0; border-radius: 12px; background: var(--card); padding: 14px 14px; font-size: 17px;
  box-shadow: inset 0 0 0 1px var(--sep); outline: none; -webkit-appearance: none; appearance: none; min-height: 50px;
}
.field-input:focus { box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 4px var(--accent-tint); }
.field-input.area { min-height: 112px; resize: vertical; line-height: 1.4; }
.field-input.time { font-variant-numeric: tabular-nums; text-align: center; }
.form-error { color: var(--red); font-size: 14.5px; font-weight: 500; }
.form-error:empty { display: none; }
.select-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 50px; text-align: left;
  border: 0; border-radius: 12px; background: var(--card); padding: 12px 14px; font-size: 16.5px; box-shadow: inset 0 0 0 1px var(--sep);
}
.select-btn > span:nth-child(2) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.select-btn > .ic:first-child { color: var(--text-2); width: 20px; height: 20px; }
.select-btn .placeholder { color: var(--text-3); }
.select-btn.static { background: var(--fill-2); box-shadow: none; font-weight: 600; }
.time-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.line-card { background: var(--card); border-radius: 16px; padding: 14px; display: grid; gap: 12px; box-shadow: var(--shadow-sm); }
.line-card .select-btn, .line-card .field-input { background: var(--fill-2); box-shadow: none; }
.line-head { display: flex; justify-content: space-between; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 0; padding: 9px 14px; border-radius: 999px; background: var(--card); font-size: 15px; font-weight: 500;
  box-shadow: inset 0 0 0 1px var(--sep);
}
.chip.on { background: var(--accent); color: #fff; box-shadow: none; }
.chip.static { padding: 5px 11px; font-size: 13.5px; background: var(--fill-2); box-shadow: none; }
.chips.static { gap: 6px; }
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--fill); border-radius: 10px; padding: 2px; gap: 2px; }
.seg { border: 0; background: none; padding: 8px 12px; border-radius: 8px; font-size: 14.5px; font-weight: 600; white-space: nowrap; transition: background 0.2s ease; }
.seg.on { background: var(--card); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg.on { background: #636366; } }
:root[data-theme="dark"] .seg.on { background: #636366; }
.segmented.tones .seg.on.green { color: color-mix(in srgb, var(--green) 80%, var(--text)); }
.segmented.tones .seg.on.orange { color: color-mix(in srgb, var(--orange) 85%, var(--text)); }
.segmented.tones .seg.on.red { color: var(--red); }
.checkbox, .radio { width: 26px; height: 26px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 2px var(--text-3); display: grid; place-items: center; color: #fff; }
.checkbox .ic { width: 16px; height: 16px; }
.checkbox.on { background: var(--accent); box-shadow: none; }
.radio.on { box-shadow: inset 0 0 0 7px var(--accent); }

/* ─── Recherche ────────────────────────────────────────────────── */
.search-wrap { position: relative; margin: 4px 0 6px; }
.search-wrap > .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 19px; height: 19px; color: var(--text-2); pointer-events: none; }
.search-input { width: 100%; border: 0; border-radius: 12px; background: var(--fill); padding: 11px 12px 11px 38px; font-size: 17px; outline: none; -webkit-appearance: none; appearance: none; }
.search-input:focus { box-shadow: 0 0 0 3px var(--accent-tint); }
.search-wrap.sticky { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: calc(var(--safe-t) + 6px) 0 8px; margin: 0; }
.search-wrap.sticky > .ic { top: calc(50% + var(--safe-t) / 2 - 1px); }

/* ─── Semaine ──────────────────────────────────────────────────── */
.week-nav { display: flex; gap: 8px; }
.week-card { background: var(--card); border-radius: 20px; padding: 18px; display: grid; gap: 12px; box-shadow: var(--shadow); }
.week-card.sent { background: color-mix(in srgb, var(--green) 9%, var(--card)); }
.week-total { display: flex; align-items: baseline; gap: 10px; }
.big-num { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.sent-line { display: flex; align-items: center; gap: 8px; font-weight: 600; color: color-mix(in srgb, var(--green) 80%, var(--text)); }
.day-list { display: grid; gap: 10px; }
.day-card { background: var(--card); border: 0; border-radius: 16px; padding: 14px 16px; text-align: left; width: 100%; box-shadow: var(--shadow-sm); }
.day-card:active:not(:disabled) { background: var(--card-2); }
.day-card:disabled { opacity: 0.6; }
.day-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.day-name { font-size: 16.5px; font-weight: 600; }
.day-total { font-weight: 600; font-variant-numeric: tabular-nums; }
.day-total.muted { font-weight: 500; font-size: 14.5px; }
.day-lines { display: grid; gap: 4px; margin-top: 8px; }
.day-line { display: flex; gap: 12px; font-size: 14.5px; }
.day-time { color: var(--text-2); font-variant-numeric: tabular-nums; min-width: 96px; flex: none; }
.day-ch { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.day-crew { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13.5px; color: var(--text-2); }
.day-crew .ic { width: 16px; height: 16px; }

/* ─── Problèmes ────────────────────────────────────────────────── */
.chantier-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: -4px 0 16px; }
.problem-list { display: grid; gap: 10px; }
.problem-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.problem-card { display: grid; gap: 8px; background: var(--card); border: 0; border-radius: 18px; padding: 14px 16px; text-align: left; width: 100%; box-shadow: var(--shadow-sm); align-content: start; }
.problem-card:active { background: var(--card-2); }
.problem-chantier { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); font-weight: 500; }
.problem-chantier .ic { width: 15px; height: 15px; }
.problem-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.problem-title { font-size: 16.5px; font-weight: 600; overflow-wrap: anywhere; }
.problem-desc { font-size: 14.5px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.problem-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.foot-right { display: flex; align-items: center; gap: 6px; }
.notion-ok { display: inline-flex; color: var(--text-2); }
.notion-ok .ic { width: 18px; height: 18px; }
.thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.thumb { position: relative; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--fill); display: grid; place-items: center; color: var(--text-3); }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; }
.thumb.more { font-weight: 600; color: var(--text-2); font-size: 15px; }
.thumb-badge { position: absolute; right: 4px; bottom: 4px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0, 0, 0, 0.55); color: #fff; display: grid; place-items: center; }
.thumb-badge .ic { width: 11px; height: 11px; }
.problem-detail { display: grid; gap: 10px; }
.problem-text { margin: 4px 0; font-size: 16.5px; line-height: 1.45; white-space: pre-wrap; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-top: 4px; }
.media-tile { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: #000; cursor: zoom-in; }
video.media-tile { cursor: default; }
.media-tile.missing { display: grid; place-items: center; align-content: center; gap: 6px; background: var(--fill); color: var(--text-2); font-size: 12.5px; text-align: center; padding: 10px; }
.notion-box { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--fill-2); border-radius: 12px; font-size: 14.5px; color: var(--text-2); margin-top: 6px; }
.notion-box > .ic { width: 20px; height: 20px; }
.media-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.media-pick:empty { display: none; }
.pick-tile { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--fill); display: grid; place-items: center; }
.pick-tile img, .pick-tile video { width: 100%; height: 100%; object-fit: cover; }
.pick-remove { position: absolute; top: 5px; right: 5px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, 0.55); color: #fff; display: grid; place-items: center; padding: 0; }
.pick-remove .ic { width: 14px; height: 14px; }
.pick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pick-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; border-radius: 14px; background: var(--card); padding: 14px 6px; font-size: 13.5px; font-weight: 600; box-shadow: inset 0 0 0 1px var(--sep); }
.pick-btn .ic { color: var(--accent); width: 26px; height: 26px; }
.pick-btn:active { background: var(--card-2); }

/* ─── Caméra ───────────────────────────────────────────────────── */
.rec { position: fixed; inset: 0; z-index: 1500; background: #000; color: #fff; }
.rec-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; max-width: none; }
.rec-top { position: absolute; top: calc(var(--safe-t) + 12px); left: 16px; right: 16px; display: flex; justify-content: space-between; align-items: center; }
.rec-time { background: rgba(0, 0, 0, 0.45); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); padding: 7px 12px; border-radius: 999px; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 15px; }
.rec-bar { position: absolute; top: calc(var(--safe-t) + 62px); left: 16px; right: 16px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.25); overflow: hidden; }
.rec-bar-fill { height: 100%; width: 0; background: #ff3b30; transition: width 0.2s linear; }
.rec-bottom { position: absolute; left: 0; right: 0; bottom: calc(var(--safe-b) + 30px); display: flex; justify-content: center; }
.rec-shutter { width: 78px; height: 78px; border-radius: 50%; border: 4px solid #fff; background: transparent; display: grid; place-items: center; padding: 0; }
.rec-dot { width: 60px; height: 60px; border-radius: 50%; background: #ff3b30; transition: all 0.25s ease; }
.rec-shutter.on .rec-dot { width: 30px; height: 30px; border-radius: 7px; }
.rec-actions { display: flex; gap: 12px; }
.viewer { position: fixed; inset: 0; z-index: 1500; background: #000; display: grid; place-items: center; }
.viewer img { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer-close { position: absolute; top: calc(var(--safe-t) + 12px); right: 16px; }

/* ─── Divers ───────────────────────────────────────────────────── */
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--accent-tint); color: var(--accent); font-size: 13px; font-weight: 700; letter-spacing: 0.02em;
}
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.lg { width: 58px; height: 58px; font-size: 21px; }
.empty { text-align: center; padding: 40px 20px; display: grid; justify-items: center; gap: 6px; }
.empty-title { font-size: 17px; font-weight: 600; margin-top: 6px; }
.empty-text { font-size: 15px; color: var(--text-2); max-width: 340px; }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 48px 0; color: var(--text-2); }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--fill); border-top-color: var(--accent); animation: spin 0.8s linear infinite; display: inline-block; flex: none; }
.spin.sm { width: 14px; height: 14px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.profile-card { background: var(--card); border-radius: 20px; padding: 18px; display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow-sm); }
.profile-name { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }

.toast {
  position: fixed; left: 50%; top: calc(var(--safe-t) + 10px); z-index: 2000;
  transform: translate(-50%, -16px) scale(0.96); opacity: 0; pointer-events: none;
  background: rgba(28, 28, 30, 0.94); color: #fff; padding: 12px 20px; border-radius: 22px;
  font-size: 15px; font-weight: 500; max-width: calc(100% - 32px); width: max-content; text-align: center;
  transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.toast.error { background: #d70015; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .toast { background: rgba(58, 58, 60, 0.96); } }
:root[data-theme="dark"] .toast { background: rgba(58, 58, 60, 0.96); }

/* ─── Connexion ────────────────────────────────────────────────── */
.splash { min-height: 100dvh; display: grid; place-items: center; align-content: center; gap: 22px; }
.splash img { width: 76px; height: 76px; border-radius: 18px; }
.auth { min-height: 100dvh; display: grid; place-items: center; align-content: center; gap: 18px; padding: calc(var(--safe-t) + 28px) 18px calc(var(--safe-b) + 28px); }
.auth-card { width: 100%; max-width: 400px; text-align: center; display: grid; gap: 6px; }
.auth-logo { width: 92px; height: 92px; border-radius: 22px; margin: 0 auto 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18); }
.auth-title { margin: 0; font-size: 30px; font-weight: 700; letter-spacing: -0.022em; }
.auth-sub { margin: 0 0 18px; color: var(--text-2); font-size: 15.5px; }
.auth-card .form { text-align: left; margin-top: 16px; }
.auth-seg { margin: 0 auto; width: 100%; }
.demo-box { width: 100%; max-width: 400px; display: grid; gap: 8px; padding: 14px 16px; border-radius: 16px; background: var(--accent-tint); font-size: 14.5px; color: var(--text-2); }
.demo-box strong { color: var(--accent); font-size: 15px; }
.demo-box .btn { flex: 1; }
.demo-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: calc(var(--safe-t) + 6px) 16px 6px; background: var(--accent-tint); color: var(--accent); font-size: 13px; font-weight: 600; }
.demo-bar .link { font-size: 13px; }
.demo-bar ~ .host .lh, .demo-bar ~ .host .search-wrap.sticky { padding-top: 14px; }

/* ─── Administration ───────────────────────────────────────────── */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 6px 0 22px; }
.kpi { background: var(--card); border-radius: 18px; padding: 16px 18px; box-shadow: var(--shadow-sm); }
.kpi-value { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi-label { font-size: 13.5px; color: var(--text-2); margin-top: 2px; }
.kpi.green .kpi-value { color: color-mix(in srgb, var(--green) 85%, var(--text)); }
.kpi.red .kpi-value { color: var(--red); }
.live-grid, .team-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.live-card { background: var(--card); border-radius: 18px; padding: 16px; display: grid; gap: 9px; box-shadow: var(--shadow-sm); align-content: start; }
.live-head, .chef-head { display: flex; align-items: center; gap: 12px; }
.live-main { flex: 1; min-width: 0; }
.live-name { font-size: 16.5px; font-weight: 600; }
.live-total { font-weight: 700; font-size: 16px; }
.live-status { display: flex; align-items: center; gap: 8px; font-size: 14.5px; }
.live-line { font-size: 14.5px; color: var(--text-2); overflow-wrap: anywhere; }
.live-crew { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--text-2); }
.live-crew .ic { width: 16px; height: 16px; flex: none; }
.two-col { display: grid; gap: 4px 20px; }
.two-col > .group { margin: 10px 0; }
@media (min-width: 1000px) { .two-col { grid-template-columns: 1fr 1fr; align-items: start; } }
.stack { display: grid; gap: 14px; }
.chef-card { background: var(--card); border-radius: 20px; padding: 16px; display: grid; gap: 12px; box-shadow: var(--shadow-sm); }
.chef-head { flex-wrap: wrap; }
.chef-head > .pill { margin-left: auto; }
.chef-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap.card { background: var(--card); border-radius: 16px; box-shadow: var(--shadow-sm); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-2); font-weight: 600; padding: 10px 12px; border-bottom: 0.5px solid var(--sep); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 0.5px solid var(--sep); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tfoot td { font-weight: 700; border-top: 1px solid var(--text-3); border-bottom: 0; }
.tbl tr.tap { cursor: pointer; }
@media (hover: hover) { .tbl tr.tap:hover td { background: var(--fill-2); } }
.cell-person { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.detail-list { display: grid; border-top: 0.5px solid var(--sep); }
.detail-row { display: grid; grid-template-columns: 92px 124px minmax(0, 1.4fr) minmax(0, 1fr) auto 70px; gap: 10px; align-items: center; padding: 9px 4px; font-size: 14px; border-bottom: 0.5px solid var(--sep); }
.detail-row .num.b { text-align: right; }
.detail-ch { overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .detail-row { grid-template-columns: 1fr auto; gap: 2px 10px; }
  .detail-row > :nth-child(3), .detail-row > :nth-child(4) { grid-column: 1 / -1; }
  .detail-row > :nth-child(5) { display: none; }
}
.period-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 18px; }
.period-bar .segmented { min-width: 220px; }
.period-nav { display: flex; align-items: center; gap: 10px; }
.period-label { display: grid; text-align: center; min-width: 180px; }
.period-label strong { font-size: 16px; }
.period-label span { font-size: 13px; color: var(--text-2); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.toolbar .search-wrap { flex: 1; min-width: 240px; margin: 0; }
.team-card { background: var(--card); border: 0; border-radius: 18px; padding: 16px; display: grid; gap: 10px; text-align: left; box-shadow: var(--shadow-sm); align-content: start; }
.team-card:active { background: var(--card-2); }
.team-head { display: flex; justify-content: space-between; align-items: center; }
.team-name { font-size: 17.5px; font-weight: 700; letter-spacing: -0.01em; }
.team-chef { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.team-workers { display: flex; flex-wrap: wrap; gap: 6px; }
.code-card { background: var(--card); border-radius: 16px; padding: 18px; display: grid; gap: 8px; box-shadow: var(--shadow-sm); }
.code-value { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 30px; font-weight: 700; letter-spacing: 0.08em; }
.code-card p { margin: 0 0 4px; }

/* Barre latérale (ordinateur) / onglets (téléphone) */
.admin .side { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; height: calc(var(--tabbar) + var(--safe-b)); padding-bottom: var(--safe-b); background: var(--bar); border-top: 0.5px solid var(--sep); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.admin .side-brand, .admin .side-foot { display: none; }
.admin .side-items { display: flex; height: 100%; }
.admin .side-item { position: relative; flex: 1; border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--gray); font-size: 10px; font-weight: 500; padding: 0; min-width: 0; }
.admin .side-item .ic { width: 25px; height: 25px; }
.admin .side-item.on { color: var(--accent); }
.admin .side-item .long { display: none; }
.admin .side-badge { position: absolute; top: 4px; left: calc(50% + 5px); }
@media (min-width: 900px) {
  .admin { display: grid; grid-template-columns: 250px minmax(0, 1fr); }
  .admin .screen { padding-bottom: 48px; }
  .admin .page.wide { padding: 0 32px; }
  .admin .lh { padding-top: 30px; }
  .admin .side {
    position: sticky; top: 0; height: 100dvh; padding: 22px 14px 18px; border-top: 0; border-right: 0.5px solid var(--sep);
    display: flex; flex-direction: column; gap: 22px; background: var(--card-2);
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .admin .side-brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; }
  .admin .side-brand img { width: 42px; height: 42px; border-radius: 11px; }
  .admin .side-name { font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }
  .admin .side-name.sm { font-size: 14px; font-weight: 600; }
  .admin .side-sub { font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
  .admin .side-items { flex-direction: column; height: auto; gap: 2px; }
  .admin .side-item { flex: none; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 10px 12px; border-radius: 10px; font-size: 15px; color: var(--text); }
  .admin .side-item .ic { width: 21px; height: 21px; color: var(--text-2); }
  .admin .side-item:hover { background: var(--fill-2); }
  .admin .side-item.on { background: var(--accent-tint); color: var(--accent); font-weight: 600; }
  .admin .side-item.on .ic { color: var(--accent); }
  .admin .side-item .long { display: inline; }
  .admin .side-item .short { display: none; }
  .admin .side-badge { position: static; margin-left: auto; }
  .admin .side-foot { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 0 8px; }
  .demo-bar ~ .host.admin, .host.admin { min-height: 100dvh; }
}
@media (max-width: 899px) {
  .admin .lh-right .btn.small { padding: 8px 10px; }
  .admin .lh-row { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 380px) {
  .controls { gap: 24px; }
  .round-in { width: 78px; height: 78px; }
  .pick-actions .pick-btn { font-size: 12.5px; }
}

/* ─── v1.1 : repas, formation, pointage admin, signature ───────── */
.subnav { position: sticky; top: 0; z-index: 6; background: var(--bg); padding: 14px 0 6px; }
.subnav .segmented { max-width: 460px; }
.page.embedded .lh { padding-top: 10px; }
.admin .page.wide > .page { padding: 0; }
.card-box { background: var(--card); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow-sm); }
.meals { display: grid; gap: 10px; }
.meal-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.meal-label { font-size: 15.5px; font-weight: 500; }
.meal-chips { display: flex; gap: 6px; }
.meal-chip {
  width: 44px; height: 36px; border-radius: 10px; border: 0; background: var(--fill); font-weight: 700; font-size: 16px;
  font-variant-numeric: tabular-nums; transition: background 0.15s ease;
}
.meal-chip.on { background: var(--accent); color: #fff; }
.meal-chip:disabled { opacity: 0.3; }
.meal-chip.on:disabled { opacity: 0.6; }
.meal-hint { font-size: 12.5px; color: var(--text-2); }
.meals.compact .meal-label { font-size: 14.5px; color: var(--text-2); }
.meals.compact .meal-chip { width: 40px; height: 32px; font-size: 15px; }
.chrono-meals { background: var(--fill-2); border-radius: 14px; padding: 10px 14px; text-align: left; }
.switch { position: relative; width: 51px; height: 31px; border-radius: 999px; border: 0; background: var(--fill); padding: 0; flex: none; transition: background 0.2s ease; }
.switch.on { background: var(--green); }
.switch:disabled { opacity: 0.5; }
.switch-knob { position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); transition: transform 0.2s ease; }
.switch.on .switch-knob { transform: translateX(20px); }
.formation-row .row-title { font-weight: 600; }
.formation-row .checkbox { width: 24px; height: 24px; }
.chip.optional:not(.on) { box-shadow: inset 0 0 0 1px var(--sep); color: var(--text-2); }
.day-tag { margin-left: 8px; font-size: 12px; font-weight: 600; color: var(--text-2); background: var(--fill); padding: 2px 8px; border-radius: 999px; vertical-align: 2px; }
.day-card.optional { background: var(--card-2); box-shadow: none; }
.person-meal { padding: 12px 16px; display: grid; gap: 10px; }
.person-meal + .person-meal { border-top: 0.5px solid var(--sep); }
.person-meal-head { display: flex; align-items: center; gap: 10px; }
.person-meal-head .row-title { flex: 1; font-weight: 500; }
.small-link { font-size: 13.5px; }
.problem-grid.top { margin-top: 14px; }
.sig-section { display: grid; gap: 10px; background: var(--card); border-radius: 16px; padding: 14px; box-shadow: var(--shadow-sm); }
.sig-wrap { position: relative; height: 190px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--sep); overflow: hidden; touch-action: none; }
.sig-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.sig-line { position: absolute; left: 22px; right: 22px; bottom: 44px; border-bottom: 1.5px dashed #c7c7cc; pointer-events: none; }
.sig-hint { position: absolute; left: 22px; bottom: 18px; font-size: 13px; color: #aeaeb2; pointer-events: none; }
.sig-wrap.signed .sig-hint { display: none; }
.sig-preview img { max-width: 320px; width: 100%; background: #fff; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--sep); }

/* ─── v1.2 : panier/repas, nuit, corrections ───────────────────── */
.meal-type { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--fill); border-radius: 10px; padding: 3px; }
.meal-type-btn { border: 0; background: none; border-radius: 8px; padding: 8px 6px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.meal-type-btn.on { background: var(--card); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .meal-type-btn.on { background: #636366; } }
:root[data-theme="dark"] .meal-type-btn.on { background: #636366; }
.meals.compact .meal-type-btn { padding: 6px; font-size: 13.5px; }
.night-tag { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; font-size: 13px; font-weight: 600; color: var(--purple); background: color-mix(in srgb, var(--purple) 12%, transparent); padding: 2px 8px; border-radius: 999px; vertical-align: 1px; }
.night-tag .ic { width: 14px; height: 14px; }
.next-day { font-size: 13px; font-weight: 600; color: var(--purple); }
button.detail-row { width: 100%; background: none; border: 0; border-bottom: 0.5px solid var(--sep); text-align: left; cursor: pointer; border-radius: 0; }
@media (hover: hover) { button.detail-row:hover { background: var(--fill-2); } }

/* ─── v1.3 : confidentialité, envoi client, raccourcis ─────────── */
.hint .ic { width: 15px; height: 15px; vertical-align: -3px; }
.privacy-note { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 12px; background: var(--fill-2); color: var(--text-2); font-size: 14.5px; }
.privacy-note .ic { width: 18px; height: 18px; flex: none; }
.row-title-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-transform: none; letter-spacing: 0; padding-right: 0; }
.row-title-actions > span { text-transform: uppercase; letter-spacing: 0.03em; }
.controls-wrap { display: grid; gap: 14px; }
.quick-start {
  display: grid; gap: 2px; width: 100%; text-align: center; border: 0; border-radius: 14px; padding: 12px 14px;
  background: color-mix(in srgb, var(--green) 10%, transparent); color: var(--text);
}
.quick-start:active { transform: scale(0.99); }
.quick-title { font-weight: 700; font-size: 15px; color: color-mix(in srgb, var(--green) 75%, var(--text)); }
.quick-sub { font-size: 13.5px; color: var(--text-2); overflow-wrap: anywhere; }
.copy-day { margin-top: -6px; }
.ready-file { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow-sm); margin: 6px 0 10px; }
.ready-file > .ic { width: 30px; height: 30px; }
.banner.install { margin-top: 18px; }
.banner.install .icon-btn { flex: none; }
a.btn { text-decoration: none; }

/* Mac / ordinateur : appli chef centrée, barre d'onglets flottante */
@media (min-width: 900px) {
  .host:not(.admin) .tabbar {
    left: 50%; right: auto; bottom: 18px; width: 520px; transform: translateX(-50%);
    height: 64px; padding-bottom: 0; border-radius: 20px; border: 0.5px solid var(--sep);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
  }
  .host:not(.admin) .screen { padding-bottom: 110px; }
  .host:not(.admin) .page { max-width: 700px; }
  .toast { top: 20px; }
}

/* v1.4 — rapports regroupés par chantier */
.report-groups { display: grid; gap: 22px; margin-top: 8px; }
.report-group { display: grid; gap: 10px; }
.report-group-head { display: flex; align-items: center; gap: 12px; padding: 0 2px; }
.report-group-name { flex: 1 1 auto; min-width: 0; display: grid; gap: 1px; border: 0; background: none; padding: 0; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.report-group-name .rg-title { font-size: 17px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-group-name .rg-sub { font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-group-head .btn { flex: none; }
.report-group .problem-chantier { display: none; }
.rg-btn-short { display: none; }
@media (max-width: 480px) { .rg-btn-long { display: none; } .rg-btn-short { display: inline; } }
.meal-type-btn { display: grid; gap: 1px; line-height: 1.2; }
.meal-type-btn .mt-main { font-size: 14px; font-weight: 600; }
.meal-type-btn .mt-sub { font-size: 12px; font-weight: 500; color: var(--text-2); }
.meals.compact .meal-type-btn .mt-main { font-size: 13px; }
.meals.compact .meal-type-btn .mt-sub { font-size: 11.5px; }

/* ════ v1.5 — Planning ════ */
.page.full { max-width: none; }
.lh-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 600px) { .hide-sm { display: none; } .lh-actions .btn { padding-left: 10px; padding-right: 10px; } }
.plan-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; }
.plan-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.plan-scroll {
  --plan-name: 190px; --plan-day: 82px; --plan-row: 54px;
  overflow: auto; max-height: calc(100vh - 230px); max-height: calc(100dvh - 230px);
  background: var(--card); border-radius: 18px; box-shadow: var(--shadow); border: 0.5px solid var(--sep);
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
}
.plan { border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 12px; color: var(--text); user-select: none; -webkit-user-select: none; }
.plan th, .plan td { border-right: 1px solid var(--fill-2); border-bottom: 1px solid var(--sep); padding: 0; text-align: center; vertical-align: middle; }
.plan thead th { position: sticky; z-index: 3; background: var(--card); font-weight: 600; }
.plan .plan-weeks th { top: 0; height: 46px; border-bottom: 0; }
.plan .plan-weeks .wk-n { display: block; font-size: 14.5px; font-weight: 700; letter-spacing: -0.01em; }
.plan .plan-weeks .wk-d { display: block; font-size: 11.5px; font-weight: 500; color: var(--text-2); margin-top: 1px; }
.plan .plan-weeks th.cur .wk-n { color: var(--accent); }
.plan .plan-weeks th.cur::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 2px; height: 3px; border-radius: 2px; background: var(--accent); opacity: 0.85; }
.plan .plan-days th { top: 46px; height: 40px; width: var(--plan-day); min-width: var(--plan-day); }
.plan .plan-days .dl { display: block; font-size: 10.5px; color: var(--text-2); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.plan .plan-days .dn { display: inline-grid; place-items: center; min-width: 26px; height: 24px; border-radius: 12px; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 1px; }
.plan .plan-days th.today .dn { background: var(--accent); color: #fff; }
.plan .plan-corner {
  position: sticky; left: 0; top: 0; z-index: 6; width: var(--plan-name); min-width: var(--plan-name);
  text-align: left; padding: 0 16px; background: var(--card); border-right: 1px solid var(--sep);
}
.plan .plan-corner .pc-t { display: block; font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.plan .plan-corner .pc-s { display: block; font-size: 12px; color: var(--text-2); font-weight: 500; }
.plan .wk-start { border-left: 4px solid var(--bg); }
.plan .plan-sec td { background: var(--card-2); height: 30px; text-align: left; border-bottom: 1px solid var(--sep); border-right: 0; }
.plan .ps-in { position: sticky; left: 0; display: inline-flex; align-items: center; gap: 12px; padding: 0 16px; }
.plan .ps-t { font-size: 11.5px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.06em; }
.plan .ps-add { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--accent); font: inherit; font-size: 13px; font-weight: 600; padding: 4px 6px; border-radius: 8px; cursor: pointer; }
.plan .ps-add .ic { width: 15px; height: 15px; }
.plan .ps-add:hover { background: var(--accent-tint); }
.plan .plan-name {
  position: sticky; left: 0; z-index: 2; text-align: left; padding: 0 12px 0 14px; height: var(--plan-row);
  background: var(--card); border-right: 1px solid var(--sep);
  background-image: linear-gradient(90deg, color-mix(in srgb, var(--rc) 16%, transparent), color-mix(in srgb, var(--rc) 4%, transparent));
}
.plan .pn { display: flex; align-items: center; gap: 10px; min-width: 0; }
.plan .pn-av, .pn-av { width: 30px; height: 30px; border-radius: 15px; display: inline-grid; place-items: center; flex: none; font-size: 11.5px; font-weight: 700; letter-spacing: 0.02em; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); }
.pn-av .ic { width: 17px; height: 17px; }
.pn-av.sm { width: 26px; height: 26px; font-size: 10.5px; }
.plan .pn-label { font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.plan .plan-row.mine .plan-name { box-shadow: inset 4px 0 0 var(--accent); }
.plan .plan-row.mine .pn-label { color: var(--accent); }
.plan td.pfree.today { background: var(--accent-tint); }
.plan td.pfill { padding: 3px; }
.plan .pstack { display: flex; flex-direction: column; gap: 3px; height: calc(var(--plan-row) - 6px); }
.plan .pb {
  flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 1px;
  border-radius: 9px; border-left: 4px solid; padding: 2px 6px; text-align: left;
  font-size: 12px; font-weight: 650; line-height: 1.15; overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.plan td.multi .pb { font-size: 10.5px; border-radius: 6px; border-left-width: 3px; padding: 0 5px; }
.plan .pb-l, .plan .pb-s { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan td:not(.multi) .pb-l { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.plan .pb-s { font-size: 10.5px; font-weight: 500; opacity: 0.78; }
.plan .plan-empty { padding: 30px; color: var(--text-2); text-align: left; }
.plan.editable td { cursor: pointer; }
@media (hover: hover) {
  .plan.editable td.pfree:hover { background: var(--fill-2); box-shadow: inset 0 0 0 1.5px var(--accent-tint); }
  .plan td.pfill:hover .pb { filter: brightness(0.97); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14); }
}
.plan td.sel { box-shadow: inset 0 0 0 2px var(--accent); background-color: var(--accent-tint); }
.plan td.pfill.sel .pb { filter: brightness(0.92); }
.plan-scroll.fit .plan { width: 100%; }
.plan-scroll.fit .plan-days th { width: auto; min-width: 0; }
@media (max-width: 760px) {
  .plan-scroll { --plan-name: 118px; --plan-day: 64px; --plan-row: 52px; max-height: calc(100dvh - var(--tabbar) - var(--safe-b) - 210px); min-height: 380px; border-radius: 16px; margin: 0 -4px; }
  .plan-scroll.fit { --plan-name: 104px; max-height: none; min-height: 0; }
  .plan-toolbar { flex-wrap: nowrap; }
  .plan-tools { flex-wrap: nowrap; }
  .plan .plan-name { padding: 0 6px 0 8px; }
  .plan .pn { gap: 7px; }
  .plan .pn-av { width: 26px; height: 26px; font-size: 10px; }
  .plan .pn-label { font-size: 12px; }
  .plan .plan-corner { padding: 0 10px; }
  .plan .plan-corner .pc-t { font-size: 15px; }
  .plan .plan-weeks .wk-n { font-size: 13.5px; }
  .plan .pb { font-size: 11px; padding: 2px 4px; border-left-width: 3px; border-radius: 7px; }
  .plan td.multi .pb { font-size: 9.5px; padding: 0 3px; }
  .plan .ps-in { padding: 0 10px; }
}
.plan-hint { margin: 10px 2px 18px; }
.plan-legend { display: flex; flex-wrap: wrap; gap: 8px; }
.legend-chip { display: inline-flex; align-items: center; gap: 8px; border: 0; background: var(--card); border-radius: 999px; padding: 7px 12px 7px 9px; font: inherit; font-size: 13.5px; color: var(--text); box-shadow: var(--shadow-sm); cursor: pointer; }
.legend-dot { width: 14px; height: 14px; border-radius: 5px; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); }
.legend-dot.big { width: 34px; height: 34px; border-radius: 10px; }
.setup-card { padding: 10px 0; }

/* Édition */
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; border: 0; border-radius: 999px; padding: 7px 12px; background: var(--fill); color: var(--text); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.chip .ic { width: 15px; height: 15px; }
.chip.on { background: var(--accent); color: #fff; }
.who-title { font-size: 12.5px; color: var(--text-2); margin: 8px 2px 6px; font-weight: 600; }
.who-title:first-child { margin-top: 0; }
.two-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.two-inputs label { display: grid; gap: 4px; }
.mini-label { font-size: 12.5px; color: var(--text-2); padding-left: 2px; }
.segmented.full { display: flex; width: 100%; margin-bottom: 10px; }
.segmented.full .seg { flex: 1; }
.pick-list { max-height: 260px; overflow: auto; background: var(--card); border-radius: 14px; margin: 8px 0 12px; box-shadow: var(--shadow-sm); }
.pick-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; border-bottom: 0.5px solid var(--sep); background: none; padding: 10px 14px; font: inherit; color: var(--text); cursor: pointer; }
.pick-item:last-child { border-bottom: 0; }
.pick-item.on { background: var(--accent-tint); }
.pick-main { display: grid; flex: 1; min-width: 0; }
.pick-title { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-sub { font-size: 12.5px; color: var(--text-2); }
.pad { padding: 14px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 36px; height: 36px; border-radius: 11px; border: 0; display: grid; place-items: center; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); color: #1c1c1e; }
.swatch.on { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--accent); }
.swatch .ic { width: 18px; height: 18px; mix-blend-mode: difference; color: #fff; }
.field-hint { font-size: 12.5px; color: var(--text-2); padding: 2px 2px 0; }
.row-swatch { display: block; width: 22px; height: 22px; border-radius: 7px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); }
.row-main.as-btn { border: 0; background: none; text-align: left; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.order-btns { display: flex; gap: 2px; }
.order-btns .icon-btn:disabled { opacity: 0.25; }
.ic.rot90 { transform: rotate(90deg); }
.row-title.tint, .ic.tint { color: var(--accent); }
.switch-row { width: 100%; background: var(--card); border-radius: 14px; border: 0; text-align: left; }
.plan-info { display: flex; align-items: center; gap: 12px; }

/* Barre du bas admin sur téléphone : « Plus » */
.admin .side-item.m-only { display: none; }
@media (max-width: 899px) {
  .admin .side-item.m-more { display: none; }
  .admin .side-item.m-only { display: flex; }
}

/* Planning côté chef */
.my-plan { display: grid; gap: 0; }
.my-plan-day { display: grid; grid-template-columns: 54px 1fr; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 0.5px solid var(--sep); text-align: left; background: none; border-left: 0; border-right: 0; border-top: 0; font: inherit; color: inherit; width: 100%; }
.my-plan-day:last-child { border-bottom: 0; }
.my-plan-day.today { background: var(--accent-tint); }
.mpd-date { display: grid; text-align: center; }
.mpd-date b { font-size: 18px; font-variant-numeric: tabular-nums; }
.mpd-date span { font-size: 11.5px; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.04em; }
.quick-start.plan-start { background: var(--accent-tint); }
.plan-title { margin: 24px 4px 8px; }
.quick-start.plan-start .quick-title { color: var(--accent); }
@media (max-width: 760px) {
  .plan-toolbar .period-nav { gap: 2px; }
  .plan-toolbar .period-nav .btn { padding-left: 8px; padding-right: 8px; }
  .plan-tools { gap: 4px; }
}
.two-inputs > label { min-width: 0; }
.two-inputs .field-input { width: 100%; min-width: 0; display: block; }

/* v1.6 — éditeur : plusieurs chantiers dans la journée */
.items { display: grid; gap: 12px; }
.item-card { display: grid; gap: 10px; background: var(--card); border-radius: 16px; padding: 12px; box-shadow: var(--shadow-sm); }
.item-head { display: flex; align-items: center; justify-content: space-between; min-height: 28px; }
.item-n { font-size: 13px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.04em; }
.item-card .segmented.full { margin-bottom: 0; }
.item-card .search-wrap { margin: 0; }
.item-card .pick-list { margin: 0; box-shadow: none; border: 0.5px solid var(--sep); }
.pick-item.picked { border: 0; border-radius: 12px; background: var(--fill-2); }
.pick-change { color: var(--accent); font-weight: 600; font-size: 14px; flex: none; }
.add-item { margin: 0; }
.chip.add { background: none; color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent-tint); }
.chip.add .ic { width: 15px; height: 15px; }
.plan-info { display: flex; align-items: flex-start; gap: 12px; padding: 4px 0; }
/* v1.6 — Ma semaine (chef) */
.my-plan-day { align-items: start; padding: 12px 14px; }
.my-plan-day .mpd-date { padding-top: 2px; }
.my-plan-day .mpd-main { display: grid; gap: 10px; min-width: 0; }
.mpd-line { display: flex; align-items: stretch; gap: 10px; min-width: 0; }
.mpd-line .legend-dot { width: 5px; height: auto; min-height: 36px; border-radius: 3px; box-shadow: none; }
.mpd-line .legend-dot.none { background: var(--fill); }
.mpd-text { display: grid; gap: 3px; min-width: 0; align-content: center; }
.mpd-text b { font-size: 15.5px; font-weight: 600; white-space: normal; line-height: 1.25; }
.mpd-text b.muted { color: var(--text-2); font-weight: 500; }
.mpd-sub { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--text-2); }
.mpd-sub > span { display: inline-flex; align-items: center; gap: 5px; white-space: normal; }
.mpd-sub .ic { width: 15px; height: 15px; flex: none; }
.plan col.c-name { width: var(--plan-name, 150px); }
.plan col.c-day { width: var(--plan-day, 46px); }
.plan-scroll.fit .plan col.c-day { width: auto; }
.plan.print col.c-name { width: 150px; }
.plan.print col.c-day { width: auto; }
@media (max-width: 760px) {
  .plan-scroll.fit { --plan-name: 116px; }
  .plan-scroll.fit .plan .pn { gap: 6px; }
  .plan-scroll.fit .plan .pn-av { width: 22px; height: 22px; font-size: 9px; }
  .plan-scroll.fit .plan .pn-av .ic { width: 13px; height: 13px; }
  .plan-scroll.fit .plan .pn-label { font-size: 11.5px; }
}

/* v1.7 — véhicules */
.veh-av { width: 32px; height: 32px; border-radius: 16px; display: inline-grid; place-items: center; background: #1c1c1e; color: #fff; }
.veh-av .ic { width: 17px; height: 17px; }
.veh-av.none { background: var(--fill); color: var(--text-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .veh-av { background: #48484a; } }
:root[data-theme="dark"] .veh-av { background: #48484a; }
.chrono-veh.todo { box-shadow: inset 0 0 0 1.5px var(--accent); }
.chrono-veh.todo > span:first-of-type { color: var(--accent); font-weight: 600; }
.field.missing .veh-picker { box-shadow: 0 0 0 2px var(--red); }
.field.missing > .field-label { color: var(--red); }
.veh-av.lg { width: 44px; height: 44px; border-radius: 13px; }
.veh-av.lg .ic { width: 24px; height: 24px; }
.veh-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--text-2); }
.veh-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.vl { display: inline-block; width: 14px; height: 14px; border-radius: 5px; }
.vl.used { background: var(--green); }
.vl.planned { box-shadow: inset 0 0 0 2px var(--blue); }
.vl.missed { box-shadow: inset 0 0 0 2px var(--orange); background: rgba(255, 149, 0, 0.12); }
.veh-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.veh-card { display: grid; gap: 14px; text-align: left; border: 0; background: var(--card); border-radius: 20px; padding: 16px; box-shadow: var(--shadow); color: var(--text); font: inherit; cursor: pointer; }
.veh-card:active { transform: scale(0.995); }
@media (hover: hover) { .veh-card:hover { box-shadow: var(--shadow), 0 0 0 1.5px var(--accent-tint); } }
.veh-head { display: flex; align-items: center; gap: 12px; }
.veh-title { flex: 1; min-width: 0; }
.veh-name { font-size: 17.5px; font-weight: 700; letter-spacing: -0.01em; }
.veh-sub { font-size: 13.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.veh-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.veh-stats > div { background: var(--fill-2); border-radius: 12px; padding: 8px 10px; display: grid; }
.veh-stats b { font-size: 20px; font-variant-numeric: tabular-nums; }
.veh-stats span { font-size: 12px; color: var(--text-2); }
.veh-cal { display: grid; gap: 4px; }
.vc-row { display: grid; grid-template-columns: 38px repeat(7, 1fr); gap: 4px; align-items: center; }
.vc-row.head .vc-d { font-size: 11px; color: var(--text-2); text-align: center; font-weight: 600; }
.vc-w { font-size: 11px; color: var(--text-2); font-weight: 600; }
.vc-c { height: 30px; border-radius: 8px; display: grid; place-items: center; font-size: 11.5px; font-weight: 600; color: var(--text-2); background: var(--fill-2); font-variant-numeric: tabular-nums; }
.vc-c.out { opacity: 0.35; }
.vc-c.used { background: var(--green); color: #fff; }
.vc-c.planned { box-shadow: inset 0 0 0 2px var(--blue); color: var(--blue); background: transparent; }
.vc-c.missed { box-shadow: inset 0 0 0 2px var(--orange); color: var(--orange); background: rgba(255, 149, 0, 0.1); }
.vc-c.today { outline: 2px solid var(--accent); outline-offset: 1px; }
@media (max-width: 760px) { .veh-grid { grid-template-columns: 1fr; } .veh-legend { display: none; } }
/* v1.7 — Y aller */
.go-btn { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px; background: var(--accent-tint); color: var(--accent); font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.go-btn .ic { width: 15px; height: 15px; }
.go-btn:active { transform: scale(0.96); }
.go-btn.approx { background: var(--fill); color: var(--text-2); }
@media (hover: hover) { .go-btn:hover { filter: brightness(0.95); } }
.nav-app { width: 32px; height: 32px; border-radius: 9px; display: inline-grid; place-items: center; color: #fff; }
.nav-app .ic { width: 17px; height: 17px; }
.nav-app.waze { background: #33ccff; }
.nav-app.google { background: #34a853; }
.nav-app.apple { background: #0a84ff; }
.nav-app.copy { background: var(--fill); color: var(--text-2); }
.go-dest { display: grid; gap: 3px; padding: 0 2px; }
.warn-text { color: var(--orange); }
.btn-pair { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin: 6px 0; }
.btn-pair .btn { margin: 0; }
.chantier-meta .ic { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.go-plan { margin: 0; }
.go-inline { margin-top: 8px; }
.veh-grid { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }
.veh-card { min-width: 0; overflow: hidden; }
.veh-card > * { min-width: 0; }
.veh-head .pill { flex: none; }
.vc-row { grid-template-columns: 34px repeat(7, minmax(0, 1fr)); }
@media (max-width: 760px) { .veh-grid { grid-template-columns: 1fr; } }
/* v1.7 — consignes (À faire) */
.todo-note { display: flex; align-items: flex-start; gap: 6px; margin-top: 4px; font-size: 14px; color: var(--text); background: var(--accent-tint); border-radius: 10px; padding: 7px 10px; white-space: pre-wrap; line-height: 1.35; }
.todo-note .ic { width: 15px; height: 15px; flex: none; color: var(--accent); margin-top: 2px; }
.mpd-text .todo-note { font-size: 13.5px; }
.todo-card { background: var(--card); border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow-sm); display: grid; gap: 10px; margin: 14px 0; border-left: 4px solid var(--accent); }
.todo-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.04em; }
.todo-title .ic { width: 17px; height: 17px; }
.todo-line { display: flex; gap: 10px; align-items: stretch; }
.todo-line .legend-dot { width: 5px; height: auto; border-radius: 3px; box-shadow: none; }
.todo-ch { font-size: 13px; color: var(--text-2); font-weight: 600; }
.todo-text { font-size: 16px; line-height: 1.4; white-space: pre-wrap; }
.row-actions { display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 480px) { .row-actions { flex-direction: column; align-items: flex-end; gap: 6px; } .row-actions .go-btn { padding: 5px 10px; font-size: 13.5px; } }
/* v1.8 — pièces jointes du mail client */
.att-box { display: grid; gap: 12px; }
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.att-tile { position: relative; aspect-ratio: 1; border: 0; padding: 0; border-radius: 12px; overflow: hidden; background: var(--fill); cursor: pointer; opacity: 0.45; transition: opacity 0.15s, box-shadow 0.15s; }
.att-tile.on { opacity: 1; box-shadow: 0 0 0 2.5px var(--accent); }
.att-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.att-ic { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-2); }
.att-ic .ic { width: 26px; height: 26px; }
.att-size { position: absolute; left: 4px; bottom: 4px; font-size: 10.5px; font-weight: 600; color: #fff; background: rgba(0, 0, 0, 0.55); border-radius: 6px; padding: 1px 5px; }
.att-tile .checkbox { position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; background: rgba(255, 255, 255, 0.85); }
.att-tile .checkbox.on { background: var(--accent); }
.att-total { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; padding: 10px 12px; border-radius: 12px; background: var(--fill-2); }
.att-total .ic { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--text-2); }
.att-total.warn { background: rgba(255, 149, 0, 0.12); }
.att-total.warn .ic { color: var(--orange); }
.att-total .block { display: block; margin-top: 3px; color: var(--text-2); }
/* v1.9 — notifications */
.switch.busy { opacity: 0.5; }
.ic.muted { color: var(--text-3); }

/* ─── v2.0 : heures chiffrées / faites ─────────────────────────── */
.bg-gauge { display: flex; flex-direction: column; gap: 5px; margin-top: 7px; width: 100%; max-width: 420px; }
.bg-bar { height: 6px; border-radius: 99px; background: var(--fill); overflow: hidden; }
.bg-bar i { display: block; height: 100%; border-radius: inherit; background: var(--green); transition: width .4s ease; }
.bg-gauge.warn .bg-bar i { background: var(--orange); }
.bg-gauge.over .bg-bar i { background: var(--red); }
.bg-gauge.big { max-width: none; margin: 4px 0 2px; }
.bg-gauge.big .bg-bar { height: 10px; }
.bg-text { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.bg-main { color: var(--text); font-weight: 600; }
.bg-gauge.warn .bg-rest { color: var(--orange); font-weight: 600; }
.bg-gauge.over .bg-rest { color: var(--red); font-weight: 600; }
.row-sub-stack { display: flex; flex-direction: column; gap: 1px; }
.budget-row .row-main { min-width: 0; }
.budget-card .bc-body { padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 12px; }
.bc-bigs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.bc-big { background: var(--card-2); border-radius: 14px; padding: 12px 12px 10px; }
.bc-v { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.bc-l { font-size: 12.5px; color: var(--text-2); margin-top: 3px; }
.bc-big.warn .bc-v { color: var(--orange); }
.bc-big.over .bc-v { color: var(--red); }
.bc-big.ok .bc-v { color: var(--green); }
.bc-empty { display: flex; flex-direction: column; gap: 4px; }
.bc-lines { display: flex; flex-direction: column; border-top: 0.5px solid var(--sep); }
.bc-line { display: grid; grid-template-columns: 1fr 96px 96px; gap: 8px; padding: 8px 0; border-bottom: 0.5px solid var(--sep); font-size: 14.5px; }
.bc-line .num { text-align: right; font-variant-numeric: tabular-nums; }
.bc-line.head { font-size: 12px; color: var(--text-2); text-transform: uppercase; letter-spacing: .03em; padding: 8px 0 6px; }
.bc-line.head span:not(:first-child) { text-align: right; }
.bc-line.b { font-weight: 600; }
.bc-devis { display: flex; flex-direction: column; gap: 2px; }
.bc-sub { font-size: 12px; color: var(--text-2); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 4px; }
.bc-devis-row { display: grid; grid-template-columns: 1fr auto 110px; gap: 10px; align-items: center; padding: 7px 0; border-top: 0.5px solid var(--sep); font-size: 14px; }
.bc-devis-row .num { text-align: right; font-variant-numeric: tabular-nums; }
.bc-dn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.budget-card .hint { margin: 0; }
@media (max-width: 560px) {
  .bc-v { font-size: 19px; }
  .bc-big { padding: 10px 10px 8px; }
  .bc-line { grid-template-columns: 1fr 78px 78px; font-size: 14px; }
  .bc-devis-row { grid-template-columns: 1fr auto; }
  .bc-devis-row .bc-de { display: none; }
}

/* ─── v2.0 : scanner de documents ──────────────────────────────── */
.pick-btn.wide { grid-column: 1 / -1; flex-direction: row; justify-content: center; padding: 13px 12px; }
.field-help { margin: -2px 0 2px; }
.toolbar.center { justify-content: center; }
.scan-stage { display: flex; flex-direction: column; align-items: center; gap: 14px; min-height: 40vh; }
.scan-wait { display: flex; align-items: center; gap: 10px; color: var(--text-2); padding: 48px 0; font-size: 15px; }
.scan-tip { margin: 0; color: var(--text-2); font-size: 14px; text-align: center; max-width: 520px; }
.scan-crop { position: relative; touch-action: none; user-select: none; -webkit-user-select: none; border-radius: 6px; overflow: visible; box-shadow: var(--shadow); }
.scan-img { display: block; border-radius: 6px; }
.scan-svg { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.scan-svg polygon { fill: rgba(226, 97, 27, 0.14); stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.scan-handle { position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: rgba(255, 255, 255, 0.35); border: 3px solid var(--accent); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); touch-action: none; cursor: grab; }
.scan-handle::after { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: var(--accent); }
.scan-handle.on { transform: scale(1.25); cursor: grabbing; background: rgba(255, 255, 255, 0.55); }
.scan-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.scan-result { width: 100%; display: flex; justify-content: center; }
.scan-page { max-width: 100%; max-height: 52vh; width: auto; height: auto; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 10px 30px rgba(0,0,0,.12); border-radius: 3px; }
.scan-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; width: 100%; }
.scan-pages.small { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.scan-pages.small:empty { display: none; }
.scan-pages.view { margin-bottom: 4px; }
.scan-thumb { position: relative; aspect-ratio: 0.71; border-radius: 10px; overflow: hidden; background: #fff; box-shadow: inset 0 0 0 1px var(--sep), var(--shadow-sm); display: block; }
.scan-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.scan-num { position: absolute; left: 6px; bottom: 6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: rgba(0,0,0,.62); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.scan-thumb.add { border: 1.5px dashed var(--text-3); box-shadow: none; background: transparent; color: var(--accent); font-weight: 600; font-size: 13.5px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.scan-thumb.add .ic { width: 26px; height: 26px; }
.attach-file { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; background: var(--card-2); }
.attach-file > .ic { width: 30px; height: 30px; color: var(--accent); flex: none; }
.attach-file .row-title { word-break: break-all; }

/* ─── v2.1 : comptabilité (tickets à rembourser) ───────────────── */
.tk-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: var(--card); border-radius: 18px; padding: 18px 18px; box-shadow: var(--shadow-sm); margin: 6px 0 4px; }
.tk-sum-v { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.tk-sum-l { color: var(--text-2); font-size: 14px; margin-top: 3px; }
.tk-summary .btn { flex: 0 0 auto; }
@media (max-width: 560px) { .tk-summary .btn { width: 100%; } }
.tk-thumb { width: 44px; height: 54px; border-radius: 8px; background: var(--card-2); box-shadow: inset 0 0 0 0.5px var(--sep); display: grid; place-items: center; overflow: hidden; flex: none; color: var(--text-3); }
.tk-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.tk-thumb .ic { width: 20px; height: 20px; }
.tk-row { align-items: center; }
.tk-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.tk-amount { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 15.5px; color: var(--text); }
.tk-open { border: 0; background: none; padding: 0; text-align: left; color: inherit; font: inherit; cursor: pointer; }
.tk-photo { display: grid; place-items: center; min-height: 160px; background: var(--card-2); border-radius: 14px; overflow: hidden; }
.tk-photo img { display: block; max-width: 100%; max-height: 48vh; }
.tk-preview { position: relative; }
.tk-preview > img { display: block; width: 100%; max-height: 300px; object-fit: contain; background: var(--card-2); border-radius: 14px; }
.pick-actions.two { grid-template-columns: 1fr 1fr; }
.tk-cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tk-cat { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; border-radius: 14px; background: var(--card); padding: 13px 6px; font-size: 13.5px; font-weight: 600; color: var(--text); box-shadow: inset 0 0 0 1px var(--sep); }
.tk-cat .ic { width: 26px; height: 26px; color: var(--text-2); }
.tk-cat.on { background: var(--accent-tint); box-shadow: inset 0 0 0 2px var(--accent); color: var(--accent); }
.tk-cat.on .ic { color: var(--accent); }
.tk-eur { position: relative; }
.tk-eur span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-2); font-weight: 600; pointer-events: none; }
.tk-amount-in { padding-right: 34px; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tk-chef-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; padding: 0 4px 10px; }
.tk-chef-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tk-chef-tot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; text-align: right; }
.tk-chef-v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tk-cat-pill { display: inline-flex; align-items: center; gap: 6px; }
.tk-cat-pill .ic { width: 17px; height: 17px; color: var(--text-2); }
.tk-paid { border: 0; border-radius: 999px; padding: 5px 11px; font-size: 12.5px; font-weight: 600; background: var(--accent-tint); color: var(--accent); display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.tk-paid .ic { width: 14px; height: 14px; }
.tk-paid.on { background: rgba(52, 199, 89, 0.14); color: var(--green); }
.tk-paid:disabled { opacity: .5; }

/* ─── v2.2 : hébergements ──────────────────────────────────────── */
.tabbar.many .tab { font-size: 9.5px; letter-spacing: -0.02em; flex: 1 1 0; min-width: 0; padding: 0 1px; }
.tabbar.many .tab > span:not(.tab-badge) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabbar.many .tab .ic { width: 24px; height: 24px; }
.lg-refs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin: 4px -2px 4px; scrollbar-width: none; }
.lg-refs::-webkit-scrollbar { display: none; }
.lg-ref { flex: none; display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; padding: 8px 14px; background: var(--card); box-shadow: inset 0 0 0 1px var(--sep); font-size: 14px; color: var(--text); white-space: nowrap; }
.lg-ref .ic { width: 16px; height: 16px; color: var(--accent); }
.lg-ref span { color: var(--text-2); }
.lg-ref.on { background: var(--accent); color: #fff; box-shadow: none; }
.lg-ref.on span, .lg-ref.on .ic { color: rgba(255, 255, 255, 0.85); }
.lg-add { margin: 10px 0 14px; }
.lg-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.lg-card { background: var(--card); border-radius: 16px; box-shadow: var(--shadow-sm); overflow: hidden; display: flex; flex-direction: column; }
.lg-main { border: 0; background: none; text-align: left; padding: 14px 16px 10px; color: inherit; font: inherit; display: flex; flex-direction: column; gap: 5px; cursor: pointer; }
.lg-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.lg-name { font-size: 16.5px; font-weight: 650; letter-spacing: -0.01em; }
.lg-dist { flex: none; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; font-size: 14.5px; }
.lg-sub { color: var(--text-2); font-size: 13.5px; }
.lg-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; }
.lg-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; padding: 4px 9px; border-radius: 999px; background: var(--fill-2); color: var(--text-2); }
.lg-tag .ic { width: 14px; height: 14px; }
.lg-tag.strong { background: var(--accent-tint); color: var(--accent); font-weight: 650; }
.lg-actions { display: flex; gap: 8px; padding: 0 12px 12px; flex-wrap: wrap; }
.lg-actions .btn { flex: 1 1 auto; justify-content: center; }
.lg-actions .btn.plain { flex: 0 0 auto; }
.lg-types { display: flex; flex-wrap: wrap; gap: 8px; }

/* ─── v2.3 : heures oubliées ───────────────────────────────────── */
.field.hidden { display: none; }
.fix-time { margin-top: 10px; color: var(--accent); font-weight: 600; }
.fix-time .ic { width: 18px; height: 18px; }
.chrono-card .controls-wrap .fix-time { background: transparent; }
.big-time { font-size: 30px; font-weight: 700; text-align: center; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; padding: 14px; }

/* ─── v2.4 : tablette (appli des chefs) ────────────────────────── */
@media (min-width: 760px) {
  #app .host:not(.admin) .page { max-width: 780px; padding: 0 28px; }
  #app .host:not(.admin) .lh-title { font-size: 38px; }
  #app .host:not(.admin) .lg-list { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 980px) {
  #app .host:not(.admin) .page { max-width: 980px; padding: 0 36px; }
  #app .host:not(.admin) .page.today { max-width: 1180px; }
  .today-cols { display: grid; grid-template-columns: minmax(380px, 460px) minmax(0, 1fr); gap: 26px; align-items: start; }
  .today-a { position: sticky; top: 18px; display: grid; gap: 14px; }
  .today-a > .chrono-card, .today-a > .banner { margin: 0; }
  .today-b { min-width: 0; }
  .today-b > :first-child { margin-top: 0; }
  .today-b > .group:first-child { margin-top: 0; }
}
@media (min-width: 1200px) { #app .host:not(.admin) .lg-list { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px) {
  /* Les boutons Démarrer / Pause / Fin juste sous le chrono, toujours visibles sur tablette en paysage */
  .today-a .chrono-card { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
  .today-a .chrono-card > * { order: 5; }
  .today-a .chrono-card > .chrono-status { order: 0; }
  .today-a .chrono-card > .clock { order: 1; font-size: 64px; }
  .today-a .chrono-card > .chrono-caption { order: 2; }
  .today-a .chrono-card > .controls-wrap, .today-a .chrono-card > .controls { order: 3; margin: 6px 0 12px; }
  .today-a .chrono-card .fix-time { margin-top: 0; }
}
@media (min-width: 980px) and (max-height: 860px) {
  .today-a .chrono-card > .clock { font-size: 54px; }
  .today-a .round-in { width: 84px; height: 84px; }
}

/* ─── v2.4 : accueil administrateur « tableau de bord » (sombre, uniquement sur l'accueil) ─── */
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.screen.dash-mode {
  --d-bg: #0a0c11; --d-card: rgba(24, 28, 37, 0.72); --d-card-hi: rgba(34, 39, 51, 0.9); --d-line: rgba(255, 255, 255, 0.07); --d-line-2: rgba(255, 255, 255, 0.12);
  --d-text: #f2f4f8; --d-text-2: #a1a9b8; --d-text-3: #6f7789;
  --d-accent: #ff7a2e; --d-green: #30d158; --d-orange: #ff9f0a; --d-red: #ff5a50; --d-blue: #5b95ff;
  background:
    radial-gradient(900px 420px at 8% -8%, rgba(255, 122, 46, 0.13), transparent 60%),
    radial-gradient(800px 460px at 100% 0%, rgba(62, 123, 240, 0.14), transparent 62%),
    var(--d-bg);
  color: var(--d-text); color-scheme: dark;
}
.dash-mode .loading { color: var(--d-text-2); }
.dash-mode .spin { border-color: rgba(var(--d-fg), 0.12); border-top-color: var(--d-accent); }
.dash { padding: calc(var(--safe-t) + 22px) 0 8px; display: grid; gap: 16px; -webkit-font-smoothing: antialiased; }
.dash .ic { width: 18px; height: 18px; flex: none; }
.dash button { font-family: inherit; color: inherit; font-size: 15px; }

/* En-tête */
.d-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.d-eyebrow { font-size: 13px; font-weight: 600; color: var(--d-text-2); letter-spacing: 0.01em; }
.d-head h1 { margin: 4px 0 0; font-size: 34px; line-height: 1.1; font-weight: 700; letter-spacing: -0.025em; }
.d-head-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.d-live-pill { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 999px; background: rgba(48, 209, 88, 0.1); border: 1px solid rgba(48, 209, 88, 0.22); color: var(--d-green-t); font-size: 13px; font-weight: 600; }
.d-live-pill > i { width: 8px; height: 8px; border-radius: 50%; background: var(--d-green); box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.6); animation: d-pulse 2s infinite; }
.d-live-pill.off { background: rgba(var(--d-fg), 0.05); border-color: var(--d-line-2); color: var(--d-text-2); }
.d-live-pill.off > i { background: var(--d-text-3); animation: none; }
.d-stamp { color: var(--d-text-3); font-weight: 500; }
.d-btn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--d-line-2); background: rgba(var(--d-fg), 0.04); font-size: 13.5px; font-weight: 600; cursor: pointer; transition: background 0.15s; }
.d-btn:hover { background: rgba(var(--d-fg), 0.09); }
@keyframes d-pulse { 0% { box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.55); } 70% { box-shadow: 0 0 0 8px rgba(48, 209, 88, 0); } 100% { box-shadow: 0 0 0 0 rgba(48, 209, 88, 0); } }

/* Alertes */
.d-alerts { display: flex; flex-wrap: wrap; gap: 8px; }
.d-alert { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--d-line); background: rgba(var(--d-fg), 0.04); font-size: 13.5px; font-weight: 500; text-align: left; cursor: default; }
button.d-alert { cursor: pointer; transition: background 0.15s, border-color 0.15s; }
button.d-alert:hover { background: rgba(var(--d-fg), 0.08); }
.d-alert > .ic:last-child:not(:first-child) { width: 14px; height: 14px; opacity: 0.55; }
.d-alert.warn { border-color: rgba(255, 159, 10, 0.3); background: rgba(255, 159, 10, 0.08); } .d-alert.warn > .ic:first-child { color: var(--d-orange); }
.d-alert.red { border-color: rgba(255, 90, 80, 0.32); background: rgba(255, 90, 80, 0.08); } .d-alert.red > .ic:first-child { color: var(--d-red); }
.d-alert.blue { border-color: rgba(91, 149, 255, 0.3); background: rgba(91, 149, 255, 0.08); } .d-alert.blue > .ic:first-child { color: var(--d-blue); }
.d-alert.ok { color: var(--d-text-2); } .d-alert.ok > .ic { color: var(--d-green); }

/* Statistiques */
.d-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.d-kpi-slot { display: grid; }
.d-kpi { position: relative; overflow: hidden; display: grid; align-content: start; gap: 6px; padding: 16px 18px 16px; min-height: 128px; border-radius: 18px; border: 1px solid var(--d-line); background: linear-gradient(180deg, rgba(var(--d-fg), 0.045), rgba(var(--d-fg), 0.015)), var(--d-card); box-shadow: inset 0 1px 0 rgba(var(--d-fg), 0.05), 0 10px 30px rgba(0, 0, 0, 0.25); text-align: left; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
button.d-kpi { cursor: pointer; transition: transform 0.15s, border-color 0.15s; }
button.d-kpi:hover { border-color: var(--d-line-2); transform: translateY(-1px); }
.d-kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.d-kpi-label { font-size: 13px; font-weight: 600; color: var(--d-text-2); }
.d-kpi-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: rgba(var(--d-fg), 0.06); color: var(--d-text-2); }
.d-kpi-ic .ic { width: 16px; height: 16px; }
.d-kpi-value { display: flex; align-items: baseline; gap: 2px; font-variant-numeric: tabular-nums; }
.d-kpi-num { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.d-kpi-suffix { font-size: 18px; font-weight: 600; color: var(--d-text-3); }
.d-kpi-foot { font-size: 12.5px; color: var(--d-text-2); position: relative; z-index: 1; }
.d-kpi.live { border-color: rgba(48, 209, 88, 0.24); background: radial-gradient(260px 120px at 100% 0%, rgba(48, 209, 88, 0.16), transparent 70%), linear-gradient(180deg, rgba(var(--d-fg), 0.045), rgba(var(--d-fg), 0.015)), var(--d-card); }
.d-kpi.live .d-kpi-ic { background: rgba(48, 209, 88, 0.14); color: var(--d-green); }
.d-kpi.blue .d-kpi-ic { background: rgba(91, 149, 255, 0.14); color: var(--d-blue); }
.d-spark { position: absolute; right: 16px; top: 58px; width: 38%; max-width: 120px; height: 34px; opacity: 0.95; pointer-events: none; }
.d-spark svg { width: 100%; height: 100%; display: block; overflow: visible; }
.d-delta { font-weight: 600; } .d-delta.up { color: var(--d-green-t); } .d-delta.down { color: var(--d-red-t); } .d-delta > span { color: var(--d-text-3); font-weight: 500; }
.d-red { color: var(--d-red-t); font-weight: 600; } .d-orange { color: var(--d-orange-t); font-weight: 600; }

/* Cartes */
.d-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; align-items: start; }
.d-card { grid-column: span 12; min-width: 0; padding: 18px 18px 16px; border-radius: 20px; border: 1px solid var(--d-line); background: var(--d-card); box-shadow: inset 0 1px 0 rgba(var(--d-fg), 0.04), 0 10px 30px rgba(0, 0, 0, 0.22); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.d-card.span-7 { grid-column: span 7; } .d-card.span-5 { grid-column: span 5; } .d-card.span-4 { grid-column: span 4; }
.d-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.d-card-head h2 { margin: 0; font-size: 16px; font-weight: 650; letter-spacing: -0.01em; }
.d-card-sub { margin-top: 2px; font-size: 12.5px; color: var(--d-text-3); }
.d-link { display: inline-flex; align-items: center; gap: 2px; border: 0; background: none; padding: 4px 0 4px 8px; color: var(--d-text-2); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.d-link:hover { color: var(--d-text); }
.d-link .ic { width: 14px; height: 14px; }
.d-empty { padding: 18px 4px; color: var(--d-text-3); font-size: 13.5px; }
.dash .muted { color: var(--d-text-3); }
.dash .avatar { background: linear-gradient(135deg, #2a3242, #1c2230); color: #cfd6e3; border: 1px solid var(--d-line-2); }

/* En direct */
.d-live { display: grid; gap: 2px; }
.d-live-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 12px; }
.d-live-row + .d-live-row { border-top: 1px solid var(--d-line); border-radius: 0; }
.d-av { position: relative; display: inline-grid; }
.d-dot { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid #161a23; background: var(--d-text-3); }
.d-live-row.running .d-dot { background: var(--d-green); animation: d-pulse 2s infinite; }
.d-live-row.paused .d-dot { background: var(--d-orange); }
.d-live-row.ended .d-dot { background: #5b6476; }
.d-live-name { font-size: 14.5px; font-weight: 600; }
.d-live-where { font-size: 13px; color: var(--d-text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.d-live-side { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px 10px; text-align: right; }
.d-state { font-size: 12px; font-weight: 650; padding: 3px 9px; border-radius: 999px; background: rgba(var(--d-fg), 0.06); color: var(--d-text-2); }
.d-live-row.running .d-state { background: rgba(48, 209, 88, 0.13); color: var(--d-green-t); }
.d-live-row.paused .d-state { background: rgba(255, 159, 10, 0.13); color: var(--d-orange-t); }
.d-since { font-size: 12.5px; color: var(--d-text-3); font-variant-numeric: tabular-nums; }
.d-team { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--d-text-2); font-variant-numeric: tabular-nums; }
.d-team .ic { width: 15px; height: 15px; }
.d-flag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--d-red-t); }
.d-flag .ic { width: 14px; height: 14px; }

/* Planning */
.d-plan { display: grid; gap: 8px; }
.d-plan-row { display: grid; grid-template-columns: 4px minmax(0, 1fr); gap: 12px; padding: 10px 12px 10px 10px; border-radius: 12px; border: 1px solid var(--d-line); background: rgba(var(--d-fg), 0.025); text-align: left; cursor: pointer; transition: background 0.15s; }
.d-plan-row:hover { background: rgba(var(--d-fg), 0.06); }
.d-plan-bar { border-radius: 4px; }
.d-plan-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.d-count { font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: rgba(var(--d-fg), 0.08); color: var(--d-text-2); font-variant-numeric: tabular-nums; }
.d-plan-people { margin-top: 3px; font-size: 12.5px; color: var(--d-text-2); line-height: 1.45; }
.d-plan-veh { display: flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 12.5px; color: var(--d-text-3); }
.d-plan-veh .ic { width: 15px; height: 15px; }
.d-plan-note { margin-top: 4px; font-size: 12px; color: var(--d-text-3); font-style: italic; }

/* Graphique */
.d-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--d-text-2); }
.d-legend span { display: inline-flex; align-items: center; gap: 6px; }
.d-legend i, .d-tip i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.d-chart { position: relative; }
.d-chart-svg { display: block; width: 100%; height: auto; overflow: visible; }
.d-chart-svg .g { stroke: rgba(var(--d-fg), 0.06); stroke-width: 1; }
.d-chart-svg .g.base { stroke: rgba(var(--d-fg), 0.16); }
.d-chart-svg .ax { fill: var(--d-text-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.d-chart-svg .ax.cur { fill: var(--d-text); font-weight: 600; }
.d-chart-svg .val { fill: var(--d-text); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.d-chart-svg .bar { cursor: pointer; transition: opacity 0.15s; }
.d-chart-svg .bar.dim { opacity: 0.4; }
.d-tip { position: absolute; top: -6px; z-index: 2; display: grid; gap: 4px; min-width: 170px; padding: 10px 12px; border-radius: 12px; background: var(--d-tip); border: 1px solid var(--d-line-2); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45); font-size: 12.5px; pointer-events: none; }
.d-tip strong { font-size: 13px; margin-bottom: 2px; }
.d-tip span { display: flex; align-items: center; gap: 7px; color: var(--d-text-2); }
.d-tip b { margin-left: auto; color: var(--d-text); font-variant-numeric: tabular-nums; }
.d-tip .tot { border-top: 1px solid var(--d-line); padding-top: 5px; margin-top: 2px; }

/* Chantiers à surveiller */
.d-watch { display: grid; gap: 6px; }
.d-watch-row { display: grid; gap: 7px; padding: 10px 10px; border-radius: 12px; border: 0; background: none; text-align: left; cursor: pointer; transition: background 0.15s; }
.d-watch-row:hover { background: rgba(var(--d-fg), 0.05); }
.d-watch-top, .d-watch-foot { display: flex; justify-content: space-between; gap: 10px; }
.d-watch-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-watch-pct { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.d-watch-foot { font-size: 12px; color: var(--d-text-3); font-variant-numeric: tabular-nums; }
.d-meter { height: 6px; border-radius: 6px; background: rgba(var(--d-fg), 0.07); overflow: hidden; }
.d-meter i { display: block; height: 100%; border-radius: 6px; background: var(--d-green); }
.d-watch-row.warn .d-meter i { background: var(--d-orange); } .d-watch-row.warn .d-watch-pct { color: var(--d-orange-t); }
.d-watch-row.over .d-meter i { background: var(--d-red); } .d-watch-row.over .d-watch-pct { color: var(--d-red-t); }

/* Listes */
.d-list { display: grid; }
.d-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 6px; border: 0; border-radius: 10px; background: none; text-align: left; cursor: pointer; transition: background 0.15s; }
.d-item + .d-item { border-top: 1px solid var(--d-line); border-radius: 0; }
.d-item:hover { background: rgba(var(--d-fg), 0.04); }
.d-item-main { min-width: 0; }
.d-item-title { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-item-sub { margin-top: 1px; font-size: 12.5px; color: var(--d-text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-urg { width: 9px; height: 9px; border-radius: 50%; margin: 0 4px; background: var(--d-text-3); }
.d-urg.red { background: var(--d-red); box-shadow: 0 0 10px rgba(255, 90, 80, 0.6); } .d-urg.orange { background: var(--d-orange); } .d-urg.green { background: var(--d-green); }
.d-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: rgba(var(--d-fg), 0.06); }
.d-ic.green { background: rgba(48, 209, 88, 0.13); color: var(--d-green); }
.d-ic .ic { width: 16px; height: 16px; }
.d-tag { font-size: 11.5px; font-weight: 650; padding: 3px 9px; border-radius: 999px; }
.d-tag.green { background: rgba(48, 209, 88, 0.13); color: var(--d-green-t); } .d-tag.gray { background: rgba(var(--d-fg), 0.07); color: var(--d-text-2); }
.d-subs-head { display: flex; align-items: center; gap: 14px; padding: 2px 6px 10px; }
.d-ring { position: relative; width: 56px; height: 56px; flex: none; }
.d-ring svg { width: 100%; height: 100%; }
.d-ring circle { fill: none; stroke-width: 6; }
.d-ring .trk { stroke: rgba(var(--d-fg), 0.08); }
.d-ring .val { stroke: var(--d-green); stroke-linecap: round; }
.d-ring span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.d-privacy { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; font-size: 12.5px; color: var(--d-text-3); }
.d-privacy .ic { width: 15px; height: 15px; }

/* Écrans moyens et téléphone */
@media (max-width: 1180px) {
  .d-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .d-card.span-4 { grid-column: span 6; }
  .d-card.span-4:last-child { grid-column: span 12; }
}
@media (max-width: 980px) {
  .d-card.span-7, .d-card.span-5, .d-card.span-4, .d-card.span-4:last-child { grid-column: span 12; }
}
@media (max-width: 600px) {
  .dash { gap: 12px; padding-top: calc(var(--safe-t) + 14px); }
  .d-head h1 { font-size: 28px; }
  .d-stamp { display: none; }
  .d-kpis { gap: 10px; }
  .d-kpi { min-height: 112px; padding: 14px; border-radius: 16px; }
  .d-kpi-num { font-size: 28px; }
  .d-kpi-ic { display: none; }
  .d-spark { display: none; }
  .d-card { padding: 14px 12px 12px; border-radius: 18px; }
  .d-card-head { flex-wrap: wrap; }
  .d-chart-svg .ax { font-size: 11px; }
  .d-chart-svg .val { font-size: 12px; }
  .d-live-row { grid-template-columns: auto minmax(0, 1fr); }
  .d-live-side { grid-column: 2; justify-content: flex-start; text-align: left; margin-top: -4px; }
}

/* ─── v2.5 : camion, PV des chefs, onglets « Plus » sur téléphone ─── */
.tint-green { color: var(--green); }
.tabbar .t-plus { display: none; }
@media (max-width: 759px) {
  .tabbar .t-more { display: none; }
  .tabbar .t-plus { display: flex; }
  .tabbar.many .tab { font-size: 10.5px; letter-spacing: 0; }
}
.pv-btn { margin: 10px 0 18px; }
.cam-chips { margin: 2px 0 16px; }
.cam-chips .chip { display: inline-flex; align-items: center; gap: 7px; }
.cam-chips .chip .ic { width: 17px; height: 17px; }
.cam-hero { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 18px; margin: 0 0 18px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow-sm); }
.cam-hero-main { min-width: 0; flex: 1 1 220px; }
.cam-hero-title { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.cam-hero-sub { margin-top: 3px; font-size: 14px; color: var(--text-2); }
.cam-hero .btn { flex: 0 0 auto; }
@media (max-width: 520px) { .cam-hero .btn { flex: 1 1 100%; } }
.cam-lines { display: grid; gap: 8px; margin-bottom: 8px; }
.cam-line { display: grid; grid-template-columns: minmax(0, 1fr) 76px 40px; gap: 8px; align-items: center; }
.cam-line .field-input.qty { text-align: center; }
.cam-req .row-title { white-space: normal; }
/* Véhicules (admin) : entretien et matériel */
.veh-modes { margin-bottom: 14px; }
.veh-modes .segmented { max-width: 520px; }
.care-card { text-align: left; }
.care-card.over { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--red) 45%, transparent), var(--shadow-sm); }
.care-card.soon { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--orange) 45%, transparent), var(--shadow-sm); }
.care-list { display: grid; gap: 6px; margin-top: 12px; }
.care-line { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; column-gap: 10px; align-items: center; font-size: 14px; }
.care-line i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.care-line.soon i { background: var(--orange); } .care-line.over i { background: var(--red); }
.care-line b { font-variant-numeric: tabular-nums; font-weight: 600; }
.care-line em { grid-column: 2 / 4; font-style: normal; font-size: 12.5px; color: var(--text-2); margin-top: -2px; }
.care-line.over em { color: var(--red); } .care-line.soon em { color: color-mix(in srgb, var(--orange) 80%, var(--text)); }
.mat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.mat-card { background: var(--card); border-radius: 18px; padding: 16px; box-shadow: var(--shadow-sm); display: grid; gap: 10px; align-content: start; }
.mat-card.nouvelle { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--orange) 40%, transparent), var(--shadow-sm); }
.mat-head { display: flex; align-items: center; gap: 12px; }
.mat-head .veh-title { flex: 1; min-width: 0; }
.mat-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.mat-items li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 10px; border-radius: 10px; background: var(--fill-2); font-size: 14.5px; }
.mat-items b { font-variant-numeric: tabular-nums; }
.mat-note { margin: 0; font-size: 14px; color: var(--text-2); }
.mat-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cert-watch { margin-bottom: 10px; }
.cert-photo { display: grid; place-items: center; min-height: 80px; padding: 10px; border-radius: 14px; background: var(--fill-2); }
.cert-photo img { max-width: 100%; max-height: 260px; border-radius: 10px; display: block; }

/* ─── v2.6 : plans PDF à l'échelle ─────────────────────────────── */
.plan-ic { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: color-mix(in srgb, var(--red) 14%, var(--card)); color: var(--red); font-size: 10.5px; font-weight: 800; letter-spacing: 0.02em; }
.pv { position: fixed; inset: 0; z-index: 200; background: #1b1e25; color: #f2f4f8; overscroll-behavior: contain; -webkit-user-select: none; user-select: none; }
.pv-stage { position: absolute; inset: 0; overflow: hidden; touch-action: none; cursor: grab; background: #2a2e37; }
.pv-base { position: absolute; left: 0; top: 0; transform-origin: 0 0; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45); background: #fff; will-change: transform; }
.pv-detail { position: absolute; left: 0; top: 0; pointer-events: none; }
.pv-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif; }
.pv-loupe { position: absolute; left: 0; top: 0; width: 130px; height: 130px; border-radius: 50%; pointer-events: none; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); z-index: 3; }
.pv-status { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 15px; color: #c9cfdb; padding: 24px; text-align: center; }
.pv-status .ic { width: 22px; height: 22px; }
.pv-top { position: absolute; left: 0; right: 0; top: 0; z-index: 4; display: flex; align-items: center; gap: 10px; padding: calc(var(--safe-t) + 10px) 12px 10px; background: linear-gradient(180deg, rgba(17, 20, 27, 0.92), rgba(17, 20, 27, 0.6)); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.pv-title { flex: 1; min-width: 0; display: grid; }
.pv-title strong { font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-title span { font-size: 12.5px; color: #a1a9b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-pages { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-variant-numeric: tabular-nums; color: #c9cfdb; }
.pv-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 11px; background: rgba(255, 255, 255, 0.1); color: #fff; }
.pv-btn.round { border-radius: 50%; }
.pv-btn:disabled { opacity: 0.35; }
.pv-btn .ic { width: 19px; height: 19px; }
.pv-scale { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 999px; background: rgba(255, 255, 255, 0.08); color: #fff; font-size: 14px; font-weight: 600; white-space: nowrap; }
.pv-scale .ic { width: 17px; height: 17px; }
.pv-scale.warn { border-color: rgba(255, 159, 10, 0.6); background: rgba(255, 159, 10, 0.16); color: #ffc266; }
.pv-tools { position: absolute; left: 50%; bottom: calc(var(--safe-b) + 14px); transform: translateX(-50%); z-index: 4; display: flex; gap: 4px; padding: 6px; max-width: calc(100% - 24px); overflow-x: auto; border-radius: 18px; background: rgba(17, 20, 27, 0.9); border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); scrollbar-width: none; }
.pv-tool { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 70px; height: 54px; padding: 0 10px; border: 0; border-radius: 13px; background: none; color: #c9cfdb; font-size: 11.5px; font-weight: 600; }
.pv-tool .ic { width: 21px; height: 21px; }
.pv-tool.on { background: #ff7a2e; color: #fff; }
.pv-tool.done { background: #30d158; color: #06240f; }
.pv-tool.cal { background: #ffd60a; color: #3a2f00; }
.pv-panel { position: absolute; right: 12px; top: calc(var(--safe-t) + 70px); z-index: 4; width: 260px; max-height: 50vh; overflow-y: auto; padding: 10px; border-radius: 16px; background: rgba(17, 20, 27, 0.9); border: 1px solid rgba(255, 255, 255, 0.1); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.pv-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 8px; font-size: 14px; }
.pv-link { border: 0; background: none; color: #ff8c84; font-size: 13px; font-weight: 600; padding: 4px; }
.pv-item { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 6px; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.pv-item i { width: 10px; height: 10px; border-radius: 50%; }
.pv-item div { display: grid; min-width: 0; }
.pv-item span { font-size: 12px; color: #a1a9b8; }
.pv-item b { font-size: 15px; font-variant-numeric: tabular-nums; }
.pv-item.live b { color: #ffc266; }
.pv-x { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.08); color: #c9cfdb; }
.pv-x .ic { width: 14px; height: 14px; }
.pv-hint { position: absolute; left: 50%; bottom: calc(var(--safe-b) + 86px); transform: translateX(-50%); z-index: 4; max-width: min(520px, calc(100% - 32px)); padding: 10px 16px; border-radius: 14px; background: rgba(17, 20, 27, 0.92); border: 1px solid rgba(255, 255, 255, 0.12); font-size: 14px; text-align: center; color: #e6e9ef; pointer-events: none; }
@media (max-width: 600px) {
  .pv-title span { display: none; }
  .pv-scale span { max-width: 92px; overflow: hidden; text-overflow: ellipsis; }
  .pv-panel { left: 12px; right: 12px; width: auto; top: auto; bottom: calc(var(--safe-b) + 84px); max-height: 30vh; }
  .pv-tool { min-width: 60px; padding: 0 6px; }
}

/* ─── v2.7 : connecteur Claude ─────────────────────────────────── */
.field-input.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; margin: 10px 0; }
.conn-row .row-main { gap: 2px; }
.conn-row .btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ─── v2.8 : espace Chantiers façon tableau de bord ────────────── */
.d-btn.primary { background: #ff7a2e; border-color: #ff7a2e; color: #fff; }
.d-btn.primary:hover { background: #ff8a45; }
a.d-btn { text-decoration: none; color: inherit; }
.d-back { display: inline-flex; align-items: center; gap: 4px; justify-self: start; border: 0; background: none; padding: 4px 0; color: var(--d-text-2); font-size: 14px; font-weight: 600; cursor: pointer; }
.d-back .ic { width: 16px; height: 16px; }
.d-head-main { min-width: 0; }
.d-head-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.d-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; background: rgba(var(--d-fg), 0.07); color: var(--d-text-2); }
.d-tag.st-blue { background: rgba(91, 149, 255, 0.14); color: var(--d-blue-t); } .d-tag.st-purple { background: rgba(191, 90, 242, 0.15); color: var(--d-purple-t); }
.d-tag.st-orange { background: rgba(255, 159, 10, 0.14); color: var(--d-orange-t); } .d-tag.st-green { background: rgba(48, 209, 88, 0.13); color: var(--d-green-t); } .d-tag.st-red { background: rgba(255, 90, 80, 0.14); color: var(--d-red-t); }
.d-card-flush { padding: 14px; }
.d-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.d-search-wrap { flex: 1 1 260px; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 11px; background: rgba(var(--d-fg), 0.05); border: 1px solid var(--d-line); color: var(--d-text-3); }
.d-search-wrap .ic { width: 17px; height: 17px; }
.d-search { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--d-text); font: inherit; font-size: 15px; }
.d-search::placeholder { color: var(--d-text-3); }
.d-select { height: 40px; padding: 0 12px; border-radius: 11px; background: rgba(var(--d-fg), 0.05); border: 1px solid var(--d-line); color: var(--d-text); font: inherit; font-size: 14px; }
.d-select option { color: #111; }
.d-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.d-chip { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--d-line); background: rgba(var(--d-fg), 0.03); color: var(--d-text-2); font-size: 13px !important; font-weight: 600; cursor: pointer; white-space: nowrap; }
.d-chip.on { background: var(--d-text); border-color: var(--d-text); color: var(--d-bg); }
.d-table-wrap { overflow-x: auto; margin: 0 -14px -14px; }
.d-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.d-table th { position: sticky; top: 0; text-align: left; padding: 10px 14px; font-size: 12px; font-weight: 650; color: var(--d-text-3); text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid var(--d-line); cursor: pointer; white-space: nowrap; user-select: none; }
.d-table th.on { color: var(--d-text); }
.d-table th.n, .d-table td.n { text-align: right; }
.d-sort { margin-left: 4px; font-size: 10px; }
.d-table td { padding: 12px 14px; border-bottom: 1px solid var(--d-line); vertical-align: middle; font-variant-numeric: tabular-nums; }
.d-table tbody tr { cursor: pointer; transition: background 0.12s; }
.d-table tbody tr:hover { background: rgba(var(--d-fg), 0.035); }
.d-table tfoot td { font-weight: 700; border-bottom: 0; }
.d-table .w-prog { width: 30%; min-width: 190px; }
.d-ch { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.d-num { flex: none; display: inline-grid; place-items: center; min-width: 40px; height: 26px; padding: 0 6px; border-radius: 8px; background: rgba(var(--d-fg), 0.06); color: var(--d-text-2); font-size: 12px; font-weight: 700; }
.d-ch-name { font-weight: 600; }
.d-ch-sub { font-size: 12.5px; color: var(--d-text-3); margin-top: 1px; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-progress { display: grid; gap: 6px; min-width: 150px; }
.d-progress-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--d-text-2); }
.d-progress-top b { color: var(--d-text); }
.d-progress.warn .d-meter i { background: var(--d-orange); } .d-progress.warn b { color: var(--d-orange-t); }
.d-progress.over .d-meter i { background: var(--d-red); } .d-progress.over b { color: var(--d-red-t); }
.d-progress.big { margin: 6px 0 16px; } .d-progress.big .d-meter { height: 10px; }
.d-flags { display: inline-flex; gap: 5px; justify-content: flex-end; flex-wrap: wrap; }
.d-flag-chip { display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 7px; border-radius: 7px; background: rgba(var(--d-fg), 0.06); color: var(--d-text-2); font-size: 11.5px; font-weight: 650; }
.d-flag-chip .ic { width: 12px; height: 12px; }
.d-flag-chip.red { background: rgba(255, 90, 80, 0.14); color: var(--d-red-t); } .d-flag-chip.green { background: rgba(48, 209, 88, 0.12); color: var(--d-green-t); }
.d-kpi.red { border-color: rgba(255, 90, 80, 0.3); }
.d-kpi.red .d-kpi-ic { background: rgba(255, 90, 80, 0.14); color: var(--d-red); }
.d-bigring { position: relative; width: 150px; height: 150px; margin: 4px auto 10px; }
.d-bigring svg { width: 100%; height: 100%; }
.d-bigring circle { fill: none; stroke-width: 12; }
.d-bigring .trk { stroke: rgba(var(--d-fg), 0.07); }
.d-bigring .val { stroke-linecap: round; }
.d-bigring-txt { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.d-bigring-txt b { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.d-bigring-txt b small { font-size: 16px; color: var(--d-text-3); margin-left: 1px; }
.d-bigring-txt span { font-size: 12.5px; color: var(--d-text-2); }
.d-sub-title { margin: 6px 0 4px; font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.04em; color: var(--d-text-3); }
.d-item.static { cursor: default; }
.d-item.static:hover { background: none; }
.d-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.d-actions .d-link .ic, .d-card-head .d-link .ic:first-child { width: 15px; height: 15px; }
.doc-tag { flex: none; display: inline-grid; place-items: center; min-width: 64px; height: 24px; padding: 0 8px; border-radius: 7px; font-size: 11px; font-weight: 750; letter-spacing: 0.02em; background: rgba(var(--d-fg), 0.07); color: var(--d-text-2); }
.doc-tag.blue { background: rgba(91, 149, 255, 0.15); color: var(--d-blue-t); } .doc-tag.purple { background: rgba(191, 90, 242, 0.16); color: var(--d-purple-t); }
.doc-tag.green { background: rgba(48, 209, 88, 0.14); color: var(--d-green-t); } .doc-tag.orange { background: rgba(255, 159, 10, 0.15); color: var(--d-orange-t); }
.doc-tag.red { background: rgba(255, 90, 80, 0.15); color: var(--d-red-t); }
.doc-amt { font-size: 13.5px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--d-text-2); white-space: nowrap; }
.doc-totals { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--d-line); font-size: 13px; color: var(--d-text-2); }
.doc-totals b { color: var(--d-text); font-variant-numeric: tabular-nums; }
.doc-totals em { flex-basis: 100%; font-style: normal; font-size: 11.5px; color: var(--d-text-3); }
.doc-meta { display: grid; gap: 10px; }
.doc-meta > div { display: flex; justify-content: space-between; gap: 16px; font-size: 15px; }
.doc-meta > div span { color: var(--text-2); }
.doc-meta .doc-tag { justify-self: start; background: var(--fill); color: var(--text); }
@media (max-width: 1100px) { .d-table .hide-md { display: none; } }
@media (max-width: 600px) {
  .d-table th:nth-child(2), .d-table td:nth-child(2) { display: none; }
  .d-table .w-prog { min-width: 130px; }
  .d-ch { min-width: 150px; }
  .d-head-right .d-btn > span:not(.ic) { display: none; }
  .d-head-right .d-btn.primary > span:not(.ic) { display: inline; }
}
.dash > .d-card { grid-column: auto; }
.d-flags { flex-wrap: nowrap; }
.d-table .w-prog { width: 26%; min-width: 170px; }
@media (max-width: 1400px) { .d-table .hide-md { display: none; } }
@media (max-width: 600px) {
  .d-table { table-layout: fixed; }
  .d-table th:nth-child(n+4), .d-table td:nth-child(n+4) { display: none; }
  .d-table th:first-child, .d-table td:first-child { width: 58%; }
  .d-table .w-prog { min-width: 0; width: auto; }
  .d-ch { min-width: 0; gap: 8px; }
  .d-num { min-width: 34px; font-size: 11px; }
  .d-ch-name { overflow: hidden; text-overflow: ellipsis; }
  .d-progress { min-width: 0; }
  .d-table td, .d-table th { padding: 10px 8px; }
  .d-table-wrap { overflow-x: hidden; }
}
.d-card.span-6 { grid-column: span 6; }
@media (max-width: 980px) { .d-card.span-6 { grid-column: span 12; } }

/* ─── v2.9 : onglet Plans ──────────────────────────────────────── */
.plans-head { margin: 18px 4px 2px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-2); }
.plans-page .group-title { text-transform: none; letter-spacing: 0; font-size: 15px; font-weight: 650; color: var(--text); }
@media (min-width: 900px) { .host:not(.admin) .tabbar { width: 640px; } }

/* ─── v3.0 : compteur d'heures ─────────────────────────────────── */
.hb-card { display: grid; gap: 14px; margin: 0 0 18px; padding: 18px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow-sm); }
.hb-card.compact { gap: 10px; padding: 14px 16px; }
.hb-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.hb-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.hb-value { font-size: 32px; font-weight: 750; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.compact .hb-value { font-size: 26px; }
.hb-value.plus, .hb-w b.plus { color: color-mix(in srgb, var(--green) 85%, var(--text)); }
.hb-value.minus, .hb-w b.minus { color: var(--orange); }
.hb-sub { font-size: 13.5px; color: var(--text-2); }
.hb-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--accent-tint); color: var(--accent); flex: none; }
.hb-week { display: grid; gap: 7px; }
.hb-week-top { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.hb-week-top b { font-variant-numeric: tabular-nums; }
.hb-bar { height: 8px; border-radius: 8px; background: var(--fill); overflow: hidden; }
.hb-bar i { display: block; height: 100%; border-radius: 8px; background: var(--accent); }
.hb-note, .hb-foot { font-size: 12.5px; color: var(--text-2); margin: 0; }
.hb-weeks { display: grid; border-top: 0.5px solid var(--sep); }
.hb-w { display: grid; grid-template-columns: minmax(0, 1fr) auto 76px; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 0.5px solid var(--sep); font-size: 14px; font-variant-numeric: tabular-nums; }
.hb-w b { text-align: right; }
.hb-load { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-2); }
.today-b .hb-card { margin-top: 4px; }

/* ─── v3.1 : calques, notes, iso et main levée sur les plans ───── */
.pv-tool.on.soft { background: rgba(255, 255, 255, 0.14); color: #fff; }
.pv-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid transparent; flex: none; }
.chip .pv-dot { margin-right: 6px; vertical-align: -1px; }
.pv-link.add { display: inline-flex; align-items: center; gap: 4px; color: #ffb37f; }
.pv-link.add .ic { width: 15px; height: 15px; }
.pv-layer { display: grid; grid-template-columns: 34px minmax(0, 1fr) 32px; align-items: center; gap: 6px; padding: 6px 4px; border-radius: 12px; }
.pv-layer.on { background: rgba(255, 255, 255, 0.08); }
.pv-layer.off .pv-layer-main { opacity: 0.5; }
.pv-eye { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 10px; background: none; }
.pv-eye .pv-dot { width: 16px; height: 16px; }
.pv-layer-main { display: grid; text-align: left; border: 0; background: none; color: inherit; padding: 2px 0; min-width: 0; }
.pv-layer-main b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-layer-main span { font-size: 12px; color: #a1a9b8; }
.pv-layer-note { margin: 0 6px 6px 44px; padding: 8px 10px; border-radius: 10px; background: rgba(255, 214, 10, 0.1); color: #f3e7b0; font-size: 13px; white-space: pre-wrap; }
.pv-sub { margin: 10px 4px 2px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #8b93a3; }
.pv-item.tap { width: 100%; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; }
.pv-item.tap b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-empty { margin: 6px 4px; font-size: 12.5px; color: #a1a9b8; }
.pv-swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.pv-sw { width: 34px; height: 34px; border-radius: 50%; border: 3px solid transparent; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.08); }
.pv-sw.on { border-color: var(--text); }
.pv-panel { width: 290px; }
.pv-tool { min-width: 62px; padding: 0 8px; }

/* ─── v3.2 : flash ─────────────────────────────────────────────── */
.rec-torch.on { background: #ffd60a; color: #000; }
.flash-hint { display: flex; align-items: flex-start; gap: 6px; margin: 8px 2px 0; font-size: 12.5px; color: var(--muted); }
.flash-hint .ic { width: 15px; height: 15px; margin-top: 1px; color: #f5a700; flex: none; }

/* ─── v3.2 : reprise sur un autre chantier ─────────────────────── */
.resume-on { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; border-radius: 14px; background: var(--fill-2); padding: 11px 14px; margin-top: 4px; color: inherit; font: inherit; }
.resume-on:active { background: var(--fill-3, var(--fill-2)); }
.resume-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(52, 199, 89, 0.14); color: #1f9d48; flex: none; }
.resume-ic .ic { width: 19px; height: 19px; }
.resume-txt { flex: 1; min-width: 0; display: grid; gap: 1px; }
.resume-txt small { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.resume-txt b { font-size: 15.5px; font-weight: 600; overflow-wrap: anywhere; }

/* ─── v3.4 : stockage des fichiers (Cloudflare R2) ─────────────── */
.st-card .row-sub { white-space: normal; }
.st-steps { margin: 2px 0 6px; padding: 4px 16px 6px 54px; display: grid; gap: 12px; counter-reset: st; list-style: none; }
.st-steps li { position: relative; display: grid; gap: 3px; font-size: 14px; line-height: 1.45; color: var(--text-2); }
.st-steps li b { color: var(--text); font-weight: 600; font-size: 15px; }
.st-steps li::before { counter-increment: st; content: counter(st); position: absolute; left: -34px; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12.5px; font-weight: 700; display: grid; place-items: center; }
.st-note { margin: 4px 16px 8px; font-size: 13.5px; line-height: 1.4; color: var(--text-2); overflow-wrap: anywhere; }
.st-note.warn { color: var(--orange); }
.st-actions { gap: 10px; flex-wrap: wrap; }
.st-actions.col { flex-direction: column; align-items: stretch; }
.st-actions.col .row-sub { font-size: 13.5px; color: var(--text-2); line-height: 1.4; }
.st-prog.hidden { display: none; }
.st-meter { height: 6px; border-radius: 3px; background: var(--fill-2); overflow: hidden; }
.st-meter i { display: block; height: 100%; background: var(--green); transition: width 0.3s ease; }
.st-card .row-right { white-space: nowrap; font-size: 14px; }

/* ─── v3.4 : menu « Noter » sur les plans ──────────────────────── */
.pv-tool.accent { background: rgba(255, 122, 46, 0.16); color: #ffb07a; }
.pv-tool.exit { background: #30d158; color: #06240f; }
.pv-tool.layer { background: rgba(255, 255, 255, 0.08); color: #fff; min-width: 88px; max-width: 120px; }
.pv-tool.layer span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-tool:disabled { opacity: 0.38; }
.pv-tools.noting { border-color: rgba(255, 122, 46, 0.45); }
.pv-dot.big { width: 16px; height: 16px; flex: none; }
.row-left .pv-dot.big { width: 18px; height: 18px; border-radius: 50%; display: inline-block; }

/* ─── v3.7 : croquis iso (page blanche quadrillée) ─────────────── */
.iso-stage { background: #fbfcfe; }
.iso-svg { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.iso-svg .grid line { vector-effect: non-scaling-stroke; }
.iso-svg .g-minor { stroke: #3e7bf0; stroke-opacity: 0.13; stroke-width: 1; }
.iso-svg .g-major { stroke: #3e7bf0; stroke-opacity: 0.26; stroke-width: 1; }
.iso-svg .pipe { fill: none; stroke: #1d2433; stroke-width: 3.2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.iso-svg .pv-active .pipe { stroke: #ff7a2e; }
.iso-svg .hit { fill: none; stroke: transparent; stroke-width: 22; vector-effect: non-scaling-stroke; pointer-events: stroke; }
.iso-svg .hit-c { fill: transparent; pointer-events: all; }
.iso-svg .node { fill: #1d2433; }
.iso-svg .pv-active .node { fill: #ff7a2e; }
.iso-svg .head { fill: #fff; stroke: #e5372b; stroke-width: 2.4; vector-effect: non-scaling-stroke; }
.iso-svg .head-dot { fill: #e5372b; }
.iso-svg .valve { fill: #fff; stroke: #1d2433; stroke-width: 2.2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.iso-svg .txt { font: 650 14px -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif; fill: #11141b; paint-order: stroke; stroke: #fbfcfe; stroke-width: 4px; }
.iso-svg .dim { font: 650 12.5px -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif; fill: #1f5fd6; paint-order: stroke; stroke: #fbfcfe; stroke-width: 4px; }
.iso-svg .rubber { stroke: #ff7a2e; stroke-width: 2.2; stroke-dasharray: 6 5; vector-effect: non-scaling-stroke; }
.iso-svg .aim { fill: rgba(255, 122, 46, 0.18); stroke: #ff7a2e; stroke-width: 2; vector-effect: non-scaling-stroke; }
.iso-ed .pv-top { background: linear-gradient(#11141bf0, #11141bcc); }
.iso-title { border: 0; background: none; color: inherit; text-align: left; cursor: pointer; padding: 0; min-width: 0; }
.iso-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(62, 123, 240, 0.12); color: var(--blue); }
.iso-ic .ic { width: 20px; height: 20px; }
/* Croquis iso : murs, dessin libre et éléments sprinkler */
.iso-svg .wall { fill: none; stroke: #8b93a5; stroke-width: 6; stroke-linejoin: miter; stroke-linecap: square; vector-effect: non-scaling-stroke; }
.iso-svg .pv-active .wall { stroke: #ffb07a; }
.iso-svg .pen { fill: none; stroke: #4b5263; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.sym path, .sym circle, .sym rect { fill: #fff; stroke: #1d2433; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.sym .n { fill: none; }
.sym .f { fill: #1d2433; }
.sym .r { stroke: #e5372b; }
.sym .fr { fill: #e5372b; stroke: none; }
.sym .hit-c { fill: transparent; stroke: none; pointer-events: all; }
.sym .st { font: 700 8.5px -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif; fill: #1d2433; stroke: none; }
.sym .st.r { fill: #e5372b; }
.sym-tool .sym-ic { width: 24px; height: 24px; display: grid; place-items: center; background: #fff; border-radius: 6px; }
.sym-tool span:last-child { max-width: 88px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sym-pal { display: grid; gap: 18px; padding-bottom: 8px; }
.sym-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.sym-tile { display: grid; justify-items: center; gap: 6px; padding: 10px 6px; border: 1px solid var(--sep, rgba(0,0,0,.08)); border-radius: 14px; background: var(--card, #fff); color: var(--text); font-size: 12.5px; font-weight: 600; line-height: 1.25; text-align: center; }
.sym-tile.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.sym-tile-ic { width: 52px; height: 52px; display: grid; place-items: center; background: #fbfcfe; border-radius: 12px; border: 1px solid rgba(62, 123, 240, 0.15); }

/* ─── v3.8 : croquis iso / à plat, murs, symboles sprinkler ────── */
.iso-svg .wall { fill: rgba(91, 97, 112, 0.06); stroke: #6b7280; stroke-width: 5; stroke-linejoin: miter; stroke-linecap: square; vector-effect: non-scaling-stroke; }
.iso-svg polyline.wall { fill: none; }
.iso-svg .pv-active .wall { stroke: #ff7a2e; }
.iso-svg .pen { fill: none; stroke: #1d2433; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.iso-svg .pv-active .pen { stroke: #ff7a2e; }
.iso-svg polygon.hit { fill: none; }
.iso-svg .len { font: 600 10.5px -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif; fill: #1f5fd6; paint-order: stroke; stroke: #fbfcfe; stroke-width: 3.5px; }
.iso-svg .wall-len { fill: #5b6170; }
.iso-svg .len.live { fill: #ff7a2e; }
.iso-svg .calib .pipe, .iso-svg .calib .wall { stroke: #ffb300; }
.iso-svg .sym-label { font: 700 10px -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif; fill: #1d2433; paint-order: stroke; stroke: #fbfcfe; stroke-width: 3px; }
.iso-mode .seg { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.iso-mode .seg .ic { width: 18px; height: 18px; }
.sym-tabs { flex-wrap: wrap; margin-bottom: 4px; }
.sym-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.sym-card { display: grid; justify-items: center; gap: 6px; padding: 12px 8px 10px; border: 1.5px solid var(--sep, rgba(0,0,0,0.08)); border-radius: 14px; background: var(--card); color: var(--text); font-size: 12.5px; font-weight: 600; line-height: 1.25; text-align: center; }
.sym-card.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--card)); }
.sym-card .sy-thumb { background: #fbfcfe; border-radius: 10px; }
.sym-preview { display: grid; place-items: center; padding: 6px; }
.sym-preview .sy-thumb { background: #fbfcfe; border-radius: 12px; }
.pv-tool.sym-tool .sy-thumb { background: #fbfcfe; border-radius: 6px; }
.pv-tool.sym-tool span { max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iso-ed .pv-tool { min-width: 58px; padding: 0 6px; font-size: 11px; }
.iso-ed .pv-tools { gap: 2px; }

/* ─── v3.9 : croquis (diamètres, sélection, pièces, fond, matériel) ─ */
.iso-svg .selected .pipe, .iso-svg .selected .wall, .iso-svg .selected .pen { filter: drop-shadow(0 0 3px rgba(62, 123, 240, 0.9)); }
.iso-svg .selected .sy, .iso-svg .selected .sy-r { filter: drop-shadow(0 0 2px rgba(62, 123, 240, 0.9)); }
.iso-svg .sel-rect { fill: rgba(62, 123, 240, 0.08); stroke: #3e7bf0; stroke-width: 1.5; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
.iso-svg .sel-box { fill: none; stroke: #3e7bf0; stroke-width: 1.5; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.iso-svg .room-name { font: 750 13px -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif; fill: #3a3f4b; letter-spacing: 0.04em; paint-order: stroke; stroke: #fbfcfe; stroke-width: 3px; }
.iso-svg .room-area { font: 600 11px -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif; fill: #6b7280; paint-order: stroke; stroke: #fbfcfe; stroke-width: 3px; }
.iso-svg .bg-img { pointer-events: none; }
.iso-svg .bg-img.moving { outline: 2px dashed #ff7a2e; }
.dn-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.dn-dot.big { width: 20px; height: 20px; margin: 0; border: 2px solid rgba(255, 255, 255, 0.85); }
.dn-chips { gap: 6px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 560px) { .grid3 { grid-template-columns: 1fr; } }
.heads-info { display: grid; gap: 6px; }
.heads-count { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--green) 10%, var(--card)); }
.heads-count b { font-size: 18px; }
.heads-count span { font-size: 13.5px; color: var(--text-2); line-height: 1.4; }
.chip.sym-chip { display: inline-flex; align-items: center; gap: 6px; }
.chip.sym-chip .sy-thumb { background: #fbfcfe; border-radius: 5px; }
.sym-card.act { align-content: start; justify-items: start; text-align: left; padding: 14px; gap: 4px; }
.sym-card.act .ic { width: 24px; height: 24px; color: var(--accent); }
.sym-card.act span { font-size: 14px; }
.sym-card.act small { font-size: 12px; font-weight: 500; color: var(--text-2); line-height: 1.35; }
.mat-list { display: grid; gap: 6px; }
.mat-row { display: grid; grid-template-columns: auto 1fr 92px; align-items: center; gap: 10px; padding: 6px 2px; }
.mat-row.off span { color: var(--text-3); text-decoration: line-through; }
.mat-qty { padding: 8px 10px; text-align: right; }
.range { width: 100%; accent-color: var(--accent); }
.pv-tool.dn-tool { min-width: 64px; }
.iso-ed .pv-tool { min-width: 54px; padding: 0 5px; font-size: 10.5px; }
@media (min-width: 1100px) { .iso-ed .pv-tool { min-width: 62px; font-size: 11px; } }

/* ─── v4.0 : surligneur des plans ──────────────────────────────── */
.hl-swatch { display: block; width: 26px; height: 10px; border-radius: 5px; opacity: 0.75; }
.hl-swatch.w-fin { height: 5px; } .hl-swatch.w-large { height: 16px; }
.hl-bar { display: inline-block; width: 22px; border-radius: 4px; background: #ffd60a; opacity: 0.8; margin-right: 6px; vertical-align: middle; }
.hl-bar.w-fin { height: 4px; } .hl-bar.w-moyen { height: 8px; } .hl-bar.w-large { height: 14px; }
.pv-sw.layer { position: relative; }
.pv-sw.layer span { position: absolute; inset: auto 0 -18px; font-size: 10px; color: var(--text-2); text-align: center; }
.pv-item .hl-legend { width: 18px !important; height: 9px !important; border-radius: 4px !important; opacity: 0.75; }
.pv-tool.hl-opt { min-width: 86px; }
.pv-tool.hl-opt span { text-transform: none; }

/* ─── v4.0 : bilan de la semaine ───────────────────────────────── */
.d-grid > .span-12 { grid-column: span 12; }
.d-card.span-8 { grid-column: span 8; }
.d-kpis.d-kpis-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { .d-kpis.d-kpis-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .d-card.span-8 { grid-column: span 12; } }
@media (max-width: 700px) { .d-kpis.d-kpis-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.d-ic.blue { background: rgba(91, 149, 255, 0.14); color: var(--d-blue-t); }
.d-ic.orange { background: rgba(255, 159, 10, 0.14); color: var(--d-orange-t); }
.d-ic.red { background: rgba(255, 69, 58, 0.14); color: var(--d-red-t); }
.d-list.cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 6px 14px; }
.truck-prep { padding: 12px 0; border-top: 1px solid rgba(var(--d-fg), 0.07); display: grid; gap: 8px; }
.truck-prep:first-of-type { border-top: 0; }
.tp-head { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.tp-stop { margin-left: 40px; display: grid; gap: 4px; }
.tp-ch { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; }
.tp-days { color: var(--d-text-2); font-weight: 500; font-size: 13px; white-space: nowrap; }
.tp-mat { margin: 0; padding-left: 18px; color: var(--d-text); font-size: 14px; line-height: 1.5; }
.tp-none { font-size: 13px; color: var(--d-text-2); }
.tp-note { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--d-orange-t); }
.tp-note .ic { width: 15px; height: 15px; }
.tp-req { margin-left: 40px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 159, 10, 0.07); display: grid; gap: 6px; }
.tp-req-title { font-size: 12.5px; font-weight: 700; color: var(--d-orange-t); text-transform: uppercase; letter-spacing: 0.03em; }
.tp-req-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; }

/* ── v4.1 · Préparer le camion (admin Véhicules + onglet Camion du chef) ── */
.prep-bar { display: grid; gap: 8px; margin: 0 0 16px; }
.prep-bar .segmented { max-width: 520px; }
.prep-hint { margin: 0; font-size: 13.5px; color: var(--text-2); }
.prep-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); align-items: start; }
@media (max-width: 760px) { .prep-grid { grid-template-columns: 1fr; } }
.prep-card { background: var(--card); border-radius: 20px; padding: 16px; box-shadow: var(--shadow); display: grid; gap: 14px; min-width: 0; }
.prep-card.soft { box-shadow: var(--shadow-sm); border-radius: 16px; padding: 14px; }
.prep-card .veh-head .btn { flex: none; }
.prep-week { display: grid; gap: 10px; }
.prep-week + .prep-week { padding-top: 12px; border-top: 0.5px solid var(--sep); }
.prep-week-title, .prep-sub { font-size: 12.5px; font-weight: 650; letter-spacing: 0.03em; text-transform: uppercase; color: var(--text-2); }
.prep-stops { display: grid; gap: 12px; }
.prep-stop { display: grid; gap: 8px; }
.prep-stop + .prep-stop { padding-top: 12px; border-top: 0.5px solid var(--sep); }
.prep-stop-head { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.prep-ch { flex: 1; min-width: 0; font-size: 15.5px; font-weight: 650; overflow-wrap: anywhere; }
.prep-days { flex: none; font-size: 13px; color: var(--text-2); }
.prep-count { flex: none; font-size: 12.5px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--text-2); padding: 2px 8px; border-radius: 99px; background: var(--fill-2); }
.prep-count:empty { display: none; }
.prep-count.done { color: var(--green); background: color-mix(in srgb, var(--green) 14%, transparent); }
.prep-lines { display: grid; gap: 4px; }
.prep-line { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 8px 10px; border: 0; border-radius: 11px; background: var(--fill-2); color: var(--text); font: inherit; font-size: 14.5px; text-align: left; cursor: pointer; }
.prep-line:active { transform: scale(0.995); }
.prep-box { flex: none; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--text-3); color: transparent; transition: background 0.15s, box-shadow 0.15s; }
.prep-box .ic { width: 14px; height: 14px; }
.prep-line.on .prep-box { background: var(--green); box-shadow: none; color: #fff; }
.prep-line.on > span:last-child { color: var(--text-2); text-decoration: line-through; }
.prep-none, .prep-empty { margin: 0; font-size: 13.5px; color: var(--text-2); }
.prep-note { display: flex; gap: 6px; align-items: flex-start; font-size: 13.5px; color: var(--orange); }
.prep-note .ic { flex: none; width: 15px; height: 15px; margin-top: 2px; }
.prep-reqs { display: grid; gap: 8px; padding-top: 12px; border-top: 0.5px solid var(--sep); }
.prep-req { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: var(--fill-2); }
.prep-req.nouvelle { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--orange) 40%, transparent); }
.prep-req-main { flex: 1 1 180px; min-width: 0; display: grid; gap: 3px; }
.prep-req-items { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 14.5px; font-weight: 550; }
.prep-req-items b { font-variant-numeric: tabular-nums; }
.prep-req-sub { font-size: 13px; color: var(--text-2); }
.prep-req-side { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.prep-req-side .mat-actions { gap: 6px; align-items: center; }
.prep-done { margin-top: 22px; }

/* ── v4.1 · Planning sur toute la largeur (le nombre de semaines suit la taille de l'écran) ── */
.period-nav { flex-wrap: wrap; }
.plan-weeks-pick { margin-left: 10px; }
.plan-weeks-pick .segmented { width: auto; }
.plan-weeks-pick .seg { padding-left: 12px; padding-right: 12px; white-space: nowrap; }
@media (min-width: 1800px) {
  .plan .plan-days .dn { font-size: 16px; }
  .plan .pn-label { font-size: 13.5px; }
}
/* « Mon pointage » dans l'admin : même mise en page que la tablette des chefs */
@media (min-width: 760px) { .admin .page.embedded { max-width: 780px; padding: 0; } }
@media (min-width: 980px) { .admin .page.embedded { max-width: 980px; } .admin .page.embedded.today { max-width: 1180px; } }
/* Camions à préparer en colonnes (Accueil et Bilan) */
.tp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; align-items: start; }
.tp-grid .truck-prep { padding: 14px; border: 0; border-radius: 14px; background: rgba(var(--d-fg), 0.04); align-content: start; }
.tp-grid .tp-stop, .tp-grid .tp-req { margin-left: 0; }
.tp-grid .tp-stop + .tp-stop { padding-top: 8px; border-top: 1px solid rgba(var(--d-fg), 0.06); }

/* ── v4.4 · Commandes fournisseurs ── */
.prep-bar-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.prep-bar-row .prep-hint { flex: 1 1 320px; }
.ord-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 16px; }
.ord-bar .prep-hint { flex: 1 1 320px; }
.ord-label { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ord-count { font-size: 12.5px; font-weight: 600; color: var(--accent); text-transform: none; letter-spacing: 0; }
.ord-lines { display: grid; gap: 14px; margin: 10px 0 4px; }
.ord-group { display: grid; gap: 6px; }
.ord-group-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 650; margin-top: 4px; }
.ord-group-sub { font-size: 12.5px; font-weight: 500; color: var(--text-2); text-align: right; }
.ord-line { display: grid; grid-template-columns: 34px minmax(0, 1fr) 92px; align-items: center; gap: 8px; }
.ord-line .field-input { padding: 9px 11px; }
.ord-line .qty { text-align: right; }
.ord-line.off .field-input { color: var(--text-3); background: var(--fill-2); }
.ord-check { width: 30px; height: 30px; border: 0; border-radius: 9px; display: grid; place-items: center; background: transparent; box-shadow: inset 0 0 0 1.5px var(--text-3); color: transparent; cursor: pointer; padding: 0; }
.ord-check .ic { width: 17px; height: 17px; }
.ord-check.on { background: var(--accent); box-shadow: none; color: #fff; }
.ord-card .mat-items li.more { background: none; color: var(--text-2); font-size: 13.5px; padding-top: 2px; }
.ord-card.envoyee { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--blue, #0a84ff) 35%, transparent), var(--shadow-sm); }


/* ── v4.5 · Mode clair pour l'accueil, le bilan et les chantiers (bouton soleil / lune) ── */
:root[data-theme="light"] .screen.dash-mode {
  --d-bg: #f2f2f7; --d-card: rgba(255, 255, 255, 0.92); --d-card-hi: #ffffff; --d-line: rgba(0, 0, 0, 0.07); --d-line-2: rgba(0, 0, 0, 0.12);
  --d-text: #1c1c1e; --d-text-2: #6e6e73; --d-text-3: #8e8e93;
  --d-accent: #f06a1f; --d-green: #28b44c; --d-orange: #f08c00; --d-red: #e5372b; --d-blue: #2f6fe4;
  --d-fg: 0, 0, 0; --d-orange-t: #b45f00; --d-red-t: #d02b20; --d-green-t: #1a8f3c; --d-blue-t: #2463d1; --d-purple-t: #8e3cc4; --d-tip: #ffffff;
  background:
    radial-gradient(900px 420px at 8% -8%, rgba(255, 122, 46, 0.10), transparent 60%),
    radial-gradient(800px 460px at 100% 0%, rgba(62, 123, 240, 0.08), transparent 62%),
    var(--d-bg);
  color-scheme: light;
}
:root[data-theme="light"] .dash-mode .d-card { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.05); }
:root[data-theme="light"] .dash-mode .d-kpi { background: var(--d-card-hi); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 18px rgba(0, 0, 0, 0.04); }
:root[data-theme="light"] .dash-mode .d-tip { box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14); }
.theme-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 0; background: var(--fill-2); color: var(--text-2); cursor: pointer; flex: none; }
.theme-btn .ic { width: 18px; height: 18px; }
.theme-btn:hover { color: var(--text); }
.dash-mode .theme-btn, .d-head .theme-btn { background: rgba(var(--d-fg), 0.06); color: var(--d-text-2); border: 1px solid var(--d-line-2); }
.admin .side-foot { gap: 10px; }
.admin .side-foot > div:nth-child(2) { flex: 1; min-width: 0; }
.theme-box { display: grid; gap: 10px; padding: 14px; }
.theme-box .segmented { max-width: 420px; }
:root[data-theme="light"] .dash .avatar { background: linear-gradient(135deg, #e9ebf0, #dfe2e8); color: #3a3f4b; }
:root[data-theme="light"] .dash-mode .d-dot { border-color: #ffffff; }
.phone-mode-text { margin: 0; font-size: 14.5px; color: var(--text-2); line-height: 1.45; }
.theme-box > .btn { justify-self: start; }

/* ── v4.7 · Devis et chantier fini ── */
.d-btn.done-btn { border-color: color-mix(in srgb, var(--d-green) 45%, transparent); color: var(--d-green-t); }
.devis-bar { display: grid; gap: 10px; margin: 0 0 14px; }
.devis-search { max-width: 520px; }
.devis-chips { flex-wrap: wrap; }
.chip-n { margin-left: 6px; font-size: 12px; font-weight: 650; opacity: 0.6; font-variant-numeric: tabular-nums; }
.devis-loading { display: flex; align-items: center; gap: 10px; padding: 28px 4px; color: var(--text-2); }
.devis-list { display: grid; gap: 8px; }
.devis-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow-sm); color: var(--text); text-decoration: none; min-width: 0; }
.devis-row:hover { box-shadow: var(--shadow); }
.devis-ic { flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--fill-2); color: var(--text-2); }
.devis-ic .ic { width: 19px; height: 19px; }
.devis-ic.purple { background: color-mix(in srgb, var(--purple) 14%, transparent); color: var(--purple); }
.devis-ic.blue { background: color-mix(in srgb, var(--blue) 13%, transparent); color: var(--blue); }
.devis-ic.green { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); }
.devis-ic.orange { background: color-mix(in srgb, var(--orange) 15%, transparent); color: var(--orange); }
.devis-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.devis-title { font-weight: 650; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.devis-sub { font-size: 13.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.devis-desc { font-size: 13px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.devis-side { flex: none; display: grid; justify-items: end; gap: 4px; }
.devis-date { font-size: 12.5px; color: var(--text-3); }
@media (max-width: 600px) { .devis-desc { display: none; } .devis-row { align-items: flex-start; } }
.pick-wrap { position: relative; }
.pick-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); background: var(--card); border-radius: 12px; box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18), 0 0 0 0.5px var(--sep); padding: 4px; max-height: 300px; overflow: auto; }
.pick-item { display: flex; align-items: baseline; gap: 10px; justify-content: space-between; width: 100%; padding: 10px 12px; border: 0; border-radius: 9px; background: none; color: var(--text); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.pick-item:hover { background: var(--fill-2); }
.pick-item.new { color: var(--accent); font-weight: 600; justify-content: flex-start; }
.pick-item .ic { width: 16px; height: 16px; flex: none; align-self: center; }
.pick-sub { font-size: 12.5px; color: var(--text-3); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%; }
.pick-tag { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 0; }
.pick-tag:empty { display: none; }
.devis-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.devis-thumb { position: relative; width: 84px; height: 84px; border-radius: 12px; overflow: hidden; background: var(--fill-2); }
.devis-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.devis-thumb .icon-btn { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 13px; background: rgba(0, 0, 0, 0.55); color: #fff; }
.devis-thumb .icon-btn .ic { width: 14px; height: 14px; }
.devis-add-photo { display: grid; place-items: center; gap: 4px; align-content: center; min-width: 84px; height: 84px; padding: 0 12px; border: 1.5px dashed var(--text-3); border-radius: 12px; background: none; color: var(--text-2); font: inherit; font-size: 12.5px; cursor: pointer; }
.devis-add-photo .ic { width: 22px; height: 22px; }

/* ── v4.9 · Fiche devis ── */
.devis-detail { display: grid; gap: 14px; padding-bottom: 40px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; justify-self: start; padding: 6px 4px; border: 0; background: none; color: var(--accent); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.back-link .ic { width: 18px; height: 18px; }
.dd-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.dd-head-main { display: grid; gap: 6px; min-width: 0; }
.dd-eyebrow { font-size: 13.5px; color: var(--text-2); font-weight: 550; }
.dd-head h1 { margin: 0; font-size: clamp(24px, 3vw, 32px); letter-spacing: -0.02em; line-height: 1.12; overflow-wrap: anywhere; }
.dd-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.dd-head-right { display: flex; gap: 8px; flex-wrap: wrap; }
.dd-card { background: var(--card); border-radius: 18px; box-shadow: var(--shadow-sm); padding: 16px; display: grid; gap: 12px; min-width: 0; }
.dd-card-title { font-size: 13px; font-weight: 650; letter-spacing: 0.03em; text-transform: uppercase; color: var(--text-2); }
.dd-card-title.row-title-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.dd-card-title .btn { text-transform: none; letter-spacing: 0; }
.dd-add { display: flex; gap: 6px; flex-wrap: wrap; }
.dd-etats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.dd-etat { display: grid; gap: 2px; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--sep); background: var(--card); color: var(--text); font: inherit; cursor: pointer; }
.dd-etat b { font-size: 14.5px; font-weight: 650; }
.dd-etat span { font-size: 12.5px; color: var(--text-2); }
.dd-etat:hover { border-color: var(--text-3); }
.dd-etat.on { border-color: transparent; }
.dd-etat.on.purple { background: color-mix(in srgb, var(--purple) 14%, transparent); box-shadow: inset 0 0 0 1.5px var(--purple); }
.dd-etat.on.blue { background: color-mix(in srgb, var(--blue) 12%, transparent); box-shadow: inset 0 0 0 1.5px var(--blue); }
.dd-etat.on.orange { background: color-mix(in srgb, var(--orange) 14%, transparent); box-shadow: inset 0 0 0 1.5px var(--orange); }
.dd-etat.on.green { background: color-mix(in srgb, var(--green) 14%, transparent); box-shadow: inset 0 0 0 1.5px var(--green); }
.dd-etat.on.gray { background: var(--fill-2); box-shadow: inset 0 0 0 1.5px var(--text-3); }
.dd-infos { display: grid; gap: 0; }
.dd-info { display: grid; grid-template-columns: minmax(130px, 200px) 1fr auto; align-items: start; gap: 12px; padding: 11px 2px; border: 0; border-top: 0.5px solid var(--sep); background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.dd-info:first-child { border-top: 0; }
.dd-info:disabled { cursor: default; }
.dd-info-label { font-size: 14px; color: var(--text-2); }
.dd-info-value { font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
.dd-info-value.muted { color: var(--text-3); }
.dd-info > .ic { width: 16px; height: 16px; color: var(--text-3); margin-top: 3px; }
@media (max-width: 600px) { .dd-info { grid-template-columns: 1fr auto; } .dd-info-label { grid-column: 1 / -1; font-size: 12.5px; } }
.dd-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dd-kpis > div { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--fill-2); }
.dd-kpis span { font-size: 12.5px; color: var(--text-2); }
.dd-kpis b { font-size: 19px; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.dd-group { display: grid; gap: 4px; padding: 10px; border-radius: 14px; border: 0.5px solid var(--sep); }
.dd-group-head { display: flex; align-items: flex-start; gap: 10px; padding: 4px 4px 8px; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.dd-group-head.static { cursor: default; }
.dd-group-title { font-size: 16px; font-weight: 650; }
.dd-line { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 10px; background: var(--fill-2); color: var(--text); font: inherit; text-align: left; cursor: pointer; min-width: 0; }
.dd-line:hover { background: var(--fill); }
.dd-line-ic { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--card); color: var(--text-2); }
.dd-line-ic .ic { width: 16px; height: 16px; }
.dd-line.t-people .dd-line-ic { color: var(--purple); }
.dd-line.t-box .dd-line-ic { color: var(--orange); }
.dd-line.t-truck .dd-line-ic { color: var(--green); }
.dd-line-main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.dd-line-title { font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
.dd-line-sub { font-size: 12.5px; color: var(--text-2); overflow-wrap: anywhere; }
.dd-line-amt { flex: none; font-size: 14.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.dd-line-amt.big { font-size: 16px; }
.dd-group-add { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 4px; }
.dd-note { margin: 0; font-size: 12.5px; color: var(--text-3); }
.dd-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dd-estimate { font-size: 15px; font-weight: 650; color: var(--accent); }
.dd-estimate:empty { display: none; }
.dd-mail { border: 1.5px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.dd-mail-meta { display: grid; gap: 4px; }
.dd-mail-meta > div { display: flex; gap: 10px; font-size: 14.5px; }
.dd-mail-meta span { width: 52px; flex: none; color: var(--text-2); }
.dd-mail-body { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--fill-2); font: inherit; font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.dd-content { display: grid; gap: 8px; }
.dd-h { margin: 6px 0 0; font-size: 16px; }
.dd-p { margin: 0; font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.dd-li { display: flex; gap: 8px; font-size: 14.5px; }
.dd-callout { display: flex; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--fill-2); font-size: 14px; }
.dd-quote { margin: 0; padding-left: 12px; border-left: 3px solid var(--sep); color: var(--text-2); }
.dd-hr { border: 0; border-top: 0.5px solid var(--sep); width: 100%; }
.dd-img img { max-width: min(100%, 420px); border-radius: 12px; display: block; }
.dd-link { display: inline-flex; gap: 6px; align-items: center; color: var(--accent); font-size: 14px; overflow-wrap: anywhere; }
.dd-link .ic { width: 15px; height: 15px; }
.devis-row { border: 0; font: inherit; text-align: left; cursor: pointer; width: 100%; }
.devis-extra { justify-self: start; }

/* ── v5.0 · Lignes de devis, tarifs, courrier ── */
.dd-kpis.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dd-kpis > div.main { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.dd-kpis > div.main b { color: var(--accent); font-size: 22px; }
@media (max-width: 700px) { .dd-kpis.four { grid-template-columns: 1fr 1fr; } }
.dl-part { display: flex; align-items: flex-start; gap: 4px; }
.dl-part .dd-group-head { flex: 1; min-width: 0; }
.dl-row { display: flex; align-items: center; gap: 4px; }
.dl-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 10px; background: var(--fill-2); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.dl-main:hover { background: var(--fill); }
.dl-row.t-people .dd-line-ic { color: var(--purple); }
.dl-row.t-box .dd-line-ic { color: var(--orange); }
.dl-row.t-truck .dd-line-ic { color: var(--green); }
.dl-calc { font-size: 12px; color: var(--text-3); font-style: italic; overflow-wrap: anywhere; }
.dl-arrows { display: flex; flex-direction: column; gap: 0; opacity: 0.35; transition: opacity 0.15s; }
.dl-row:hover .dl-arrows, .dl-part:hover .dl-arrows { opacity: 1; }
.dl-arrows .icon-btn { width: 26px; height: 20px; border-radius: 6px; }
.dl-arrows .icon-btn .ic { width: 15px; height: 15px; }
@media (hover: none) { .dl-arrows { display: none; } }
.dl-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 4px; }
.dl-add { display: flex; gap: 6px; flex-wrap: wrap; }
.dd-row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.dd-move { display: flex; gap: 8px; justify-content: center; }
.dd-convert { align-items: center; }
.tarif-list { display: grid; gap: 6px; }
.tarif-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 12px; background: var(--fill-2); }
.tarif-name { display: grid; gap: 1px; min-width: 0; }
.tarif-name b { font-size: 15px; }
.tarif-name span { font-size: 12.5px; color: var(--text-2); }
.tarif-input { display: flex; align-items: center; gap: 6px; flex: none; }
.tarif-input .field-input { width: 96px; text-align: right; }
.tarif-input span { font-size: 13px; color: var(--text-2); min-width: 64px; }
.mail-item { align-items: flex-start; }
.mail-item.seen { opacity: 0.55; }
.mail-item .d-item-title .doc-tag { vertical-align: 1px; margin-right: 2px; }
.mail-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; flex: none; }
.d-btn.small { padding: 5px 10px; font-size: 13px; min-height: 0; }
.d-btn.small .ic { width: 14px; height: 14px; }

/* ═══ v5.1 · Accueil : À faire aujourd'hui, Suivi des devis, rentabilité ═══ */
.d-ic.purple { background: rgba(191, 90, 242, 0.15); color: var(--d-purple-t); }
.aj-list { display: grid; gap: 2px; }
.aj-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 10px 8px; border: 0; border-radius: 12px; background: none; color: var(--d-text); text-align: left; cursor: pointer; transition: background 0.15s; }
.aj-row:hover { background: rgba(var(--d-fg), 0.045); }
.aj-row > .ic:last-child { width: 15px; height: 15px; color: var(--d-text-3); }
.aj-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(var(--d-fg), 0.06); color: var(--d-text-2); }
.aj-ic .ic { width: 17px; height: 17px; }
.aj-ic.red { background: rgba(255, 69, 58, 0.15); color: var(--d-red-t); }
.aj-ic.orange { background: rgba(255, 159, 10, 0.15); color: var(--d-orange-t); }
.aj-ic.blue { background: rgba(91, 149, 255, 0.15); color: var(--d-blue-t); }
.aj-ic.purple { background: rgba(191, 90, 242, 0.15); color: var(--d-purple-t); }
.aj-main { display: grid; gap: 1px; min-width: 0; }
.aj-kind { font-size: 11.5px; font-weight: 650; letter-spacing: 0.02em; color: var(--d-text-3); }
.aj-row.red .aj-kind { color: var(--d-red-t); } .aj-row.orange .aj-kind { color: var(--d-orange-t); } .aj-row.purple .aj-kind { color: var(--d-purple-t); }
.aj-title { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aj-sub { font-size: 12.5px; color: var(--d-text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aj-empty { display: flex; align-items: center; gap: 12px; padding: 14px 6px; color: var(--d-text-2); font-size: 14px; }
.aj-card .d-card-sub, .devis-card .d-card-sub { font-variant-numeric: tabular-nums; }

.dv-body { display: grid; gap: 6px; }
.dv-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 8px; }
.dv-stat { display: grid; gap: 4px; align-content: start; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--d-line); background: rgba(var(--d-fg), 0.03); color: var(--d-text); text-align: left; font: inherit; }
.dv-stat.tap { cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.dv-stat.tap:hover { background: rgba(var(--d-fg), 0.06); border-color: var(--d-line-2); }
.dv-label { font-size: 12px; font-weight: 600; color: var(--d-text-2); }
.dv-value { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dv-stat.blue .dv-value { color: var(--d-blue-t); } .dv-stat.green .dv-value { color: var(--d-green-t); } .dv-stat.purple .dv-value { color: var(--d-purple-t); }
.dv-foot { font-size: 12px; color: var(--d-text-3); }
.d-empty.small { padding: 8px 4px; font-size: 13px; }
.d-link.more { justify-self: start; margin-top: 4px; }
.d-gap { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.d-gap.ok { color: var(--d-green-t); } .d-gap.over { color: var(--d-red-t); }
@media (max-width: 1280px) { .dv-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.d-stack { grid-column: span 7; display: grid; gap: 16px; align-content: start; min-width: 0; }
.d-stack > .d-card { grid-column: auto; }
@media (max-width: 1100px) { .d-card.aj-card, .d-stack { grid-column: span 12; } }

/* Page Rentabilité */
.renta-tools { display: grid; gap: 4px; }
.renta-tools .d-chips { align-items: center; margin-bottom: 0; }
.renta-sep-v { width: 1px; height: 20px; margin: 0 4px; background: var(--d-line-2); }
.renta-table td.rk, .renta-table th.rk { width: 36px; padding-right: 0; color: var(--d-text-3); font-weight: 650; }
.renta-name { font-weight: 600; }
.renta-sub { font-size: 12.5px; color: var(--d-text-3); margin-top: 1px; }
.renta-table td.gap.ok { color: var(--d-green-t); font-weight: 650; } .renta-table td.gap.warn { color: var(--d-orange-t); font-weight: 650; } .renta-table td.gap.over { color: var(--d-red-t); font-weight: 650; }
.renta-table .pc { width: 22%; min-width: 170px; }
.renta-meter { display: grid; grid-template-columns: minmax(60px, 1fr) auto; align-items: center; gap: 10px; }
.renta-meter .bar { height: 6px; border-radius: 99px; background: rgba(var(--d-fg), 0.08); overflow: hidden; }
.renta-meter .bar i { display: block; height: 100%; border-radius: 99px; background: var(--d-green); }
.renta-meter.warn .bar i { background: var(--d-orange); } .renta-meter.over .bar i { background: var(--d-red); }
.renta-meter b { min-width: 48px; text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }
.renta-meter.over b { color: var(--d-red-t); } .renta-meter.warn b { color: var(--d-orange-t); }
.renta-table tr.renta-sep td { padding: 14px 14px 8px; font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.04em; color: var(--d-text-3); cursor: default; }
.renta-table tbody tr.renta-sep:hover, .renta-table tbody tr.renta-total:hover { background: none; }
.renta-table tr.renta-total td { font-weight: 700; border-bottom: 0; cursor: default; }
@media (max-width: 1100px) { .renta-table .hide-md { display: none; } }
@media (max-width: 700px) { .renta-table .hide-sm { display: none; } .renta-table .pc { min-width: 120px; } }
/* Grands écrans (G9, 27 pouces) : l'accueil, les chantiers et la rentabilité prennent plus de place */
@media (min-width: 1700px) { .screen.dash-mode .page.wide { max-width: 1480px; } }
@media (min-width: 2200px) { .screen.dash-mode .page.wide { max-width: 1840px; } }
.renta-table td.n, .renta-table td.hide-md { white-space: nowrap; }
.doc-tag.gray { background: rgba(142, 142, 147, 0.16); color: var(--d-text-2, var(--text-2)); }
.d-item.excluded .d-item-title { color: var(--d-text-3); text-decoration: line-through; text-decoration-color: rgba(var(--d-fg), 0.25); }

/* v5.1.3 · Document du dossier : mail d'origine et PDF à ajouter */
.doc-drop { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 12px; row-gap: 2px; width: 100%; padding: 12px 14px; border: 1.5px dashed var(--sep); border-radius: 14px; background: var(--fill); color: var(--text); font: inherit; text-align: center; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.doc-drop .ic { grid-row: span 2; width: 22px; height: 22px; color: var(--accent); }
.doc-drop b { font-size: 15px; }
.doc-drop span { font-size: 12.5px; color: var(--text-2); line-height: 1.35; }
.doc-drop { text-align: left; }
.doc-drop:hover, .doc-drop.over { border-color: var(--accent); background: var(--accent-tint); }
.doc-mail { display: grid; gap: 10px; padding: 14px; border-radius: 14px; background: var(--fill); }
.doc-mail-title { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-2); }
.doc-mail-title .ic { width: 15px; height: 15px; }
.doc-mail-head { display: grid; gap: 4px; font-size: 14px; }
.doc-mail-head > div { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 8px; }
.doc-mail-head span { color: var(--text-2); }
.doc-mail-head b { font-weight: 600; overflow-wrap: anywhere; }
.doc-mail-subject { font-size: 16px; font-weight: 700; line-height: 1.35; }
.doc-mail-body { max-height: 42vh; overflow: auto; padding: 12px 14px; border-radius: 10px; background: var(--card); font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.doc-mail-atts { display: flex; flex-wrap: wrap; gap: 6px; }
.doc-att { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: 8px; background: var(--card); font-size: 13px; font-weight: 600; }
.doc-att .ic { width: 14px; height: 14px; color: var(--red); }
.doc-note { display: grid; gap: 4px; }
.doc-note span { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-3); }
.doc-note p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--text-2); white-space: pre-wrap; }

/* v5.2 · Interventions en plus, associer un devis */
.d-sub-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.d-sub-row .d-sub-title { margin: 0; }
.d-sub-actions { display: flex; gap: 14px; }
.d-sub-actions .d-link .ic { width: 14px; height: 14px; }
.doc-amt.red { color: var(--d-red-t); }
.assoc-list { display: grid; gap: 6px; }
.assoc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0; border-radius: 14px; background: var(--fill); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: background 0.15s; }
.assoc-row:hover { background: var(--fill-2, var(--fill)); filter: brightness(0.97); }
.assoc-main { display: grid; gap: 2px; min-width: 0; }
.assoc-title { display: flex; align-items: baseline; gap: 10px; font-size: 15.5px; font-weight: 650; }
.assoc-amt { font-size: 13px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.assoc-sub { font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assoc-where { font-size: 12px; font-weight: 600; color: var(--green, #34c759); }
.assoc-where.linked { color: var(--orange, #ff9f0a); }
.d-item .d-unlink { display: grid; place-items: center; width: 28px; height: 28px; margin-left: 2px; border-radius: 8px; color: var(--d-text-3); opacity: 0; transition: opacity 0.15s, background 0.15s, color 0.15s; }
.d-item:hover .d-unlink, .d-item:focus-within .d-unlink { opacity: 1; }
.d-item .d-unlink:hover { background: rgba(255, 69, 58, 0.15); color: var(--d-red-t); }
.d-item .d-unlink .ic { width: 14px; height: 14px; }
@media (hover: none) { .d-item .d-unlink { opacity: 1; } }

/* v5.3 · Onglet Claude : relevé de chaque passage */
.d-kpi.warn { border-color: rgba(255, 159, 10, 0.28); }
.d-kpi.warn .d-kpi-ic { background: rgba(255, 159, 10, 0.14); color: var(--d-orange); }
.claude .cl-days { display: contents; }
.cl-day .d-card-head { margin-bottom: 4px; }
.cl-run { display: grid; grid-template-columns: 92px 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid var(--d-line); }
.cl-run:first-of-type { border-top: 0; }
.cl-when { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.cl-when b { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--d-text); }
.cl-kind { display: inline-flex; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 650; background: rgba(var(--d-fg), 0.07); color: var(--d-text-2); }
.cl-kind.blue { background: rgba(91, 149, 255, 0.14); color: var(--d-blue-t); }
.cl-kind.indigo { background: rgba(175, 130, 255, 0.15); color: var(--d-purple-t); }
.cl-kind.orange { background: rgba(255, 159, 10, 0.14); color: var(--d-orange-t); }
.cl-body { min-width: 0; }
.cl-sum { font-size: 15.5px; font-weight: 600; line-height: 1.4; color: var(--d-text); }
.cl-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cl-chip { padding: 3px 9px; border-radius: 8px; font-size: 12.5px; font-weight: 600; background: rgba(var(--d-fg), 0.06); color: var(--d-text-2); }
.cl-chip.warn { background: rgba(255, 159, 10, 0.13); color: var(--d-orange-t); }
.cl-details { margin-top: 12px; font-size: 13.5px; line-height: 1.5; color: var(--d-text-2); }
.cl-details.clip { max-height: 168px; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent); mask-image: linear-gradient(180deg, #000 70%, transparent); }
.cl-details .cl-h { margin: 10px 0 2px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--d-text-3); }
.cl-details .cl-h:first-child { margin-top: 0; }
.cl-details ul { margin: 0; padding-left: 18px; }
.cl-details li { margin: 2px 0; overflow-wrap: anywhere; }
.cl-details p { margin: 2px 0; }
.cl-more { padding-left: 0; margin-top: 4px; }
.cl-meta { margin-top: 10px; font-size: 12px; color: var(--d-text-3); }
.cl-logwrap { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--d-line); }
.cl-logwrap > .d-link { padding-left: 0; }
.cl-log { margin-top: 6px; display: grid; gap: 2px; }
.cl-log-row { display: grid; grid-template-columns: 48px 130px 1fr; gap: 10px; padding: 5px 0; font-size: 13px; color: var(--d-text-2); }
.cl-log-t { font-variant-numeric: tabular-nums; color: var(--d-text-3); }
.cl-log-k { font-weight: 600; color: var(--d-text); }
.cl-log-r { min-width: 0; overflow-wrap: anywhere; }
.cl-older { display: flex; justify-content: center; }
.cl-prompts { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; }
.cl-prompt { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--d-line); background: rgba(var(--d-fg), 0.03); }
.cl-prompt > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cl-prompt b { font-size: 14px; color: var(--d-text); }
.cl-prompt span { font-size: 12.5px; color: var(--d-text-2); }
@media (max-width: 640px) {
  .cl-run { grid-template-columns: 1fr; gap: 8px; }
  .cl-when { flex-direction: row; align-items: center; }
  .cl-when b { font-size: 17px; }
  .cl-log-row { grid-template-columns: 44px 1fr; }
  .cl-log-r { grid-column: 2; }
}
.btn-pair.single { grid-template-columns: 1fr; }

/* v5.5 · Widget iPhone (Raccourcis) */
.wg-box { display: flex; flex-direction: column; gap: 12px; }
.wg-text { margin: 0; font-size: 14px; line-height: 1.45; color: var(--text-2, inherit); }
.wg-box > .btn { align-self: flex-start; }
.wg-links { display: flex; flex-direction: column; gap: 8px; }
.wg-link { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: rgba(127, 127, 127, 0.08); }
.wg-dot { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; }
.wg-dot svg { width: 18px; height: 18px; }
.wg-dot.green { background: #30a14e; }
.wg-dot.red { background: #e5484d; }
.wg-dot.blue { background: #0a84ff; }
.wg-link-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wg-link-main b { font-size: 14.5px; }
.wg-link-main code { font-size: 11.5px; opacity: 0.6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; user-select: all; -webkit-user-select: all; }
.wg-steps { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.wg-steps li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; font-size: 14px; line-height: 1.45; }
.wg-n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: rgba(127, 127, 127, 0.16); }
.wg-note { margin: 0; display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.45; opacity: 0.8; }
.wg-note svg { flex: none; width: 16px; height: 16px; margin-top: 2px; }
.wg-box > .btn.danger { align-self: flex-start; }
