/* Mental Plus — interface façon Google Agenda (Material 3), sombre par défaut.
   Coque d'app plein écran : barre du haut · filtres d'équipe · vue (grille / mois / planning) · bouton +. */

:root {
  color-scheme: dark;
  --bg: #131314;
  --surface: #1e1f20;
  --surface-2: #282a2c;
  --surface-3: #333537;
  --surface-page: #131314;
  --fg: #e3e3e3;
  --fg-2: #c4c7c5;
  --fg-3: #8e918f;
  --line: #3c4043;
  --line-2: #2a2b2d;
  --outline: #444746;
  --hover: rgba(255, 255, 255, .08);
  --primary: #a8c7fa;
  --on-primary: #062e6f;
  --primary-cont: #0842a0;
  --on-primary-cont: #d3e3fd;
  --secondary-cont: #004a77;
  --on-secondary-cont: #c2e7ff;
  --chip-sel: #004a77;
  --on-chip-sel: #c2e7ff;
  --fab-bg: #004a77;
  --fab-fg: #c2e7ff;
  --inverse: #e3e3e3;
  --on-inverse: #303030;
  --inverse-primary: #0b57d0;
  --now: #ea4335;
  --scrim: rgba(0, 0, 0, .55);
  --danger: #f2b8b5;
  --on-danger: #601410;
  --warn-bg: #4a3800;
  --warn-fg: #ffdf99;
  --ok-bg: #0f5223;
  --ok-fg: #c4eed0;
  --we-tint: rgba(255, 255, 255, .025);
  --w-bg: #1f2a36;
  --w-fg: #e3e3e3;
  --shadow-3: 0 1px 3px rgba(0, 0, 0, .4), 0 4px 8px 3px rgba(0, 0, 0, .25);
  --paper: var(--bg);
  --brand-slate: #c5ccd3;
  --brand-teal: #5fb8c9;
  --font: Roboto, "Google Sans Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Google Sans Flex", "Google Sans", Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]):not([data-mp-theme="dark"]) {
    color-scheme: light;
    --bg: #ffffff; --surface: #f8fafd; --surface-2: #f0f4f9; --surface-3: #e3e8ef; --surface-page: #ffffff;
    --fg: #1f1f1f; --fg-2: #444746; --fg-3: #747775; --line: #dadce0; --line-2: #eceef1; --outline: #c4c7c5;
    --hover: rgba(0, 0, 0, .06); --primary: #0b57d0; --on-primary: #ffffff; --primary-cont: #d3e3fd; --on-primary-cont: #041e49;
    --secondary-cont: #c2e7ff; --on-secondary-cont: #001d35; --chip-sel: #c2e7ff; --on-chip-sel: #001d35; --fab-bg: #c2e7ff; --fab-fg: #001d35;
    --inverse: #303030; --on-inverse: #f2f2f2; --inverse-primary: #a8c7fa; --scrim: rgba(0, 0, 0, .32);
    --danger: #b3261e; --on-danger: #ffffff; --warn-bg: #fff1c2; --warn-fg: #5c4300; --ok-bg: #c4eed0; --ok-fg: #0f5223;
    --we-tint: rgba(0, 0, 0, .022); --w-bg: #eaf1fb; --w-fg: #1f1f1f;
    --shadow-3: 0 1px 3px rgba(60, 64, 67, .3), 0 4px 8px 3px rgba(60, 64, 67, .15);
    --brand-slate: #565f68; --brand-teal: #00738a;
  }
}
:root[data-theme="light"]:not([data-mp-theme="dark"]), :root[data-mp-theme="light"] {
  color-scheme: light;
  --bg: #ffffff; --surface: #f8fafd; --surface-2: #f0f4f9; --surface-3: #e3e8ef; --surface-page: #ffffff;
  --fg: #1f1f1f; --fg-2: #444746; --fg-3: #747775; --line: #dadce0; --line-2: #eceef1; --outline: #c4c7c5;
  --hover: rgba(0, 0, 0, .06); --primary: #0b57d0; --on-primary: #ffffff; --primary-cont: #d3e3fd; --on-primary-cont: #041e49;
  --secondary-cont: #c2e7ff; --on-secondary-cont: #001d35; --chip-sel: #c2e7ff; --on-chip-sel: #001d35; --fab-bg: #c2e7ff; --fab-fg: #001d35;
  --inverse: #303030; --on-inverse: #f2f2f2; --inverse-primary: #a8c7fa; --scrim: rgba(0, 0, 0, .32);
  --danger: #b3261e; --on-danger: #ffffff; --warn-bg: #fff1c2; --warn-fg: #5c4300; --ok-bg: #c4eed0; --ok-fg: #0f5223;
  --we-tint: rgba(0, 0, 0, .022); --w-bg: #eaf1fb; --w-fg: #1f1f1f;
  --shadow-3: 0 1px 3px rgba(60, 64, 67, .3), 0 4px 8px 3px rgba(60, 64, 67, .15);
  --brand-slate: #565f68; --brand-teal: #00738a;
}
/* Fond d'écran : les surfaces deviennent transparentes, un voile (réglable) garde la lisibilité. */
:root[data-wp] {
  --paper: transparent;
  --surface-page: color-mix(in srgb, var(--bg) 88%, transparent);
  --line: color-mix(in srgb, var(--fg) 17%, transparent);
  --line-2: color-mix(in srgb, var(--fg) 8%, transparent);
  --we-tint: transparent;
}

/* ---------- Base ---------- */

[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; box-sizing: border-box; background: var(--bg); }
body {
  height: 100%; margin: 0; overflow: hidden; background: var(--bg); color: var(--fg);
  font: 14px/1.4 var(--font); -webkit-tap-highlight-color: transparent; overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--primary); }
.ic { width: 24px; height: 24px; fill: currentColor; flex: none; }
.ic.flip { transform: rotate(180deg); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
/* Animations réduites (réglage Windows / Android) : aucune transition. Pas de durée « .01ms » : elle transformait
   chaque changement de position en animation (des centaines par image pendant un zoom, et une image de retard).
   Les balayages ont un minuteur de secours, ils n'ont pas besoin de « transitionend ». */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

#wp { position: fixed; inset: 0; z-index: 0; background-size: cover; background-position: center; display: none; }
:root[data-wp] #wp { display: block; }
#wp.blur { filter: blur(14px); transform: scale(1.08); }
#wp::after { content: ""; position: absolute; inset: 0; background: var(--bg); opacity: var(--scrim-a, .62); }
#wp { overflow: hidden; }
#wp .wp-media { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; max-width: none; pointer-events: none; }

#app { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
.main { position: relative; flex: 1; min-height: 0; overflow: hidden; }

/* ---------- Barre du haut ---------- */

.topbar { height: 56px; flex: none; display: flex; align-items: center; gap: 2px; padding: 0 6px 0 4px; background: var(--paper); }
.icon-btn {
  width: 44px; height: 44px; border: 0; padding: 0; background: transparent; color: var(--fg-2);
  border-radius: 50%; display: inline-grid; place-items: center; cursor: pointer; flex: none;
}
.icon-btn:hover { background: var(--hover); }
.icon-btn.sm { width: 36px; height: 36px; }
.icon-btn.sm .ic { width: 20px; height: 20px; }
.title-btn {
  display: inline-flex; align-items: center; gap: 2px; min-width: 0; border: 0; background: transparent; color: var(--fg);
  font: 400 22px/1 var(--font-display); padding: 8px 4px 8px 8px; border-radius: 10px; cursor: pointer; white-space: nowrap;
}
.title-btn span { overflow: hidden; text-overflow: ellipsis; }
.title-btn .ic { color: var(--fg-2); transition: transform .2s; }
body.mini-open .title-btn .ic { transform: rotate(180deg); }
.tb-sp { flex: 1; }
.tb-nav { display: none; }
.today-btn { position: relative; }
.today-btn span { position: absolute; inset: 0; display: grid; place-items: center; padding-top: 6px; font: 700 10px/1 var(--font); }
.avatar-btn { border: 0; background: transparent; padding: 6px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }

.avatar {
  width: var(--s); height: var(--s); border-radius: 50%; display: inline-grid; place-items: center; overflow: hidden; flex: none;
  font: 500 calc(var(--s) * .42)/1 var(--font); background: var(--surface-3); color: var(--fg);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar .ic { width: 62%; height: 62%; }
/* Logo et nom : bleu pétrole et orange du site, ardoise du logo, police Titillium Web (charte Dental Plus). */
.logo {
  width: var(--s); height: var(--s); border-radius: 28%; flex: none; display: inline-grid; place-items: center;
  background: linear-gradient(150deg, #0a8aa3 0%, #00738a 55%, #005b6e 100%);
}
.logo svg { width: 100%; height: 100%; }
.brand { display: inline-flex; align-items: flex-start; gap: 4px; font-family: "Titillium Web", var(--font-display); line-height: 1; position: relative; padding-bottom: 5px; }
.brand-main { font-weight: 600; font-size: 21px; letter-spacing: .01em; color: var(--brand-slate); }
.brand-plus { font-weight: 300; font-size: 11px; letter-spacing: .18em; color: var(--brand-teal); margin-top: 1px; }
.brand::after { content: ""; position: absolute; left: 2px; right: 10px; bottom: 0; height: 5px; border-bottom: 1.5px solid var(--brand-teal); border-radius: 0 0 60% 40% / 0 0 100% 100%; opacity: .8; }

/* Mini-calendrier */
.mini { flex: none; padding: 0 12px 8px; background: var(--paper); }
.mini-head { display: flex; align-items: center; justify-content: space-between; font-weight: 500; padding: 0 4px 4px; }
.mini-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; text-align: center; max-width: 420px; margin: 0 auto; }
.mini-wd { font-size: 11px; color: var(--fg-3); padding: 2px 0; }
.mini-d { height: 36px; border: 0; background: transparent; color: var(--fg); border-radius: 18px; font: 13px var(--font); cursor: pointer; font-variant-numeric: tabular-nums; }
.mini-d.out { color: var(--fg-3); }
.mini-d.sel { background: var(--secondary-cont); color: var(--on-secondary-cont); }
.mini-d.today { color: var(--primary); font-weight: 700; }
.mini-d.today.sel { background: var(--primary); color: var(--on-primary); }

/* Puces d'équipe */
.chips { flex: none; display: flex; gap: 8px; padding: 2px 12px 8px; overflow-x: auto; scrollbar-width: none; background: var(--paper); }
.chips::-webkit-scrollbar { display: none; }
.fchip {
  height: 32px; display: inline-flex; align-items: center; gap: 4px; padding: 0 11px; flex: none;
  border-radius: 8px; border: 1px solid var(--outline); background: transparent; color: var(--fg-2);
  font: 500 13px/1 var(--font); white-space: nowrap; cursor: pointer;
}
.fchip .ic { width: 18px; height: 18px; }
.fchip.sel { background: var(--chip-sel); color: var(--on-chip-sel); border-color: transparent; }
.fchip.dept { min-width: 42px; justify-content: center; padding: 0 10px; color: var(--fg-3); text-decoration: line-through; }
.fchip.dept.on { color: var(--fg); background: var(--surface-3); border-color: transparent; text-decoration: none; }
.fchip.warnish { background: var(--warn-bg); color: var(--warn-fg); }
.chip-sep { width: 1px; flex: none; background: var(--line); margin: 6px 2px; }
.banner { flex: none; font-size: 12px; padding: 5px 16px; background: var(--warn-bg); color: var(--warn-fg); }

/* ---------- Grille (jour / 3 jours / semaine / équipe) ---------- */

.gv {
  position: absolute; inset: 0; display: flex; flex-direction: column; --gutter: 46px; --hh: 56px;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.gv-head { flex: none; display: flex; position: relative; z-index: 2; background: var(--paper); border-bottom: 1px solid var(--line); }
.gv-corner { width: var(--gutter); flex: none; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; padding-bottom: 4px; color: var(--fg-3); font-size: 10.5px; }
.gv-corner .wk { font-weight: 500; letter-spacing: .02em; }
.ad-toggle { border: 0; background: transparent; color: var(--fg-2); padding: 0; width: 28px; height: 24px; display: grid; place-items: center; cursor: pointer; border-radius: 12px; }
.ad-toggle .ic { width: 20px; height: 20px; }
.corner-day { display: flex; flex-direction: column; align-items: center; font-size: 18px; line-height: 1.1; color: var(--fg); }
.corner-day b { font-size: 10.5px; font-weight: 500; color: var(--fg-2); }
.corner-day.today, .corner-day.today b { color: var(--primary); }
.gv-hvp { flex: 1; min-width: 0; overflow: hidden; }
.track { display: flex; width: 300%; transform: translateX(-33.3333%); transform-origin: 0 0; will-change: transform; }
.page { width: calc(100% / 3); flex: none; min-width: 0; }
.hp { display: flex; flex-direction: column; }
.dh-row { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); }
.dh { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 4px 0 4px; cursor: pointer; min-width: 0; }
.dh-wd { font-size: 11px; font-weight: 500; color: var(--fg-2); }
.dh-num { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; font: 400 20px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.dh.today .dh-wd { color: var(--primary); }
.dh.today .dh-num { background: var(--primary); color: var(--on-primary); font-weight: 500; }
.dh-person { padding: 6px 2px 4px; gap: 3px; }
.dh-name { font-size: 11px; font-weight: 500; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.ad-lane { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); grid-auto-rows: 22px; row-gap: 2px; padding: 0 0 4px; min-height: 8px; }
.ad-bar {
  margin: 0 2px; border-radius: 5px; background: var(--c); color: var(--tc); font-size: 12px; font-weight: 500; padding: 0 6px;
  display: flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; cursor: pointer; min-width: 0;
}
.ad-bar span { overflow: hidden; text-overflow: ellipsis; }
.ad-bar.past { opacity: .6; }
.ad-more { font-size: 11px; color: var(--fg-2); padding-left: 6px; display: flex; align-items: center; cursor: pointer; }
.gv-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; touch-action: none; overscroll-behavior: contain; scrollbar-width: thin; position: relative; }
/* Hauteur de la journée posée en px par le script (setHourHeight) ; tout le reste est en % de cette hauteur :
   pendant un zoom, un seul élément change de taille (pas de variable CSS héritée à recalculer partout). */
.gv-body { position: relative; display: flex; height: 1344px; }
.gv-bvp > .track { height: 100%; }
.gv-gutter { width: var(--gutter); flex: none; position: relative; }
.hl { position: absolute; right: 7px; top: calc(var(--h) * 100% / 24 - 7px); font-size: 10.5px; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.gv-bvp { flex: 1; min-width: 0; overflow: hidden; position: relative; }
.bp {
  position: relative; height: 100%; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
}
/* Premier enfant de la page, sans z-index : peint sous les colonnes et les RDV, comme l'ancien fond. */
.hgrid { position: absolute; inset: 0; pointer-events: none; }
.hgrid i, .hgrid b { position: absolute; left: 0; right: 0; height: 1px; top: calc(var(--h) * 100% / 24); background: var(--line); }
.hgrid b { top: calc((var(--h) + .5) * 100% / 24); background: var(--line-2); display: none; }
.gv.halfhours .hgrid b { display: block; }
.col { position: relative; border-left: 1px solid var(--line); min-width: 0; }
.col.we { background: var(--we-tint); }
.ev {
  position: absolute; z-index: 1; top: calc(var(--t) * 100% / 24); height: max(calc(var(--d) * 100% / 24 - 1px), 18px);
  left: calc(var(--l) * 1% + 0.5px); width: calc(var(--w) * 1% - 1.5px);
  background: var(--c); color: var(--tc); border-radius: 6px; padding: 2px 5px; overflow: hidden;
  font-size: 12px; line-height: 1.25; box-shadow: 0 0 0 1px var(--bg); cursor: pointer;
}
:root[data-wp] .ev { box-shadow: none; }
.ev-in { display: flex; flex-direction: column; min-width: 0; }
.ev-in.one { flex-direction: row; white-space: nowrap; }
.ev-title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.ev-in:not(.one) .ev-title { overflow-wrap: anywhere; hyphens: auto; -webkit-hyphens: auto; flex: none; }
.ev-act { font-size: 11.5px; line-height: 1.22; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; overflow-wrap: anywhere; hyphens: auto; -webkit-hyphens: auto; opacity: .94; flex: none; }
.ev.narrow { padding: 2px 3px; font-size: 11.5px; line-height: 1.2; letter-spacing: -.01em; border-radius: 5px; }
.ev.narrow .ev-title { font-weight: 600; }
.ev.narrow .ev-ic { width: 11px; height: 11px; margin-right: 2px; }
.ev.narrow .ev-act { font-size: 10.5px; line-height: 1.18; }
.ev.narrow .ev-time { font-size: 10px; margin-top: 1px; }
.ev.narrow .ev-dots { top: auto; bottom: 2px; right: 2px; }
.ev.narrow .ev-dots i { width: 5px; height: 5px; }
.ev-in.one .ev-title { display: block; white-space: nowrap; flex: 0 1 auto; min-width: 16px; }
.ev-time, .ev-loc { font-size: 11px; opacity: .92; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.ev-in.one .ev-time { flex: 0 12 auto; min-width: 0; text-overflow: clip; }
.ev.slim { padding: 0; display: flex; justify-content: center; }
/* Carte étroite : nom (et action) écrits de haut en bas. */
.ev.vert { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 1px 3px; border-radius: 5px; }
.ev.vert .ev-ic { width: 12px; height: 12px; margin: 0; flex: none; vertical-align: 0; }
.ev-v { flex: 1 1 0; min-height: 0; max-width: 100%; display: flex; flex-direction: column; align-items: stretch; writing-mode: vertical-rl; overflow: hidden; }
.ev-v > span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: unset; line-height: 1.12; }
.ev-v .ev-title { font-size: 12px; font-weight: 600; letter-spacing: .01em; }
.ev-v .ev-act { font-size: 10.5px; opacity: .9; }
.ev.vert .ev-dots { top: auto; bottom: 2px; right: 50%; transform: translateX(50%); flex-direction: column; }
.ev.vert .ev-dots i { width: 5px; height: 5px; }
.ev.vert.xs { padding: 3px 0 2px; }
.ev.vert.xs .ev-title { font-size: 10.5px; font-weight: 500; letter-spacing: 0; }
.ev-vt { writing-mode: vertical-rl; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 10.5px; font-weight: 500; line-height: 1; padding: 4px 0; max-height: 100%; }
.ev-ic { width: 12px; height: 12px; vertical-align: -2px; margin-right: 3px; }
.ev.past { opacity: .55; }
.ev.done .ev-title, .mchip.done, .sv-ev.done .sv-title, .ad-bar.done span { text-decoration: line-through; text-decoration-thickness: 1px; }
.ev.free { background: color-mix(in srgb, var(--c) 18%, var(--bg)); color: var(--fg); border-left: 3px solid var(--c); }
.ev.dragging { opacity: .3; }
.ev.ghost { background: var(--primary-cont); color: var(--on-primary-cont); outline: 2px dashed var(--primary); outline-offset: -2px; z-index: 4; }
.ev-dots { position: absolute; right: 3px; top: 3px; display: flex; gap: 2px; }
.ev-dots i { width: 7px; height: 7px; border-radius: 50%; box-shadow: 0 0 0 1.5px var(--c); }
.ev-travel {
  position: absolute; top: calc(var(--t) * 100% / 24); height: calc(var(--d) * 100% / 24);
  left: calc(var(--l) * 1% + 1px); width: calc(var(--w) * 1% - 3px); border-radius: 6px 6px 0 0; pointer-events: none;
  background: color-mix(in srgb, var(--c) 16%, transparent);
  display: flex; align-items: center; gap: 2px; padding-left: 4px; font-size: 10px; color: var(--fg-2); overflow: hidden; white-space: nowrap;
}
.ev-travel .ic { width: 12px; height: 12px; }
.now { position: absolute; left: -1px; right: 0; top: calc(var(--t) * 100% / 24); height: 2px; background: var(--now); z-index: 3; pointer-events: none; }
.now::before { content: ""; position: absolute; left: -6px; top: -5px; width: 12px; height: 12px; border-radius: 50%; background: var(--now); }
.gv.team .col + .col .now::before { display: none; }
.drag-ghost {
  position: absolute; z-index: 10; background: var(--c, var(--primary)); color: var(--tc, var(--on-primary)); border-radius: 6px;
  padding: 2px 6px; font-size: 12px; line-height: 1.25; box-shadow: var(--shadow-3); pointer-events: none; overflow: hidden;
}
.drag-ghost.create { background: var(--primary); color: var(--on-primary); }
.drag-ghost .ev-title { font-weight: 500; }
.zoom-hud {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 20; pointer-events: none;
  background: var(--inverse); color: var(--on-inverse); padding: 10px 18px; border-radius: 22px; font: 500 15px var(--font); box-shadow: var(--shadow-3);
}

/* ---------- Mois ---------- */

.mv { position: absolute; inset: 0; display: flex; flex-direction: column; user-select: none; -webkit-user-select: none; touch-action: none; }
.mv-wd { flex: none; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; font-size: 11px; font-weight: 500; color: var(--fg-2); padding: 2px 0 6px; border-bottom: 1px solid var(--line); background: var(--paper); }
.mv-vp { flex: 1; min-height: 0; overflow: hidden; }
.mv .track { height: 100%; }
.mp { display: grid; height: 100%; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: repeat(var(--rows), minmax(0, 1fr)); }
.mc { min-width: 0; overflow: hidden; display: flex; flex-direction: column; gap: 1px; padding: 2px 1px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; }
.mc:nth-child(7n) { border-right: 0; }
.mc-num { align-self: center; min-width: 22px; height: 22px; padding: 0 5px; display: grid; place-items: center; border-radius: 11px; font-size: 12px; font-weight: 500; white-space: nowrap; margin-bottom: 1px; font-variant-numeric: tabular-nums; }
.mc.today .mc-num { background: var(--primary); color: var(--on-primary); }
.mc.out { color: var(--fg-3); }
.mc.out .mchip { opacity: .55; }
.mchip { background: var(--c); color: var(--tc); border-radius: 4px; font-size: 10.5px; line-height: 15px; padding: 0 3px; white-space: nowrap; overflow: hidden; flex: none; }
.mchip.past { opacity: .6; }
.mmore { font-size: 10.5px; color: var(--fg-2); padding-left: 3px; font-weight: 500; }

/* ---------- Planning ---------- */

.sv { position: absolute; inset: 0; overflow-y: auto; touch-action: pan-y; padding-bottom: 104px; overscroll-behavior: contain; }
.sv-list { max-width: 860px; margin: 0 auto; }
.sv-earlier, .sv-later { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; border: 0; background: transparent; color: var(--primary); font: 500 13px var(--font); padding: 12px; cursor: pointer; }
.sv-later { color: var(--fg-3); }
.sv-month { height: 104px; margin: 10px 8px 4px; border-radius: 18px; background-size: cover; background-position: center; display: flex; align-items: flex-end; padding: 12px 18px; }
.sv-month span { font: 400 22px/1.1 var(--font-display); color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .55); }
.sv-week { padding: 12px 16px 4px 66px; font-size: 12px; color: var(--fg-2); }
.sv-day { display: flex; gap: 6px; padding: 4px 10px 4px 0; }
.sv-date { width: 58px; flex: none; display: flex; flex-direction: column; align-items: center; padding-top: 2px; cursor: pointer; }
.sv-wd { font-size: 11px; font-weight: 500; color: var(--fg-2); }
.sv-num { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; font: 400 20px/1 var(--font-display); }
.sv-day.today .sv-wd { color: var(--primary); }
.sv-day.today .sv-num { background: var(--primary); color: var(--on-primary); }
.sv-items { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.sv-ev { background: var(--c); color: var(--tc); border-radius: 10px; padding: 8px 12px; cursor: pointer; min-width: 0; }
.sv-ev.past { opacity: .6; }
.sv-title { font-weight: 500; overflow-wrap: anywhere; }
.sv-sub, .sv-who { font-size: 12px; opacity: .92; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-now { position: relative; height: 2px; background: var(--now); margin: 3px 0 3px 6px; }
.sv-now::before { content: ""; position: absolute; left: -6px; top: -5px; width: 12px; height: 12px; border-radius: 50%; background: var(--now); }
.sv-empty { color: var(--fg-2); padding: 8px 4px; }

/* ---------- Bouton + ---------- */

.fab {
  position: fixed; z-index: 20; right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  width: 56px; height: 56px; border-radius: 16px; border: 0; background: var(--fab-bg); color: var(--fab-fg);
  display: grid; place-items: center; box-shadow: var(--shadow-3); cursor: pointer; transition: transform .25s;
}
.fab .ic { width: 28px; height: 28px; transition: transform .2s; }
body.snack-on .fab { transform: translateY(-64px); }
body.speed-open .fab .ic { transform: rotate(45deg); }
.speed {
  position: fixed; inset: 0; z-index: 19; background: var(--scrim); display: flex; flex-direction: column; align-items: flex-end; justify-content: flex-end; gap: 12px;
  padding: 0 calc(22px + env(safe-area-inset-right, 0px)) calc(90px + env(safe-area-inset-bottom, 0px)) 0;
}
.speed button { display: flex; align-items: center; gap: 12px; border: 0; background: transparent; padding: 0; cursor: pointer; }
.speed .lbl { background: var(--surface-2); color: var(--fg); font: 500 14px var(--font); padding: 8px 14px; border-radius: 10px; box-shadow: var(--shadow-3); }
.speed .mini-fab { width: 44px; height: 44px; border-radius: 14px; background: var(--surface-3); color: var(--primary); display: grid; place-items: center; box-shadow: var(--shadow-3); }

/* ---------- Menu latéral ---------- */

.drawer-scrim { position: fixed; inset: 0; z-index: 29; background: var(--scrim); opacity: 0; pointer-events: none; transition: opacity .22s; }
body.drawer-open .drawer-scrim { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; z-index: 30; left: 0; top: 0; bottom: 0; width: min(320px, 86vw); overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border-radius: 0 18px 18px 0; transform: translateX(-104%); transition: transform .26s cubic-bezier(.2, .8, .2, 1);
  padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); box-shadow: var(--shadow-3);
}
body.drawer-open .drawer { transform: none; }
.dr-head { display: flex; align-items: center; gap: 10px; padding: 18px 24px 10px; }
.dr-brand { font: 400 22px/1 var(--font-display); }
.dr-brand b { color: var(--primary); font-weight: 500; }
.dr-sec { padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.dr-sec:last-of-type { border-bottom: 0; }
.dr-item {
  display: flex; align-items: center; gap: 16px; width: calc(100% - 16px); margin: 0 8px; height: 46px; padding: 0 16px; border-radius: 23px;
  border: 0; background: transparent; color: var(--fg); font: 500 14px var(--font); text-align: left; cursor: pointer;
}
.dr-item:hover { background: var(--hover); }
.dr-item.on { background: var(--secondary-cont); color: var(--on-secondary-cont); }
.dr-item .ic { color: inherit; opacity: .9; }
.dr-item small { margin-left: auto; font-weight: 400; font-size: 11px; opacity: .8; }
.dr-h { padding: 10px 24px 2px; font: 500 12px var(--font); color: var(--fg-2); }
.dr-h.big { font-size: 14px; color: var(--fg); padding-top: 12px; }
.dr-person { display: flex; align-items: center; padding: 0 8px 0 22px; }
.dr-person label { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; min-height: 42px; cursor: pointer; position: relative; }
.dr-person input { position: absolute; opacity: 0; pointer-events: none; }
.cb { width: 20px; height: 20px; border-radius: 4px; border: 2px solid var(--c); display: grid; place-items: center; flex: none; }
.cb .ic { width: 16px; height: 16px; color: #fff; opacity: 0; }
.dr-person input:checked + .cb { background: var(--c); }
.dr-person input:checked + .cb .ic { opacity: 1; }
.dr-person input:focus-visible + .cb { outline: 2px solid var(--primary); outline-offset: 2px; }
.dr-pname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-sec .seg { margin: 6px 16px 2px; }
.dr-sec .hint { padding: 4px 24px 2px; margin: 0; }
.dr-foot { display: flex; align-items: center; gap: 6px; padding: 14px 24px 24px; font-size: 12px; color: var(--fg-2); }
.dr-foot .ic { width: 16px; height: 16px; }

/* ---------- Fenêtres ---------- */

#overlays { position: relative; z-index: 40; }
.ov { position: fixed; inset: 0; z-index: 40; }
.scrim { position: absolute; inset: 0; background: var(--scrim); opacity: 0; transition: opacity .22s; }
.ov.open .scrim { opacity: 1; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 90%; margin: 0 auto; max-width: 720px; display: flex; flex-direction: column;
  background: var(--surface); border-radius: 28px 28px 0 0; box-shadow: var(--shadow-3); transform: translateY(105%);
  transition: transform .28s cubic-bezier(.2, .8, .2, 1); padding-bottom: env(safe-area-inset-bottom, 0px);
}
.ov.open .sheet { transform: none; }
.sheet > :not(.sheet-grab) { overflow-y: auto; min-height: 0; }
.sheet-grab { flex: none; height: 22px; display: grid; place-items: center; touch-action: none; cursor: grab; }
.sheet-grab i { width: 32px; height: 4px; border-radius: 2px; background: var(--outline); }
.page-ov .panel {
  position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--surface-page); transform: translateX(100%);
  transition: transform .28s cubic-bezier(.2, .8, .2, 1); padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
}
:root[data-wp] .page-ov .panel { backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.page-ov.editor .panel { transform: translateY(100%); }
.ov.open .panel { transform: none; }
.pbar { height: 56px; flex: none; display: flex; align-items: center; gap: 4px; padding: 0 10px 0 4px; }
.pbar h2 { flex: 1; min-width: 0; margin: 0; font: 400 20px/1.2 var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbar-actions { display: flex; align-items: center; gap: 4px; }
.pbody { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.pad { padding: 8px 16px 40px; }
.dlg-ov { display: grid; place-items: center; padding: max(24px, env(safe-area-inset-top, 0px)) 16px max(24px, env(safe-area-inset-bottom, 0px)); }
.dlg {
  position: relative; width: min(420px, 100%); max-height: 100%; overflow-y: auto; background: var(--surface-2); border-radius: 28px; padding: 24px;
  box-shadow: var(--shadow-3); transform: scale(.94); opacity: 0; transition: transform .18s, opacity .18s;
}
.dlg-ov.tall .dlg { width: min(540px, 100%); }
.ov.open .dlg { transform: none; opacity: 1; }
.dlg h3 { margin: 0 0 10px; font: 400 22px/1.25 var(--font-display); text-wrap: balance; }
.dlg p { margin: 0 0 10px; }
.dlg-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

.btn {
  height: 40px; padding: 0 20px; border-radius: 20px; border: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 500 14px var(--font); cursor: pointer; text-decoration: none; white-space: nowrap; flex: none;
}
.btn .ic { width: 18px; height: 18px; }
.btn.filled { background: var(--primary); color: var(--on-primary); }
.btn.tonal { background: var(--secondary-cont); color: var(--on-secondary-cont); }
.btn.outline { background: transparent; color: var(--primary); border: 1px solid var(--outline); }
.btn.text { background: transparent; color: var(--primary); padding: 0 12px; }
.btn.danger { background: var(--danger); color: var(--on-danger); }
.btn.danger-text { background: transparent; color: var(--danger); padding: 0 8px; margin-top: 16px; }
.btn.wide { width: 100%; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
.linkish { border: 0; background: none; color: var(--primary); padding: 0; font: inherit; text-decoration: underline; cursor: pointer; }

.snack {
  position: fixed; z-index: 50; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: min(560px, calc(100% - 32px));
  transform: translate(-50%, 160%); transition: transform .25s; display: flex; align-items: center; gap: 8px; min-height: 48px;
  padding: 6px 8px 6px 16px; border-radius: 8px; background: var(--inverse); color: var(--on-inverse); box-shadow: var(--shadow-3);
}
.snack.show { transform: translate(-50%, 0); }
.snack span { flex: 1; }
.snack-btn { border: 0; background: transparent; color: var(--inverse-primary); font: 500 14px var(--font); padding: 10px 12px; border-radius: 6px; cursor: pointer; }

/* Communs */
.hint { font-size: 12px; color: var(--fg-2); margin: 6px 0; }
.hint.center { text-align: center; padding: 16px; }
.hint.warn, .sub.warn { color: var(--warn-fg); }
.sub { font-size: 13px; color: var(--fg-2); }
.tag { display: inline-block; font-size: 10px; font-weight: 500; line-height: 16px; padding: 0 6px; border-radius: 6px; background: var(--surface-3); color: var(--fg-2); vertical-align: 1px; letter-spacing: .02em; }
.tag.dept { background: transparent; border: 1px solid var(--outline); }
.tag.warn { background: var(--warn-bg); color: var(--warn-fg); }
.dot { width: 14px; height: 14px; border-radius: 50%; flex: none; display: inline-block; }
.shead { padding: 22px 16px 6px; font: 500 14px var(--font); color: var(--primary); }
.pad .shead { padding-left: 0; padding-right: 0; }
.sub-h { font: 500 14px var(--font); margin: 20px 0 4px; }
.seg { display: flex; border: 1px solid var(--outline); border-radius: 20px; overflow: hidden; }
.seg button { flex: 1; min-width: 0; height: 40px; border: 0; border-left: 1px solid var(--outline); background: transparent; color: var(--fg); font: 500 13px var(--font); display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; padding: 0 6px; }
.seg button:first-child { border-left: 0; }
.seg button.sel { background: var(--secondary-cont); color: var(--on-secondary-cont); }
.seg .ic { width: 18px; height: 18px; }
.seg.small button { height: 32px; }
.switch { appearance: none; -webkit-appearance: none; width: 52px; height: 32px; border-radius: 16px; flex: none; margin: 0; position: relative; cursor: pointer; background: var(--surface-3); border: 2px solid var(--outline); transition: background .15s; }
.switch::before { content: ""; position: absolute; left: 4px; top: 50%; width: 16px; height: 16px; border-radius: 50%; background: var(--fg-3); transform: translateY(-50%); transition: transform .15s, width .15s, height .15s; }
.switch:checked { background: var(--primary); border-color: var(--primary); }
.switch:checked::before { width: 22px; height: 22px; background: var(--on-primary); transform: translate(19px, -50%); }
.inp { width: 100%; min-width: 0; background: transparent; border: 0; color: var(--fg); font: 16px/1.4 var(--font); padding: 8px 0; outline: none; }
.inp::placeholder { color: var(--fg-3); }
.inp.area { resize: vertical; min-height: 64px; }
.inp.mono { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.select {
  appearance: none; -webkit-appearance: none; width: 100%; min-width: 0; border: 0; color: var(--fg); font: 16px var(--font); padding: 8px 26px 8px 0; cursor: pointer;
  background: linear-gradient(45deg, transparent 50%, var(--fg-2) 50%) right 11px center / 6px 6px no-repeat, linear-gradient(135deg, var(--fg-2) 50%, transparent 50%) right 5px center / 6px 6px no-repeat;
}
.select option { background: var(--surface-2); color: var(--fg); }
.select.mini { width: auto; max-width: 48%; font-size: 14px; color: var(--fg-2); }
.fld { display: flex; flex-direction: column; gap: 2px; margin: 14px 0; }
.fld > span { font-size: 12px; color: var(--fg-2); }
.fld .inp, .fld .select { border-bottom: 1px solid var(--outline); }
.fld .inp:focus { border-bottom-color: var(--primary); }
.fld-row { display: grid; grid-template-columns: minmax(0, 120px) minmax(0, 1fr); gap: 12px; }
.fld-row .fld { margin: 0; }
.radio-list { display: flex; flex-direction: column; gap: 2px; margin: 8px 0; }
.radio-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; cursor: pointer; }
.radio-row input, .check-row input, .pick-row input { accent-color: var(--primary); width: 20px; height: 20px; flex: none; margin: 0; }
.check-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; font-size: 13px; color: var(--fg-2); }
.progress { height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; margin-top: 12px; }
.progress i { display: block; height: 100%; width: 0; background: var(--primary); transition: width .2s; }
.search-box { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; border-radius: 24px; background: var(--surface-2); }
.search-box .ic { color: var(--fg-2); }
.search-box .inp { padding: 0; }
.fchips { display: flex; gap: 8px; margin: 12px 0 4px; flex-wrap: wrap; }
/* Annuaire : rangées de filtres qui défilent, suggestions de villes sous la recherche */
.fchips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 8px -16px 0; padding: 0 16px 2px; }
.fchips.scroll::-webkit-scrollbar { display: none; }
.fchips.scroll .fchip { flex: none; }
.dir-search { position: relative; }
.dir-sug { left: 0; right: 0; top: calc(100% + 4px); max-width: none; }
.dir-count { margin: 12px 0 2px; }

/* Lignes de réglages */
.srow {
  display: flex; align-items: center; gap: 16px; width: 100%; min-height: 56px; padding: 10px 16px; border: 0; background: transparent;
  color: var(--fg); font: 15px var(--font); text-align: left; cursor: pointer;
}
.srow:hover { background: var(--hover); }
.srow > .ic { color: var(--fg-2); }
.srow.flat { padding-left: 0; padding-right: 0; }
.srow.flat:hover { background: transparent; }
.srow-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.srow-t { overflow-wrap: anywhere; }
.srow-s { font-size: 13px; color: var(--fg-2); }
.about { display: flex; align-items: center; gap: 12px; padding: 24px 16px 48px; font-size: 13px; color: var(--fg-2); }

/* Fiche d'un RDV */
.det-bar { display: flex; justify-content: flex-end; padding: 0 8px; flex: none; }
.det-body { padding: 0 20px 12px; }
.det-head { display: flex; gap: 16px; align-items: flex-start; }
.det-sq { width: 16px; height: 16px; border-radius: 4px; margin-top: 7px; flex: none; }
.det-title { margin: 0; font: 400 22px/1.25 var(--font-display); overflow-wrap: anywhere; }
.det-title.done { text-decoration: line-through; }
.det-when { color: var(--fg-2); margin-top: 4px; }
.det-rec { display: flex; align-items: center; gap: 6px; color: var(--fg-2); font-size: 13px; margin-top: 2px; }
.det-rec .ic { width: 16px; height: 16px; }
.chips-line { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px 32px; }
.chip-static { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 8px; background: var(--surface-3); font-size: 12px; font-weight: 500; }
.chip-static .ic { width: 16px; height: 16px; }
.chip-static.ok { background: var(--ok-bg); color: var(--ok-fg); }
.chip-static.muted { opacity: .75; }
.drow { display: flex; gap: 16px; align-items: flex-start; padding: 10px 0; }
.drow > .ic { color: var(--fg-2); width: 22px; height: 22px; margin-top: 1px; }
.drow.block { display: block; }
.drow.muted { opacity: .85; }
.drow-main { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.drow-main.pre { white-space: pre-wrap; }
.drow-main .sub { font-size: 12px; }
.det-person { display: flex; align-items: center; gap: 10px; padding: 3px 0; flex-wrap: wrap; }
.pick-sub { font-size: 12px; color: var(--fg-2); }
.det-foot { flex: none; padding: 8px 20px 12px; }
.dent-card { background: var(--surface-2); border-radius: 18px; padding: 12px 14px; }
.dent-top { display: flex; gap: 12px; align-items: flex-start; }
.dent-ic { width: 28px; height: 28px; color: var(--primary); }
.dent-main { flex: 1; min-width: 0; }
.dent-name { font-weight: 500; }
.dent-sub, .dent-addr { font-size: 13px; color: var(--fg-2); }
.dent-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.hist { margin-top: 6px; }
.hist summary { display: flex; align-items: center; gap: 8px; padding: 6px 0; color: var(--primary); font-weight: 500; cursor: pointer; list-style: none; }
.hist summary::-webkit-details-marker { display: none; }
.hist summary .ic { width: 20px; height: 20px; }
.hist-h { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--fg-3); margin: 8px 0 2px; }
.hist-row { display: grid; grid-template-columns: 82px minmax(0, 1fr) auto; gap: 8px; padding: 6px 0; font-size: 13px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.hist-date { color: var(--fg-2); font-variant-numeric: tabular-nums; }
.hist-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-who { color: var(--fg-2); }

/* Éditeur */
.ed { padding-bottom: 48px; }
.ed-title-wrap { position: relative; }
.ed-title { width: 100%; border: 0; background: transparent; color: var(--fg); font: 400 24px/1.3 var(--font-display); padding: 10px 16px 12px 56px; outline: none; }
.ed-title::placeholder { color: var(--fg-3); font-size: 20px; }
.suggest { position: absolute; z-index: 6; left: 8px; right: 8px; top: calc(100% - 4px); background: var(--surface-2); border-radius: 18px; box-shadow: var(--shadow-3); overflow: hidden; max-width: 560px; }
.sug { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; border: 0; background: transparent; color: var(--fg); text-align: left; cursor: pointer; }
.sug.on, .sug:hover { background: var(--hover); }
.sug-ic { width: 22px; height: 22px; color: var(--primary); }
.sug-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sug-name { font-weight: 500; }
.sug-name mark { background: transparent; color: var(--primary); font-weight: 700; }
.sug-sub { font-size: 12px; color: var(--fg-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sug-foot { font-size: 11px; color: var(--fg-3); padding: 6px 14px 8px 48px; }
.type-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 16px 8px 56px; }
.type-chips::-webkit-scrollbar { display: none; }
.ed-dent { padding: 4px 16px 0 56px; }
.ed-actions-wrap { padding: 0 16px 0 56px; }
.act-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 0 8px; }
.achip { border: 1px solid var(--outline); background: transparent; color: var(--fg); border-radius: 8px; padding: 6px 10px; font: 13px var(--font); cursor: pointer; }
.achip:hover { background: var(--hover); }
.erow { display: flex; gap: 16px; padding: 8px 16px; align-items: flex-start; border-top: 1px solid var(--line-2); }
.erow > .ic { color: var(--fg-2); margin-top: 8px; }
.erow-main { flex: 1; min-width: 0; }
.sw-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 16px; cursor: pointer; }
.dt-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 16px; align-items: center; }
.dt { position: relative; padding: 9px 0; font-size: 16px; min-width: 0; }
.dt.time { text-align: right; font-variant-numeric: tabular-nums; }
.dt-txt { pointer-events: none; }
.dt input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; border: 0; padding: 0; }
.dur-line { grid-column: 1 / -1; font-size: 12px; color: var(--fg-3); }
.people-chips { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 4px; }
.pchip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 2px 0 4px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--outline); font: 500 13px var(--font); color: var(--fg); }
.pchip small { color: var(--fg-2); font-weight: 400; }
.pchip button { width: 26px; height: 26px; border: 0; border-radius: 50%; background: transparent; color: var(--fg-2); display: grid; place-items: center; cursor: pointer; padding: 0; }
.pchip button .ic { width: 16px; height: 16px; }
.pchip.add { padding: 0 12px; color: var(--primary); cursor: pointer; }
.pchip.add .ic { width: 18px; height: 18px; }
.link-row { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; color: var(--fg); font: 16px var(--font); padding: 8px 0; text-align: left; cursor: pointer; }
.tl-box { display: block; }
.tl-box summary { display: flex; align-items: center; gap: 16px; padding: 8px 0; cursor: pointer; list-style: none; font-size: 16px; }
.tl-box summary::-webkit-details-marker { display: none; }
.tl-box summary .ic { color: var(--fg-2); }
.tl-grid { display: grid; gap: 10px; padding: 4px 0 8px 40px; }
.tl-grid label { display: flex; flex-direction: column; font-size: 12px; color: var(--fg-2); }
.tl-grid .inp, .tl-grid .select { border-bottom: 1px solid var(--outline); color: var(--fg); }

/* Sélecteurs */
.pick-list { max-height: 60vh; overflow-y: auto; }
.pick-group { font: 500 12px var(--font); color: var(--primary); text-transform: uppercase; letter-spacing: .06em; padding: 12px 2px 4px; }
.pick-row { display: flex; align-items: center; gap: 12px; padding: 6px 2px; cursor: pointer; }
.pick-name { font-weight: 500; }
.swatches { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin: 14px 0 8px; }
.swatches.inline { max-width: 420px; }
.swatch { aspect-ratio: 1; border: 0; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; cursor: pointer; font: 700 11px var(--font); text-shadow: 0 0 2px rgba(0, 0, 0, .6); padding: 0; }
.swatch .ic { width: 20px; height: 20px; filter: drop-shadow(0 0 1px rgba(0, 0, 0, .6)); }
.swatch.sel { box-shadow: 0 0 0 3px var(--surface-2), 0 0 0 5px var(--c); }

/* Jour (mois), personne, compte, bienvenue */
.peek { padding: 0 16px 16px; }
.peek h3 { margin: 0 4px 8px; font: 400 20px/1.2 var(--font-display); }
.peek-list { display: flex; flex-direction: column; gap: 6px; }
.peek-ev { display: flex; flex-direction: column; align-items: flex-start; width: 100%; border: 0; border-radius: 10px; padding: 8px 12px; background: var(--c); color: var(--tc); font: inherit; text-align: left; cursor: pointer; }
.peek-t { font-weight: 500; overflow-wrap: anywhere; }
.peek-s { font-size: 12px; opacity: .92; }
.peek-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.sres { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.person-sheet { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 20px 20px; text-align: center; }
.person-sheet h3 { margin: 8px 0 0; font: 400 22px var(--font-display); }
.acct { padding: 0 16px 16px; }
.acct-brand { display: flex; align-items: center; justify-content: center; gap: 8px; font: 500 18px var(--font-display); padding: 2px 0 12px; }
.acct-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px; border-radius: 24px; background: var(--surface-2); text-align: center; }
.acct-name { font: 400 20px var(--font-display); }
.acct-list { margin-top: 8px; border-radius: 24px; overflow: hidden; background: var(--surface-2); }
.acct-foot { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 0 0; font-size: 12px; color: var(--fg-2); }
.acct-foot .ic { width: 16px; height: 16px; }
.welcome { text-align: center; }
.welcome .logo { margin: 0 auto 8px; }
.welcome .pick-group { text-align: left; }
.who-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.who { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 16px; border: 1px solid var(--outline); background: transparent; color: var(--fg); font: 500 13px var(--font); cursor: pointer; min-width: 0; }
.who small { font-size: 11px; font-weight: 400; color: var(--fg-2); }
.who.sel { background: var(--secondary-cont); color: var(--on-secondary-cont); border-color: transparent; }
.help { padding: 0 20px 20px; }
.help h3 { font: 400 20px var(--font-display); margin: 0 0 8px; }
.help-row { display: flex; gap: 14px; padding: 9px 0; }
.help-row .ic { color: var(--primary); }

/* Thème */
.wp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; margin: 10px 0; }
.wp-tile {
  aspect-ratio: 9 / 16; max-width: 100%; border-radius: 14px; border: 0; padding: 6px; position: relative; overflow: hidden; cursor: pointer;
  background: var(--surface-2) center / cover; display: flex; align-items: flex-end; color: #fff; font: 500 11px/1.2 var(--font); text-align: left;
}
.wp-tile span { text-shadow: 0 1px 4px rgba(0, 0, 0, .8); display: flex; align-items: center; gap: 4px; }
.wp-tile.none span, .wp-tile.custom span { color: var(--fg); text-shadow: none; }
.wp-tile.custom { border: 1px dashed var(--outline); justify-content: center; align-items: center; }
.wp-tile.custom[style] span { color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .8); }
.wp-tile.sel { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--primary); }
.wp-tools:not(:empty) { margin: 2px 0 8px; }
.wp-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 480px) { .wp-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; } }
.wp-pick { padding: 12px; border-radius: 14px; background: var(--surface-2); display: flex; flex-direction: column; gap: 12px; }
.wp-sw { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 8px; }
.wp-swatch { aspect-ratio: 1; border-radius: 50%; border: 0; padding: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
.wp-swatch.sel { box-shadow: 0 0 0 2px var(--surface-2), 0 0 0 4px var(--primary); }
.wp-own-row { display: flex; gap: 16px; flex-wrap: wrap; }
.wp-own { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg-2); cursor: pointer; }
.wp-own .ic { width: 18px; height: 18px; }
.wp-own input[type="color"] { width: 44px; height: 32px; padding: 0; border: 1px solid var(--outline); border-radius: 8px; background: transparent; cursor: pointer; }
/* Recadrage du fond personnel */
.crop-stage { display: flex; justify-content: center; padding: 6px 0 10px; }
.crop-frame { position: relative; overflow: hidden; border-radius: 14px; background: #000; box-shadow: 0 0 0 2px var(--primary), 0 6px 24px rgba(0, 0, 0, .35); touch-action: none; cursor: grab; user-select: none; }
.crop-frame:active { cursor: grabbing; }
.crop-media { position: absolute; left: 0; top: 0; max-width: none; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.crop-tools { display: flex; gap: 8px; margin: 4px 0 6px; }
.range-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.range-row input { flex: 1; accent-color: var(--primary); }
.range-row b { font-weight: 500; min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; }

/* Profil, annuaire, retours */
.prof-photo { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 8px 0 4px; }
.dir-list .srow { padding-left: 2px; padding-right: 2px; }
.dir-list .srow > .ic { color: var(--primary); }
.fb-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.fb-item > .ic { color: var(--fg-2); margin-top: 2px; }
.fb-main { flex: 1; min-width: 0; }
.fb-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.fb .seg { margin: 6px 0 10px; }
.fb .area { border: 1px solid var(--outline); border-radius: 12px; padding: 10px 12px; }
.status { flex: none; border: 0; border-radius: 12px; padding: 4px 10px; font: 500 12px var(--font); cursor: pointer; background: var(--surface-3); color: var(--fg); }
.status.s-new { background: var(--warn-bg); color: var(--warn-fg); }
.status.s-done { background: var(--ok-bg); color: var(--ok-fg); }

/* Intégrations */
.int-card { background: var(--surface-2); border-radius: 20px; padding: 16px; margin: 12px 0; }
.int-card ul { margin: 10px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.int-head { display: flex; align-items: center; gap: 12px; }
.int-logo { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex: none; }
.int-logo.ms { background: #0f6cbd; }
.int-logo.gg { background: #1a73e8; }
.int-logo.tl { background: #0f8b83; }
.int-title { font-weight: 500; font-size: 15px; }
.pill { display: inline-block; margin-top: 2px; font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 10px; background: var(--surface-3); }
.pill.warn { background: var(--warn-bg); color: var(--warn-fg); }
.arch { background: var(--surface-2); border-radius: 20px; padding: 16px; margin: 12px 0; }
.arch-h { font-weight: 500; }
.arch-flow { display: flex; align-items: center; gap: 6px; margin: 10px 0; }
.box { flex: 1 1 0; min-width: 0; background: var(--surface-3); border-radius: 12px; padding: 8px 6px; font-size: 13px; font-weight: 500; text-align: center; overflow-wrap: anywhere; }
.box small { display: block; font-size: 11px; font-weight: 400; color: var(--fg-2); }
.box.me { background: var(--secondary-cont); color: var(--on-secondary-cont); }
.box.me small { color: inherit; opacity: .85; }
.box.ghosty { opacity: .55; }
.arrow { color: var(--fg-3); flex: none; }

/* Aperçu des widgets */
.home { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 70px; gap: 12px; padding: 14px; border-radius: 26px; background-size: cover; background-position: center; margin: 8px 0 4px; }
.w { background: var(--w-bg); color: var(--w-fg); border-radius: 22px; padding: 11px 12px; overflow: hidden; font-size: 12px; min-width: 0; }
.w44 { grid-column: span 4; grid-row: span 4; }
.w22 { grid-column: span 2; grid-row: span 2; }
.w42 { grid-column: span 4; grid-row: span 2; }
.w11 { grid-column: span 1; grid-row: span 1; display: grid; place-items: center; border-radius: 50%; padding: 0; }
.w-top { display: flex; align-items: center; justify-content: space-between; font: 500 15px var(--font-display); }
.w-add { width: 30px; height: 30px; border-radius: 10px; background: var(--fab-bg); color: var(--fab-fg); display: grid; place-items: center; }
.w-add .ic { width: 20px; height: 20px; }
.w-sub { font-size: 11px; color: var(--fg-2); margin: 2px 0 4px; }
.w-dd { font-size: 11px; font-weight: 500; color: var(--primary); margin-top: 6px; }
.w-ev { display: flex; flex-direction: column; border-left: 3px solid var(--c); padding: 1px 0 1px 8px; margin: 4px 0; min-width: 0; }
.w-ev b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-ev span { font-size: 11px; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-empty { color: var(--fg-2); padding: 20px 0; text-align: center; }
.w.next { display: flex; flex-direction: column; gap: 2px; }
.w-k { font-size: 11px; color: var(--fg-2); }
.w-big { font: 500 22px/1.1 var(--font-display); color: var(--primary); }
.w-t { font-weight: 500; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.w-l { display: flex; align-items: center; gap: 2px; font-size: 11px; color: var(--fg-2); overflow: hidden; white-space: nowrap; }
.w-l .ic { width: 14px; height: 14px; }
.w-mh { font: 500 13px var(--font-display); margin-bottom: 2px; }
.w-mgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); font-size: 9.5px; text-align: center; row-gap: 1px; }
.w-mgrid span { position: relative; padding: 1px 0 3px; border-radius: 8px; }
.w-mgrid .h { color: var(--fg-3); font-weight: 500; }
.w-mgrid .o { opacity: .35; }
.w-mgrid .t { background: var(--primary); color: var(--on-primary); }
.w-mgrid i { position: absolute; left: 50%; bottom: 0; width: 4px; height: 4px; border-radius: 50%; transform: translateX(-50%); }
.w3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; height: calc(100% - 20px); }
.w3-col { display: flex; flex-direction: column; min-width: 0; }
.w3-h { font-size: 11px; font-weight: 500; text-align: center; }
.w3-h.t { color: var(--primary); }
.w3-body { position: relative; flex: 1; border-radius: 8px; background: var(--line-2); margin-top: 2px; }
.w3-body i { position: absolute; left: 3px; right: 3px; border-radius: 3px; }
.w.team { display: flex; flex-direction: column; gap: 3px; }
.w-team-row { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 11.5px; }
.w-team-row span:last-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.w.quick { background: var(--fab-bg); color: var(--fab-fg); }
.w.quick .ic { width: 30px; height: 30px; }
.w.quick.date { display: flex; flex-direction: column; background: var(--w-bg); color: var(--w-fg); line-height: 1; }
.w.quick.date b { font: 500 24px var(--font-display); }
.w.quick.date small { font-size: 10px; color: var(--primary); }
.home.ios .w { border-radius: 20px; background: color-mix(in srgb, var(--w-bg) 92%, transparent); }
.lock-row { grid-column: span 4; display: flex; align-items: center; justify-content: center; gap: 10px; }
.lw { color: #fff; background: rgba(255, 255, 255, .22); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.lw.rect { border-radius: 14px; padding: 8px 12px; font-size: 12px; max-width: 72%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lw.circ { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; align-content: center; line-height: 1; }
.lw.circ b { font-size: 18px; }
.lw.circ small { font-size: 9px; }
.iw-s { grid-column: span 2; grid-row: span 2; }
.iw-m { grid-column: span 4; grid-row: span 2; }

/* ---------- Grand écran (PC) : menu latéral fixe ---------- */

@media (min-width: 900px) {
  .tb-nav { display: flex; }
  .gv { --gutter: 58px; }
  /* Puces dans la barre du haut (placeChips) : une ligne de moins au-dessus de l'agenda. */
  :root .topbar > .chips.in-bar { flex: 0 1 auto; min-width: 0; align-self: stretch; align-items: center; padding: 0 4px 0 10px; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
  /* En-tête des jours sur une ligne (« mar. 10 ») : environ 2 fois moins haut. */
  .dh:not(.dh-person) { flex-direction: row; justify-content: center; gap: 6px; padding: 3px 0; }
  .dh:not(.dh-person) .dh-wd { font-size: 12px; }
  .dh:not(.dh-person) .dh-num { width: 28px; height: 28px; font-size: 16px; }
  .gv-corner { flex-direction: row; justify-content: center; align-items: center; gap: 0; padding-bottom: 0; }
  .ad-lane { min-height: 2px; padding-bottom: 2px; }
}
@media (min-width: 1100px) {
  .drawer { transform: none; width: var(--drawer-w, 280px); border-radius: 0; box-shadow: none; background: var(--paper); border-right: 1px solid var(--line-2); overflow-x: hidden; }
  #app { margin-left: var(--drawer-w, 280px); }
  .drawer-scrim { display: none; }
  #btnMenu { display: none; }
  .page-ov .panel { left: auto; width: min(620px, 100%); box-shadow: var(--shadow-3); }
}

/* ---------- Colonne des heures : zoom à la souris ---------- */
@media (hover: hover) and (pointer: fine) {
  .gv-gutter { cursor: ns-resize; }
  .gv-gutter:hover { background: color-mix(in srgb, var(--primary) 7%, transparent); }
  .gv-gutter:hover .hl { color: var(--fg-2); }
}
/* Zoom des heures à la souris : un voile transparent porte le curseur (pas de recalcul de tous les styles). */
body.hzooming { user-select: none; }
.zoom-shield { position: fixed; inset: 0; z-index: 9999; cursor: ns-resize; }
/* PC : la colonne des heures se tire pour zoomer (curseur ↕, surbrillance pendant le geste). */
@media (pointer: fine) { .gv-gutter { cursor: ns-resize; } }
.gv-gutter.active { background: color-mix(in srgb, var(--primary) 12%, transparent); }

/* ---------- Roue chromatique ---------- */
.cw { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin: 12px 0 4px; }
.cw-wheel {
  position: relative; width: 190px; height: 190px; border-radius: 50%; flex: none; touch-action: none; cursor: crosshair;
  background: radial-gradient(closest-side, #fff, rgba(255,255,255,0)), conic-gradient(#f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
  box-shadow: 0 0 0 1px var(--line-2);
}
.cw-dark { position: absolute; inset: 0; border-radius: 50%; background: #000; pointer-events: none; }
.cw-knob { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.45), 0 2px 6px rgba(0,0,0,.4); pointer-events: none; }
.cw-side { display: flex; flex-direction: column; gap: 12px; flex: 1; min-width: 150px; }
.cw-prev { width: 100%; height: 40px; border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.cw-lbl { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--fg-2); }
.cw-v { -webkit-appearance: none; appearance: none; width: 100%; height: 14px; border-radius: 7px; background: linear-gradient(to right, #000, var(--hue, #fff)); outline: none; margin: 4px 0; }
.cw-v::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 1px rgba(0,0,0,.4), 0 2px 4px rgba(0,0,0,.35); cursor: pointer; }
.cw-v::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 1px rgba(0,0,0,.4); cursor: pointer; }
.cw-hex { font-family: ui-monospace, monospace; text-transform: uppercase; }
.cw-details { margin-top: 6px; }
.cw-details summary { cursor: pointer; color: var(--primary); font-weight: 500; display: inline-flex; align-items: center; gap: 6px; padding: 6px 0; list-style: none; }
.cw-details summary::-webkit-details-marker { display: none; }
.cw-details summary .ic { width: 18px; height: 18px; }
.cw-toggle { margin-top: 4px; }

/* ---------- Bascule Agenda ⇄ Commercial (en bas à gauche) ---------- */

.space-switch {
  position: fixed; z-index: 20; left: calc(16px + env(safe-area-inset-left, 0px)); bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  display: flex; gap: 2px; padding: 4px; border-radius: 26px; background: var(--surface-2); box-shadow: var(--shadow-3); transition: transform .25s;
}
.space-switch button {
  height: 40px; min-width: 44px; padding: 0 12px; border: 0; border-radius: 20px; background: transparent; color: var(--fg-2);
  display: inline-flex; align-items: center; gap: 6px; font: 500 13px var(--font); cursor: pointer;
}
.space-switch button span { display: none; }
.space-switch button.sel { background: var(--secondary-cont); color: var(--on-secondary-cont); }
.space-switch button.sel span { display: inline; }
.space-switch .ic { width: 20px; height: 20px; }
body.snack-on .space-switch { transform: translateY(-64px); }
body.speed-open .space-switch { visibility: hidden; }
/* Menu ouvert (téléphone) ou menu fixe (PC) : il contient déjà Agenda / Commercial → pas de doublon. */
body.drawer-open .space-switch { display: none; }
@media (min-width: 1100px) { .space-switch { display: none; } }
body[data-space="crm"] .fab, body[data-space="crm"] .today-btn, body[data-space="crm"] #btnTitle .ic, body[data-space="crm"] .tb-nav { display: none; }
body[data-space="crm"] #btnTitle { cursor: default; }
.dr-space { display: flex; gap: 4px; margin: 4px 16px 8px; padding: 3px; border-radius: 22px; background: var(--surface-2); }
.dr-space button { flex: 1; height: 36px; border: 0; border-radius: 18px; background: transparent; color: var(--fg-2); font: 500 13px var(--font); display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; }
.dr-space button.sel { background: var(--secondary-cont); color: var(--on-secondary-cont); }
.dr-space .ic { width: 18px; height: 18px; }
.dr-head .brand { margin-left: 2px; }
.acct-brand .brand-main { font-size: 19px; }
.fchip small.cnt { font-size: 11px; font-weight: 400; opacity: .75; margin-left: 2px; }

/* ---------- Espace Commercial ---------- */

.crm { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 12px 104px; }
.crm-tools { position: sticky; top: 0; z-index: 2; background: var(--paper); padding: 4px 0 6px; }
:root[data-wp] .crm-tools { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.crm-tools .fchips { margin: 8px 0 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.crm-note { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 8px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); font-size: 13px; color: var(--fg-2); }
.crm-note .ic { width: 20px; height: 20px; color: var(--primary); }
.crm-list { display: flex; flex-direction: column; max-width: 860px; margin: 0 auto; }
.crm-list .btn.wide { margin: 12px 0; }
.crm-row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 8px 6px; border: 0; border-bottom: 1px solid var(--line-2);
  background: transparent; color: var(--fg); text-align: left; cursor: pointer; font: inherit;
}
.crm-row:hover { background: var(--hover); }
.crm-row.inactive { opacity: .62; }
.crm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.crm-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-sub { font-size: 13px; color: var(--fg-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 2px; }
.crm-go { color: var(--fg-3); width: 20px; height: 20px; }
.avatar.sq { border-radius: 12px; }
.crm-empty { max-width: 460px; margin: 48px auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 16px; }
.crm-empty h3 { margin: 4px 0 0; font: 400 22px var(--font-display); }
.crm-empty p { margin: 0; color: var(--fg-2); }
.crm-empty-ic { width: 48px; height: 48px; color: var(--primary); }
.comp-head { display: flex; gap: 14px; align-items: flex-start; margin: 4px 0 12px; }
.comp-head h3 { margin: 0; font: 400 22px/1.25 var(--font-display); overflow-wrap: anywhere; }
.chips-line.flat { margin: 8px 0 0; }
.comp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.comp .drow { padding: 8px 0; }
.cfs { display: grid; gap: 8px; }
.cf { display: flex; flex-direction: column; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); }
/* Listes Teamleader : bons d'intervention, opportunités, produits (crm-tl.js) */
.wo-date { flex: none; width: 44px; display: flex; flex-direction: column; align-items: center; line-height: 1.15; color: var(--fg-2); }
.wo-date b { font: 500 20px/1.1 var(--font-display); color: var(--fg); }
.wo-date small { font-size: 11px; white-space: nowrap; }
.wo-side, .deal-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.deal-side b { font-weight: 500; white-space: nowrap; }
.deal-side small { font-size: 12px; color: var(--fg-3); white-space: nowrap; }
.wo-avs { display: flex; }
.wo-avs .avatar + .avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--paper); }
.deal-no { flex: none; min-width: 40px; font-size: 12px; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.tag.ok { background: var(--ok-bg); color: var(--ok-fg); }
.tag.info, .chip-static.info { background: color-mix(in srgb, var(--primary) 24%, transparent); color: var(--fg); }
.tag.muted { opacity: .75; }
.wo-title { margin: 4px 0 0; font: 400 22px/1.25 var(--font-display); overflow-wrap: anywhere; }
.comp-tl .wo-mini { align-items: center; gap: 12px; }
.comp-tl .wo-date { width: 38px; }
.comp-tl .wo-date b { font-size: 17px; }
.prod-prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; text-align: left; }
.prod-prices > div { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); min-width: 0; }
.prod-prices small { font-size: 12px; color: var(--fg-2); }
.prod-prices b { font-weight: 500; font-size: 16px; overflow-wrap: anywhere; }
.pre { white-space: pre-wrap; }

@media (min-width: 1100px) {
  .space-switch { left: calc(var(--drawer-w, 280px) + 16px + env(safe-area-inset-left, 0px)); }
}

/* ---------- Menu latéral PC : poignée de largeur et mode compact (icônes seules) ---------- */
.dr-resize { display: none; }
@media (min-width: 1100px) {
  .dr-resize {
    display: block; position: fixed; z-index: 31; top: 0; bottom: 0; left: calc(var(--drawer-w, 280px) - 4px); width: 8px;
    cursor: col-resize; touch-action: none;
  }
  .dr-resize::after { content: ""; position: absolute; top: 0; bottom: 0; left: 3px; width: 2px; background: transparent; transition: background .15s; }
  .dr-resize:hover::after, body.drawer-resizing .dr-resize::after { background: var(--primary); }
  body.drawer-resizing, body.drawer-resizing * { cursor: col-resize !important; user-select: none; }
  body.drawer-resizing .drawer, body.drawer-resizing #app { transition: none; }

  body.drawer-compact .drawer { scrollbar-width: none; }
  body.drawer-compact .dr-head { justify-content: center; padding: 16px 0 10px; }
  body.drawer-compact .dr-head .brand,
  body.drawer-compact .dr-h,
  body.drawer-compact .dr-sec .hint,
  body.drawer-compact .dr-sec .seg,
  body.drawer-compact .dr-foot,
  body.drawer-compact .dr-admin span,
  body.drawer-compact .dr-admin .btn,
  body.drawer-compact .dr-item span,
  body.drawer-compact .dr-item small,
  body.drawer-compact .dr-pname,
  body.drawer-compact .dr-person .tag,
  body.drawer-compact .dr-person .icon-btn { display: none; }
  body.drawer-compact .dr-sec { padding: 4px 0; }
  body.drawer-compact .dr-item { width: 48px; height: 44px; margin: 2px auto; padding: 0; justify-content: center; border-radius: 22px; }
  body.drawer-compact .dr-space { flex-direction: column; margin: 4px 10px 8px; }
  body.drawer-compact .dr-space button { font-size: 0; gap: 0; height: 40px; }
  body.drawer-compact .dr-space .ic { font-size: initial; }
  body.drawer-compact .dr-person { padding: 0; justify-content: center; }
  body.drawer-compact .dr-person label { flex: none; justify-content: center; min-height: 36px; width: 48px; }
  body.drawer-compact .dr-admin { justify-content: center; }
}

/* ---------- Thème clair + fond d'écran ---------- */
/* Voile blanc plus couvrant (calculé dans applyTheme), traits et barres un peu plus marqués,
   barre du haut et puces sur un verre dépoli pour rester nettes au-dessus des fonds sombres. */
:root[data-wp-light] {
  --line: color-mix(in srgb, var(--fg) 15%, transparent);
  --line-2: color-mix(in srgb, var(--fg) 7%, transparent);
  --surface-page: color-mix(in srgb, #ffffff 90%, transparent);
}
:root[data-wp-light] .topbar, :root[data-wp-light] .chips {
  background: color-mix(in srgb, #ffffff 55%, transparent);
  backdrop-filter: blur(10px) saturate(1.2); -webkit-backdrop-filter: blur(10px) saturate(1.2);
}
:root[data-wp-light] .gv-head, :root[data-wp-light] .mv-wd { background: color-mix(in srgb, #ffffff 40%, transparent); }
:root[data-wp-light] .fchip:not(.sel) { background: color-mix(in srgb, #ffffff 70%, transparent); }
:root[data-wp-light] .ev { box-shadow: 0 0 0 1px rgba(255, 255, 255, .55); }
:root[data-wp-light] .hl, :root[data-wp-light] .dh-wd, :root[data-wp-light] .gv-corner { color: var(--fg-2); }

/* ---------- Aperçu pendant le réglage d'un curseur (Lisibilité / Flou) ---------- */
.page-ov .panel { transition: transform .28s cubic-bezier(.2, .8, .2, 1), background-color .15s; }
.page-ov.peeking .panel { background: transparent !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; box-shadow: none !important; }
.page-ov.peeking .pbar, .page-ov.peeking .pbody > .pad > :not(.peekable.active) { visibility: hidden; }
.page-ov.peeking .peekable.active {
  position: relative; z-index: 1; background: var(--surface-2); border-radius: 14px;
  box-shadow: 0 0 0 10px var(--surface-2), 0 6px 18px 8px rgba(0, 0, 0, .28);
}
.range-row > span:first-child { min-width: 76px; }

/* ---------- Performances ---------- */
/* Chaque page (jour précédent / courant / suivant) se met en page indépendamment ;
   les pages hors écran ne sont dessinées qu'au moment où elles apparaissent (balayage, pincement). */
.page { contain: layout style; }
.bp { content-visibility: auto; }
.col { contain: layout style; }
.ev { contain: layout style; }
.mp { contain: layout style; }
/* Planning : seuls les jours visibles sont mis en page. */
.sv-day.cv { content-visibility: auto; contain-intrinsic-size: auto 600px; }
/* Fond d'écran sur son propre calque : le flou est calculé une fois, pas à chaque défilement. */
#wp { will-change: transform; contain: strict; backface-visibility: hidden; }
.track { backface-visibility: hidden; }

/* ---------- Mode administrateur ---------- */
.lp-hold { position: relative; overflow: hidden; }
.lp-hold::after {
  content: ""; position: absolute; inset: 0; background: var(--primary); opacity: .22; pointer-events: none;
  transform-origin: left center; transform: scaleX(0); animation: lpfill 1.75s linear forwards; animation-delay: .25s;
}
@keyframes lpfill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.dr-admin { display: flex; align-items: center; gap: 8px; margin: 4px 12px 0; padding: 4px 6px 4px 14px; border-radius: 14px; background: var(--secondary-cont); color: var(--on-secondary-cont); font-size: 13px; font-weight: 500; }
.dr-admin .ic { width: 18px; height: 18px; }
.dr-admin span { flex: 1; }
.dlg-ov.adm h3 { display: flex; align-items: center; gap: 8px; }
.dlg-ov.adm h3 .ic { width: 22px; height: 22px; color: var(--primary); }
.dlg-ov.adm .inp { width: 100%; margin-top: 12px; }
.adm-err { color: var(--danger); font-size: 13px; margin: 8px 0 0; }
.dlg.shake { animation: shake .36s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.hint-ic { width: 15px; height: 15px; vertical-align: -3px; }
.seg button:disabled, .inp:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- Widgets Android (aperçu) : finitions ---------- */
.w.plan { display: flex; flex-direction: column; }
.w-list { flex: 1; min-height: 0; overflow: hidden; }
.w-day + .w-day { margin-top: 2px; }
.w-dd { font-size: 11px; font-weight: 600; letter-spacing: .01em; }
.w-ev { border-left: 0; padding: 4px 8px 4px 10px; margin: 3px 0; border-radius: 10px; position: relative; background: color-mix(in srgb, var(--c) 11%, transparent); }
.w-ev::before { content: ""; position: absolute; left: 0; top: 5px; bottom: 5px; width: 3.5px; border-radius: 2px; background: var(--c); }
.w-ev b { font-weight: 600; display: block; }
.w-ev b em { font-style: normal; font-weight: 400; }
.w-ev .ev-ic { width: 12px; height: 12px; margin-right: 4px; vertical-align: -2px; color: var(--c); }
.w-ev span i { font-style: normal; font-weight: 600; color: var(--c); filter: saturate(1.2); }
.w-ev.live { background: color-mix(in srgb, var(--c) 22%, transparent); }
.w-ev.done b { text-decoration: line-through; opacity: .7; }
.w.next { position: relative; padding-top: 14px; }
.w.next::before { content: ""; position: absolute; left: 12px; top: 8px; width: 26px; height: 4px; border-radius: 2px; background: var(--c); }
.w.next .w-k { font-weight: 600; color: var(--fg-2); }
.w.next .w-big { color: var(--c); filter: saturate(1.1); }
:root[data-mp-theme="dark"] .w.next .w-big, :root:not([data-mp-theme]) .w.next .w-big { filter: brightness(1.25) saturate(1.1); }
.w.next .w-t { -webkit-line-clamp: 3; font-weight: 400; line-height: 1.25; }
.w.next .w-t b { font-weight: 600; }
.w-mgrid span { padding: 1px 0 4px; }
.w3 { grid-template-columns: 18px repeat(3, minmax(0, 1fr)); gap: 5px; height: calc(100% - 18px); }
.w3-hours { display: flex; flex-direction: column; justify-content: space-between; padding: 16px 0 0; font-size: 8.5px; color: var(--fg-3); text-align: right; }
.w3-body { overflow: hidden; background: color-mix(in srgb, var(--fg) 6%, transparent);
  background-image: linear-gradient(to bottom, transparent calc(50% - .5px), color-mix(in srgb, var(--fg) 10%, transparent) calc(50% - .5px), color-mix(in srgb, var(--fg) 10%, transparent) calc(50% + .5px), transparent calc(50% + .5px)); }
.w3-body i { left: 2px; right: 2px; border-radius: 4px; font: 600 8.5px/1.15 var(--font); font-style: normal; padding: 1px 3px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; box-shadow: 0 0 0 1px var(--w-bg); }
.w3-body em { position: absolute; inset: 0; display: grid; place-items: center; font-size: 10px; font-style: normal; color: var(--fg-3); }
.w3-body s { position: absolute; left: 0; right: 0; height: 2px; background: var(--now); z-index: 2; text-decoration: none; }
.w3-body s::before { content: ""; position: absolute; left: -3px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--now); }
.w.team { gap: 4px; }
.w-team-row { display: grid; grid-template-columns: 20px auto auto 1fr; align-items: center; gap: 6px; font-size: 11px; min-width: 0; }
.w-team-row > b { font-weight: 600; }
.w-team-row .st { padding: 1px 7px; border-radius: 8px; font-size: 10.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.w-team-row .st.busy { background: color-mix(in srgb, var(--c) 20%, transparent); }
.w-team-row .st.free { background: color-mix(in srgb, #1e8e3e 18%, transparent); color: color-mix(in srgb, #1e8e3e 75%, var(--fg)); }
.w-team-row .st.off { background: color-mix(in srgb, var(--fg) 10%, transparent); color: var(--fg-2); }
.w-team-row small { color: var(--fg-2); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.w-team-row .avatar { font-size: 9px; }

/* ---------- Widgets Android, aperçu fidèle (mêmes mesures que Widgets.kt : 1 dp = 1 px) ---------- */
.mw-wall { border-radius: 26px; background-size: cover; background-position: center; padding: 14px; margin: 8px 0 4px; }
.mw-home {
  --mw-bg: #1F2023; --mw-card: #2A2C2F; --mw-text: #E6E7E9; --mw-muted: #A3A7AC; --mw-faint: #5D6166; --mw-line: #34363A;
  --mw-teal: #5CC3D6; --mw-green: #81C995; --mw-now: #F28B82;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 76px; gap: 12px;
}
:root[data-mp-theme="light"] .mw-home:not(.dark), .mw-home.light { --mw-bg: #FFFFFF; --mw-card: #F1F4F5; --mw-text: #1B1C1E; --mw-muted: #5F6368; --mw-faint: #BDC2C7; --mw-line: #E7EAEC; --mw-teal: #00738A; --mw-green: #1E8E3E; --mw-now: #D93025; }
@media (prefers-color-scheme: light) { :root:not([data-mp-theme]) .mw-home:not(.dark) { --mw-bg: #FFFFFF; --mw-card: #F1F4F5; --mw-text: #1B1C1E; --mw-muted: #5F6368; --mw-faint: #BDC2C7; --mw-line: #E7EAEC; --mw-teal: #00738A; --mw-green: #1E8E3E; --mw-now: #D93025; } }
.mw-cell { min-width: 0; min-height: 0; display: flex; }
.mw-cell.w44 { grid-column: span 4; grid-row: span 4; }
.mw-cell.w22 { grid-column: span 2; grid-row: span 2; }
.mw-cell.w42 { grid-column: span 4; grid-row: span 2; }
.mw-cell.w11 { grid-column: span 1; grid-row: span 1; }
.mw-cell.w21 { grid-column: span 2; grid-row: span 1; }
.mw { flex: 1; min-width: 0; background: var(--mw-bg); color: var(--mw-text); border-radius: 16px; padding: 11px 12px; overflow: hidden; display: flex; flex-direction: column; font: 400 12px/1.25 Roboto, "Google Sans", system-ui, "Segoe UI", sans-serif; box-shadow: 0 1px 3px rgba(0, 0, 0, .18); }
.mw b { font-weight: 500; }
.mw-logo { width: 22px; height: 22px; flex: none; display: block; }
.mw-head { display: flex; align-items: center; gap: 9px; min-width: 0; }
.mw-ht { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mw-ht b { font-size: 15px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mw-ht span, .mw-muted { font-size: 11px; color: var(--mw-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mw-add { width: 32px; height: 32px; border-radius: 9px; background: #F07E26; color: #fff; display: grid; place-items: center; flex: none; }
.mw-add svg { width: 20px; height: 20px; }
/* Planning */
.mw-days { flex: 1; min-height: 0; overflow: hidden; margin-top: 10px; }
.mw-day { display: flex; gap: 8px; margin-bottom: 10px; }
.mw-date { width: 40px; flex: none; display: flex; flex-direction: column; align-items: center; }
.mw-wd { font-size: 10px; font-weight: 500; color: var(--mw-muted); line-height: 1.3; }
.mw-wd.t { color: var(--mw-teal); }
.mw-num { width: 28px; height: 28px; border-radius: 8.4px; display: grid; place-items: center; font-size: 15px; font-weight: 500; }
.mw-num.t { background: #00738A; color: #fff; font-weight: 700; }
.mw-chips { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.mw-chip { border-radius: 6px; padding: 5px 8px; background: var(--c); color: var(--on); min-width: 0; }
.mw-chip b { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mw-chip span { display: block; font-size: 11px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mw-chip.done b { text-decoration: line-through; }
.mw-none { height: 40px; display: flex; align-items: center; color: var(--mw-muted); }
/* Prochain RDV */
.mw-next { padding: 12px; }
.mw-k { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 500; color: var(--mw-muted); margin-bottom: 8px; }
.mw-k .mw-logo { width: 16px; height: 16px; }
.mw-big { font-size: 24px; line-height: 1.15; color: var(--mw-teal); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mw-what { display: flex; gap: 8px; margin-top: 8px; min-width: 0; }
.mw-what i { width: 4px; height: 36px; border-radius: 2px; flex: none; }
.mw-what > div { min-width: 0; display: flex; flex-direction: column; }
.mw-what b { font-size: 13px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mw-go { margin-top: auto; display: flex; align-items: center; gap: 5px; padding: 6px 9px; border-radius: 8px; background: var(--mw-card); min-width: 0; }
.mw-go svg { width: 14px; height: 14px; color: var(--mw-teal); flex: none; }
.mw-go b { flex: 1; min-width: 0; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mw-go span { font-size: 11px; font-weight: 500; color: var(--mw-teal); }
/* Mois */
.mw-month { padding: 10px; }
.mw-mgrid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: 1fr; margin-top: 6px; text-align: center; }
.mw-mgrid .h { font-size: 10px; font-weight: 500; color: var(--mw-muted); align-self: center; }
.mw-mc { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 0; }
.mw-mc .mw-num { width: 22px; height: 22px; border-radius: 6.6px; font-size: 11px; }
.mw-mc.o .mw-num { color: var(--mw-faint); }
.mw-mc i { display: flex; gap: 2px; height: 6px; align-items: center; }
.mw-mc u { width: 4px; height: 4px; border-radius: 2px; display: block; }
/* Trois jours */
.mw-three { padding: 10px; }
.mw3 { flex: 1; min-height: 0; display: grid; grid-template-columns: 22px repeat(3, minmax(0, 1fr)); grid-template-rows: 20px 1fr; column-gap: 4px; margin-top: 6px; }
.mw3-hours { grid-row: 2; grid-column: 1; display: flex; flex-direction: column; justify-content: space-between; font-size: 8.5px; color: var(--mw-faint); }
.mw3-col { display: contents; }
.mw3-h { grid-row: 1; display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 11px; font-weight: 500; color: var(--mw-muted); white-space: nowrap; }
.mw3-h.t { color: var(--mw-teal); font-weight: 700; }
.mw3-h u { width: 6px; height: 6px; border-radius: 3px; display: block; }
.mw3-body { grid-row: 2; position: relative; border-radius: 6px; background: var(--mw-card); overflow: hidden; }
.mw3-body i { position: absolute; border-radius: 4px; padding: 1px 3px; font-size: 9.5px; font-weight: 500; line-height: 1.2; font-style: normal; overflow: hidden; word-break: break-word; box-sizing: border-box; }
.mw3-body em { position: absolute; inset: 0; display: grid; place-items: center; font-size: 10px; font-style: normal; color: var(--mw-faint); }
.mw3-body s { position: absolute; left: 0; right: 0; height: 2px; background: var(--mw-now); text-decoration: none; }
/* Équipe maintenant */
.mw-team { padding: 10px 12px; }
.mw-rows { margin-top: 6px; display: flex; flex-direction: column; }
.mw-row { display: flex; align-items: center; padding: 4px 0; min-width: 0; }
.mw-row + .mw-row { border-top: 1px solid var(--mw-line); }
.mw-av { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; margin-right: 8px; }
.mw-row b { width: 74px; flex: none; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mw-row u { width: 8px; height: 8px; border-radius: 4px; display: block; flex: none; margin-right: 6px; }
.mw-row > span:last-child { flex: 1; min-width: 0; font-size: 12px; color: var(--mw-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mw-row > span.busy { color: var(--mw-text); }
/* Ajout rapide */
.mw-quick { background: #00738A; color: #fff; padding: 0; align-items: center; justify-content: center; flex-direction: row; gap: 9px; }
.mw-quick .mw-add { width: 36px; height: 36px; border-radius: 10px; }
.mw-quick .mw-add svg { width: 24px; height: 24px; }
.mw-quick.wide .mw-add { width: 30px; height: 30px; border-radius: 8px; }
.mw-quick.wide .mw-add svg { width: 20px; height: 20px; }
.mw-quick > div { display: flex; flex-direction: column; min-width: 0; }
.mw-quick > div b { font-size: 13px; }
.mw-quick > div span { font-size: 10.5px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mw-home { grid-auto-flow: row dense; }
.mw-cell.w43 { grid-column: span 4; grid-row: span 3; }
.mw-cell.w33 { grid-column: span 3; grid-row: span 3; }
.mw-add.sm { width: 28px; height: 28px; border-radius: 8px; }
.mw-add.sm svg { width: 18px; height: 18px; }
.mw-month.compact .mw-mc .mw-num { width: 18px; height: 18px; border-radius: 5.4px; font-size: 10.5px; }
.mw3.list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mw3-list { grid-row: 2; position: relative; border-radius: 6px; background: var(--mw-card); padding: 3px; display: flex; flex-direction: column; gap: 3px; overflow: hidden; min-width: 0; }
.mw3-chip { display: flex; flex-direction: column; border-radius: 4px; padding: 2px 5px; min-width: 0; }
.mw3-chip b { font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mw3-chip small { font-size: 9.5px; opacity: .85; }
.mw3-more { font-size: 10px; font-weight: 500; color: var(--mw-muted); }
.mw3-list em { position: absolute; inset: 0; display: grid; place-items: center; font-size: 10px; font-style: normal; color: var(--mw-faint); }

/* Y aller : choix Waze / Google Maps */
.addr-link { text-align: left; padding: 0; font: inherit; color: var(--primary); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--primary) 40%, transparent); text-underline-offset: 2px; }
.nav-sheet { padding: 4px 20px 16px; }
.nav-sheet h3 { margin: 4px 0 2px; font: 500 20px var(--font-display); }
.nav-sheet .sub { margin: 0 0 14px; }
.nav-apps { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 6px; }
.nav-app { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px 14px; border: 0; border-radius: 14px; background: var(--surface-2); color: var(--fg); cursor: pointer; font: 500 14px var(--font); }
.nav-app:hover { background: var(--hover); }
.nav-ic { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; color: #fff; }
.nav-ic .ic { width: 28px; height: 28px; }
.nav-ic.waze { background: #33CCFF; color: #0b2a36; }
.nav-ic.gmaps { background: #1A73E8; }

/* ---------- Performances (suite) ---------- */
/* Mois : les pages voisines (mois précédent / suivant) ne sont dessinées qu'au balayage ; chaque case est isolée. */
.mp { content-visibility: auto; }
.mc { contain: layout paint style; }
/* Listes longues (annuaire, entreprises, contacts, recherche) : lignes hors écran non mises en page. */
.crm-row { content-visibility: auto; contain-intrinsic-size: auto 64px; }

/* Largeur qui change (poignée du menu, fenêtre redimensionnée) : les pistes de 3 pages perdent leur calque
   le temps du geste — sinon le navigateur repeint les 3 pages entières à chaque image (gel sur PC). */
body.drawer-resizing .track, body.win-resizing .track { will-change: auto; backface-visibility: visible; }
/* Fenêtre en train de se fermer (animation 0,24 s) : elle ne capte plus les appuis, on peut déjà toucher
   l'agenda dessous. */
.ov.closing { pointer-events: none; }

/* ---------- Bas d'écran : rien de caché sous le bouton + et la bascule Agenda / Commercial ---------- */
/* Grille : on peut faire défiler jusqu'à minuit au-dessus des boutons flottants. */
.gv-body { margin-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
/* Mois (téléphone) : la dernière semaine reste visible au-dessus de la bascule. */
@media (max-width: 1099px) {
  .mv { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}

/* Pendant un zoom des heures : seules les colonnes visibles sont recalculées (jours voisins en pause). */
.gv.zooming .bp:not(:nth-child(2)) { content-visibility: hidden; }

/* Historique d'un client : passages de l'agenda et bons d'intervention Teamleader dans la même liste */
.cl-hist { text-align: left; }
.hist-row.wo .hist-txt .ic { width: 14px; height: 14px; vertical-align: -2px; margin-right: 5px; color: var(--fg-3); }
.cl-hist > .btn.text { margin: 4px 0 0 -12px; }
.cl-hist > .hint { margin: 6px 0 0; }
.hist-row { grid-template-columns: 96px minmax(0, 1fr) auto; }
.hist-date { white-space: nowrap; }

/* ---------- Trois espaces (Agenda · Commercial · Carte) : dans le menu, seul l'espace ouvert affiche son nom ---------- */
.dr-space button { flex: 0 0 44px; min-width: 0; padding: 0; }
.dr-space button.sel { flex: 1 1 auto; }
.dr-space button:not(.sel) span { display: none; }
@media (min-width: 1100px) { body.drawer-compact .dr-space button { flex: none; width: 100%; } }
body[data-space="map"] .fab, body[data-space="map"] #btnSearch { display: none; }
body[data-space="map"] .tb-nav { display: flex; }

/* ---------- Espace Carte (js/map.js) ---------- */
.mapv {
  position: absolute; inset: 0; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab;
  --map-out: color-mix(in srgb, var(--fg) 7%, var(--bg));
  --map-67: color-mix(in srgb, var(--primary) 9%, var(--bg)); --map-68: color-mix(in srgb, var(--primary) 16%, var(--bg));
  --map-border: color-mix(in srgb, var(--fg) 38%, var(--bg)); --map-water: #4f9be8;
  background: var(--map-out);
}
.mapv.panning { cursor: grabbing; }
#mapSvg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#mapWorld path { vector-effect: non-scaling-stroke; stroke-linejoin: round; }
/* Autour de l'Alsace : une seule teinte, les limites des départements et pays voisins en traits fins. */
.map-near { fill: none; stroke: color-mix(in srgb, var(--fg) 22%, var(--bg)); stroke-width: 1; }
.map-dept { stroke: var(--map-border); stroke-width: 1.4; }
.map-dept.d67 { fill: var(--map-67); }
.map-dept.d68 { fill: var(--map-68); }
.map-rhine { fill: none; stroke: var(--map-water); stroke-width: 3.5; stroke-linecap: round; opacity: .8; }
.map-deptname { font: 500 13px var(--font-display); letter-spacing: .2em; text-transform: uppercase; fill: var(--fg-3); opacity: .75; text-anchor: middle; pointer-events: none; }
.map-town { pointer-events: none; }
.map-town text { font: 500 11.5px var(--font); fill: var(--fg-2); paint-order: stroke; stroke: var(--bg); stroke-width: 3px; stroke-linejoin: round; }
.map-town circle { fill: var(--fg-3); }
.map-town.big text { font-weight: 700; fill: var(--fg); }
.map-town.ab text { font-style: italic; font-weight: 400; fill: var(--fg-3); }
/* Clients */
.map-cl { cursor: pointer; }
.map-cl .hit { fill: transparent; }
/* Discrets (gris, fins) : les épingles des rendez-vous restent ce qu'on voit d'abord. */
.map-cl .c { fill: color-mix(in srgb, var(--bg) 82%, transparent); stroke: color-mix(in srgb, var(--fg) 45%, var(--bg)); stroke-width: 1; }
.map-cl.one .c { fill: color-mix(in srgb, var(--fg) 50%, var(--bg)); stroke: var(--bg); stroke-width: 1; }
.map-cl text { font: 500 10.5px var(--font); fill: var(--fg-2); text-anchor: middle; pointer-events: none; }
.map-cl:hover .c { stroke: var(--primary); stroke-width: 2; }
/* Trajets : le tronçon vers le prochain RDV est le plus lumineux (épais, animé, halo) ; le passé s'efface. */
.map-leg { fill: none; stroke: var(--c); stroke-linecap: round; pointer-events: none; }
.map-leg.plain { stroke-width: 2.6; opacity: .7; }
.map-leg.later { stroke-width: 2.4; opacity: .42; }
.map-leg.done { stroke-width: 2; opacity: .2; }
.map-leg.next { stroke-width: 4.5; stroke-dasharray: 11 7; animation: mapFlow .9s linear infinite; }
.map-leg.glow { stroke-width: 11; opacity: .22; }
@keyframes mapFlow { to { stroke-dashoffset: -18; } }
.map-arrow { fill: var(--c); pointer-events: none; }
.map-arrow.plain { opacity: .8; }
.map-arrow.later { opacity: .5; }
.map-arrow.done { opacity: .22; }
.map-lead { stroke: var(--fg-3); stroke-width: 1; opacity: .7; pointer-events: none; }
.map-anchor { fill: var(--fg-2); pointer-events: none; }
/* Épingles */
.map-pin { cursor: pointer; }
.map-pin .body { fill: var(--c); stroke: var(--bg); stroke-width: 2; }
.map-pin text { font: 700 11px var(--font); fill: var(--tc); text-anchor: middle; pointer-events: none; }
.map-pin.done { opacity: .45; }
.map-pin.later { opacity: .88; }
.map-pin.next .halo { fill: none; stroke: var(--c); stroke-width: 2.5; transform-box: fill-box; transform-origin: center; animation: mapPulse 1.7s ease-out infinite; }
@keyframes mapPulse { from { transform: scale(.9); opacity: .9; } to { transform: scale(1.9); opacity: 0; } }
.mapv .dim { opacity: .1 !important; }
/* Boutons posés sur la carte */
.map-ctl { position: absolute; right: 12px; top: 12px; z-index: 2; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.map-btn {
  height: 40px; min-width: 40px; padding: 0 14px 0 10px; border: 0; border-radius: 20px; background: var(--surface-2); color: var(--fg); box-shadow: var(--shadow-3);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 500 13px var(--font); cursor: pointer;
}
.map-btn.round { padding: 0; }
.map-btn.on { background: var(--secondary-cont); color: var(--on-secondary-cont); }
.map-btn .ic, .map-zoom .ic { width: 20px; height: 20px; }
.map-zoom { display: flex; flex-direction: column; border-radius: 20px; background: var(--surface-2); box-shadow: var(--shadow-3); overflow: hidden; }
.map-zoom button { width: 40px; height: 40px; border: 0; background: transparent; color: var(--fg); cursor: pointer; display: grid; place-items: center; }
.map-zoom button + button { border-top: 1px solid var(--line); }
.map-btn:hover, .map-zoom button:hover { filter: brightness(1.08); }
/* Légende : une pastille par personne (au-dessus de la bascule Agenda / Commercial / Carte sur téléphone) */
.map-legend {
  position: absolute; left: 0; right: 0; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); z-index: 2; display: flex; gap: 8px; padding: 4px 12px;
  overflow-x: auto; scrollbar-width: none; touch-action: pan-x;
}
.map-legend::-webkit-scrollbar { display: none; }
@media (min-width: 1100px) { .map-legend { bottom: 14px; right: 70px; flex-wrap: wrap-reverse; overflow: visible; } }
.map-who {
  flex: none; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px 0 10px; border: 0; border-radius: 22px; background: var(--surface-2); color: var(--fg);
  box-shadow: var(--shadow-3); cursor: pointer; text-align: left; font: 13px var(--font);
}
.map-who .dot { flex: none; width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 0 0 2px var(--bg); }
.map-who .ic { width: 18px; height: 18px; color: var(--fg-2); }
.who-main { display: flex; flex-direction: column; line-height: 1.2; }
.who-main b { font-weight: 500; }
.who-main small { font-size: 11.5px; color: var(--fg-2); white-space: nowrap; }
.map-who.sel { background: var(--secondary-cont); color: var(--on-secondary-cont); }
.map-who.sel small { color: inherit; opacity: .85; }
.map-who.off { color: var(--fg-3); }
.map-who.off small { color: var(--fg-3); }
.map-who.off .dot { opacity: .35; }
.map-none { flex: none; height: 36px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 18px; background: var(--surface-2); color: var(--fg-2); box-shadow: var(--shadow-3); font-size: 13px; }
.map-attr { position: absolute; right: 8px; bottom: calc(3px + env(safe-area-inset-bottom, 0px)); z-index: 1; font-size: 10px; color: var(--fg-3); pointer-events: none; text-shadow: 0 0 3px var(--bg), 0 0 3px var(--bg); }
.map-msg { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; text-align: center; color: var(--fg-2); background: var(--map-out); }
.map-msg[hidden] { display: none; }
.map-sheet { padding: 0 20px 20px; }
.map-sheet h3 { margin: 4px 0 8px; font: 400 20px/1.25 var(--font-display); }

/* Carte, mode « Routes » : réseau des grands axes en fond (visible seulement dans ce mode), trajets qui le suivent. */
.map-road { fill: none; stroke-linecap: round; pointer-events: none; }
.map-road.rM { stroke: color-mix(in srgb, var(--fg) 32%, var(--bg)); stroke-width: 2.2; }
.map-road.rT { stroke: color-mix(in srgb, var(--fg) 28%, var(--bg)); stroke-width: 1.8; }
.map-road.rP { stroke: color-mix(in srgb, var(--fg) 26%, var(--bg)); stroke-width: 1.6; }
.map-road.rS { stroke: color-mix(in srgb, var(--fg) 17%, var(--bg)); stroke-width: 1.2; }
.map-leg { stroke-linejoin: round; }
.map-leg-hit { fill: none; stroke: transparent; stroke-width: 18; pointer-events: stroke; cursor: pointer; }
.map-leg-who { display: flex; align-items: center; gap: 8px; color: var(--fg-2); margin-bottom: 10px; }
.map-leg-who .dot { width: 12px; height: 12px; border-radius: 50%; }
.map-est { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; margin-bottom: 8px; border-radius: 14px; background: var(--surface-2); }
.map-est b { font: 500 20px/1.2 var(--font-display); }
.map-est span { font-size: 12.5px; color: var(--fg-2); }
.map-late { color: var(--danger); }
.map-sheet .peek-actions { margin-top: 12px; }

/* Carte : monde entier en zoom arrière (js/map-world.js). Mer en fond, terres dans la teinte neutre. */
.mapv.world { background: color-mix(in srgb, var(--map-water) 16%, var(--bg)); }
.map-land { fill: var(--map-out); stroke: color-mix(in srgb, var(--fg) 20%, var(--bg)); stroke-width: .7; }
.mapv.far .map-road, .mapv.far .map-near, .mapv.far .map-rhine { display: none; }
.map-attr { left: 8px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Zone clients : contour englobant tous les clients placés */
/* Discrète par défaut ; plus marquée quand les clients sont affichés. */
.map-zone { fill: color-mix(in srgb, var(--primary) 2.5%, transparent); stroke: var(--primary); stroke-width: 1; stroke-linejoin: miter; opacity: .32; pointer-events: none; transition: opacity .2s; }
.mapv.clients .map-zone { fill: color-mix(in srgb, var(--primary) 7%, transparent); stroke-width: 1.4; opacity: .85; }
.mapv.mid .map-road.rM { stroke-width: 1.5; }
.mapv.mid .map-road.rT { stroke-width: 1.2; }
.mapv.mid .map-road.rP, .mapv.mid .map-road.rS { stroke-width: .8; }

/* Mises à jour de l'app Android (Paramètres > Mises à jour) */
.upd { display: flex; flex-direction: column; gap: 12px; padding-top: 16px; }
.upd-head { display: flex; align-items: center; gap: 14px; }
.upd-head > div, .upd-state > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.upd-head b { font: 500 17px var(--font); }
.upd-head span, .upd-state span { font-size: 13px; color: var(--fg-2); }
.upd-state { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: var(--surface-2); }
.upd-state > .ic { flex: none; color: var(--fg-2); }
.upd-state.on { background: var(--secondary-cont); color: var(--on-secondary-cont); }
.upd-state.on > .ic, .upd-state.on span { color: inherit; }
.upd-state b { font-weight: 500; }
.upd-state .upd-notes { margin-top: 4px; white-space: pre-line; }
.upd-bar { height: 4px; margin-top: 8px; border-radius: 2px; background: var(--outline); overflow: hidden; }
.upd-bar i { display: block; height: 100%; border-radius: 2px; background: var(--primary); transition: width .3s; }
.upd .hint { margin: 4px 2px 0; }
.ic.spin { animation: updSpin 1.1s linear infinite; }
@keyframes updSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ic.spin { animation: none; } }

/* Option « Entourer mes rendez-vous » (Paramètres) : contour autour des RDV où je participe. */
.ev.mine, .mchip.mine, .ad-bar.mine, .sv-ev.mine { outline: 2px solid var(--fg); outline-offset: -2px; }
/* Téléphone : en-tête des dates un peu moins haut. */
@media (max-width: 899px) {
  .dh:not(.dh-person) { padding: 2px 0; gap: 0; }
  .dh:not(.dh-person) .dh-num { width: 28px; height: 28px; font-size: 17px; }
}

/* Menu de gauche rétréci (glisser le bord) : rien ne déborde. Logo, nom, onglets et libellés s'adaptent
   à la largeur réelle du menu (requêtes de conteneur), aussi pendant le glisser. */
.drawer { container-type: inline-size; container-name: drawer; }
.dr-head { min-width: 0; }
.dr-head .logo { flex: none; }
.dr-head .brand { min-width: 0; overflow: hidden; white-space: nowrap; }
.dr-item span { min-width: 0; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.2; overflow-wrap: anywhere; }
.dr-item .ic, .dr-space .ic { flex: none; }
.dr-space { min-width: 0; }
.dr-space button { overflow: hidden; }
.dr-space button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@container drawer (max-width: 239px) {
  .dr-head { padding-left: 16px; padding-right: 12px; gap: 8px; }
  .dr-space { margin-left: 10px; margin-right: 10px; }
  .dr-item { padding: 0 12px; gap: 12px; }
}
/* Trop étroit pour « Agenda » à côté des deux autres onglets : trois icônes de même largeur. */
@container drawer (max-width: 204px) {
  .dr-space button, .dr-space button.sel { flex: 1 1 0; }
  .dr-space button.sel span { display: none; }
}
/* Trop étroit pour le nom : le logo seul, centré. */
@container drawer (max-width: 179px) {
  .dr-head { justify-content: center; padding-left: 0; padding-right: 0; }
  .dr-head .brand { display: none; }
}

/* Temps de trajet en bas des cartes de RDV. */
.ev-in:not(.one) { height: 100%; }
.ev-trv { margin-top: auto; flex: none; display: flex; align-items: center; gap: 3px; min-width: 0; padding-top: 2px; font-size: 10.5px; line-height: 1.2; opacity: .88; white-space: nowrap; overflow: hidden; font-variant-numeric: tabular-nums; }
.ev-trv .ic { width: 12px; height: 12px; flex: none; }
.ev-trv-from { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.loc-agency { margin-top: 8px; }
.ev-tline { display: flex; align-items: baseline; gap: 6px; min-width: 0; flex: none; }
.ev-tline .ev-title { display: block; flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-tline .ev-trv { margin: 0; padding: 0; flex: none; }

/* PC : fenêtre « Nouvel événement / Modifier » élargissable en tirant son bord gauche. */
.panel-rs { display: none; }
@media (min-width: 1100px) {
  .page-ov.editor .panel { width: var(--ed-w, min(620px, 100%)); max-width: calc(100vw - 120px); }
  .panel-rs { display: block; position: absolute; left: -5px; top: 0; bottom: 0; width: 10px; z-index: 3; cursor: col-resize; touch-action: none; }
  .panel-rs::after { content: ""; position: absolute; left: 4px; top: 50%; width: 3px; height: 44px; margin-top: -22px; border-radius: 2px; background: var(--outline); opacity: 0; transition: opacity .15s; }
  .panel-rs:hover::after, body.ed-resizing .panel-rs::after { opacity: 1; background: var(--primary); }
  body.ed-resizing, body.ed-resizing * { cursor: col-resize !important; user-select: none; }
  body.ed-resizing .page-ov .panel { transition: none; }
}

/* Petit téléphone : boutons de la barre du haut un peu plus serrés (place pour le mois). */
@media (max-width: 380px) { .topbar > .icon-btn, .topbar > .avatar-btn { width: 38px; min-width: 38px; } .topbar .today-btn { width: 38px; } }
.prof-color-ro { display: flex; align-items: center; gap: 10px; min-height: 36px; color: var(--fg-2); }
.prof-color-ro .dot { width: 18px; height: 18px; border-radius: 50%; flex: none; }

/* Éditeur, type Installation : client requis, opportunité / devis à rattacher. */
.ed-need { display: flex; align-items: center; gap: 12px; margin: 4px 16px 6px 56px; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--warn-fg, #b26a00) 12%, var(--surface-2)); }
.ed-need > .ic { flex: none; color: var(--fg-2); }
.ed-need > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.ed-need span { color: var(--fg-2); font-size: 12.5px; }
.ed-deals { margin: 4px 16px 6px 56px; padding: 6px 4px; border-radius: 14px; background: var(--surface-2); }
.ed-deals-h { display: flex; align-items: center; gap: 8px; padding: 6px 10px; font: 500 13px var(--font); color: var(--fg-2); }
.ed-deals-h .ic { width: 18px; height: 18px; }
.ed-deals > .hint { padding: 4px 10px; margin: 0; }
.ed-deal { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--fg); font: 14px var(--font); text-align: left; cursor: pointer; }
.ed-deal:hover { background: var(--hover); }
.ed-deal.sel { background: var(--secondary-cont); color: var(--on-secondary-cont); }
.ed-deal.sel .srow-s { color: inherit; opacity: .85; }
.ed-deal b { font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ed-deal-rd { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--outline); }
.ed-deal.sel .ed-deal-rd { border-color: currentColor; box-shadow: inset 0 0 0 3px var(--secondary-cont), inset 0 0 0 9px currentColor; }
@media (max-width: 599px) { .ed-need, .ed-deals { margin-left: 16px; } }

/* Aperçu du RDV en cours de saisie (éditeur ouvert sur le côté). */
.ev.preview, .mchip.preview, .sv-ev.preview { outline: 2px dashed var(--fg); outline-offset: -2px; opacity: 1; pointer-events: none; z-index: 5; box-shadow: var(--shadow-2, 0 2px 6px rgba(0,0,0,.25)); }
@media (min-width: 1100px) {
  body.ed-side #app { margin-right: var(--ed-pw, 620px); }
  body.ed-side .fab { visibility: hidden; }
}

/* Carte Teamleader : connexion par le relais */
.tlr-key { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.tlr-key .inp { flex: 1; min-width: 0; }
.tlr-list { display: flex; flex-direction: column; gap: 2px; margin: 6px 0 10px; }
.tlr-row { display: flex; align-items: center; gap: 10px; font-size: 13.5px; padding: 3px 0; }
.tlr-row .ic { width: 18px; height: 18px; flex: none; }
.tlr-row.ok .ic { color: #1e8e3e; }
.tlr-row.ko .ic { color: var(--warn-fg, #b26a00); }
.tlr-row span { flex: none; min-width: 150px; }
.tlr-row small { color: var(--fg-2); font-size: 12.5px; overflow-wrap: anywhere; }
.pill.ok { background: color-mix(in srgb, #1e8e3e 18%, var(--surface-2)); color: var(--fg); }

/* Site d'équipe : déverrouillage, installation, invitation */
.gate { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom)); background: var(--bg); }
.gate-card { width: min(400px, 100%); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.gate-card h1 { margin: 4px 0 0; font: 500 28px/1.1 var(--font-display); color: var(--fg); }
.gate-card p { margin: 0; color: var(--fg-2); font-size: 15px; line-height: 1.45; }
.gate-field { width: 100%; display: flex; flex-direction: column; gap: 6px; text-align: left; margin-top: 8px; font-size: 13px; color: var(--fg-2); }
.gate-field .inp { font-size: 16px; }
.gate-actions { width: 100%; display: flex; gap: 10px; }
.gate-actions .btn { flex: 1; height: 44px; }
.gate-msg { min-height: 20px; font-size: 14px !important; }
.inst { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 4px 20px 16px; text-align: center; }
.inst h3 { margin: 4px 0; font: 500 20px var(--font-display); }
.inst-steps { text-align: left; margin: 4px 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 1.4; }
.inst-steps .ic { width: 18px; height: 18px; vertical-align: -3px; }
.inst-steps .btn { margin-top: 6px; }
.inv { display: flex; flex-direction: column; gap: 14px; padding-top: 16px; }
.inv p { margin: 0; line-height: 1.5; }
.inv-link { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); overflow-wrap: anywhere; font-size: 13px; }
.inv-actions { display: flex; gap: 10px; flex-wrap: wrap; }
