/* BonMatin démo — styles. Charte « Lagon », thème unique. Bloc 1 = polices locales ; bloc 2 = jetons copiés tels quels de
   ~/dev/bonmatin/src/app/globals.css (:root, vérifié par diff) ; bloc 3 = jetons propres à la démo ; ensuite les composants.
   Règle : aucune couleur hors des deux blocs :root. */

@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/Barlow-400.woff2) format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/Barlow-500.woff2) format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/Barlow-600.woff2) format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/Barlow-700.woff2) format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/BarlowCondensed-600.woff2) format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/BarlowCondensed-700.woff2) format('woff2'); }

/* ---------- 2. Jetons de src/app/globals.css (copie exacte) ---------- */
:root {
  --dawn-1: #00796b;
  --dawn-2: #00695c;
  --dawn-3: #7c5800;
  --dawn-4: #ffc83d;
  --sky: linear-gradient(0deg, #ffc83d 0, #ffc83d 4px, transparent 4px), linear-gradient(170deg, #00796b 0%, #00796b 100%);
  --sky-wide: linear-gradient(0deg, #ffc83d 0, #ffc83d 5px, transparent 5px), linear-gradient(100deg, #00796b 0%, #00796b 100%);
  --sun: #ffc83d;
  --sun-deep: #e0a800;
  --cream: #eaf4f1;
  --cream-2: #d6e8e2;
  --paper: #ffffff;
  --ink: #12302c;
  --ink-2: #12302c;
  --muted: #4d6460;
  --line: #d3e3de;
  --line-2: #bcd3cc;
  --violet: #00695c;

  /* Dossiers : fonds francs, texte encre sarcelle */
  --f-probleme: #f09a92;
  --f-livraison: #8dbbe8;
  --f-securite: #ffc83d;
  --f-avancement: #8fd19e;
  --f-photo: #bcc4cd;
  --f-divers: #e2cfa4;

  --ok: #1b7a3d;
  --ok-bg: #dcefe2;
  --warn-bg: #fff1c2;
  --alert: #c62828;
  --alert-bg: #fde6e4;

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --sh-1: 0 1px 2px rgba(18, 48, 44, .08), 0 3px 10px rgba(18, 48, 44, .06);
  --sh-2: 0 8px 24px rgba(18, 48, 44, .14), 0 2px 6px rgba(18, 48, 44, .08);
  --sh-cta: 0 6px 16px rgba(255, 200, 61, .45), 0 2px 4px rgba(18, 48, 44, .12);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  /* ---- Jetons sémantiques (C1) ---- */
  /* Texte sur fond sombre / bandeau */
  --on-dark: #ffffff;
  --band-text: #f4f7f8;
  --band-text-hero: #ffffff;
  --band-tabs-bg: rgba(0, 40, 35, .28);
  --pill-bg: rgba(0, 40, 35, .28);
  --toast-error: #ffb4ab;

  /* Surfaces douces */
  --field-tint: #f3f8f6;
  --paper-tint: #f4f9f7;
  --hover-bg: #e3f0ec;
  --accent-bg: #d4ece6;
  --chip-bg: #dcefe9;
  --quiet-bg: #dcebe6;
  --cancel-bg: #e3ede9;
  --rejected-bg: #e5ebe9;
  --light-hover: #fff4d1;
  --stamp-bg: rgba(255, 255, 255, .85);
  --scrollbar: #b3cbc4;
  --icon-faint: #86a09a;
  --track-off: #bcd3cc;
  --mine-meta: #1d5a4f;
  --mine-bg: #d4f3eb;      /* bulle de mes messages : vert d’eau pâle, l’ambre plein reste à l’action principale */
  --strike: rgba(18, 48, 44, .35);
  --ghost-hover: rgba(18, 48, 44, .06);

  /* États */
  --ok-ink: #145c2e;
  --ok-line: #a8d5b6;
  --warn-ink: #6b4f00;
  --warn-icon: #a07600;
  --warn-line: #f2d36e;
  --alert-line: #f2b3ad;
  --info-bg: #e2ecf6;
  --info-ink: #1b4d78;
  --critical: #b71c1c;
  --live: #3ddc84;
  --live-glow: rgba(61, 220, 132, .7);
  --live-glow-start: rgba(61, 220, 132, .6);
  --live-glow-end: rgba(61, 220, 132, 0);
  --ring-pulse: rgba(255, 200, 61, .6);
  --ring-pulse-end: rgba(255, 200, 61, 0);

  /* Boutons d'action du composeur (terrain) */
  --photo-btn-bg: #dcebe6;
  --photo-btn-ink: #12302c;
  --dictate-btn-bg: #fff0b8;
  --dictate-btn-ink: #5a4200;

  /* Pastilles de personnes */
  --person-1: #6a3fb5;
  --person-2: #8a5700;
  --person-3: #00796b;
  --person-4: #1b7a3d;
  --person-5: #b3261e;
  --person-6: #4d6460;

  /* Voiles et ombres */
  --scrim: rgba(18, 48, 44, .35);
  --overlay-btn: rgba(18, 48, 44, .75);
  --flap-edge: rgba(18, 48, 44, .05);
  --flap-slit: rgba(18, 48, 44, .07);
  --mark-shadow: rgba(0, 40, 35, .3);
  --sh-ok: 0 6px 16px rgba(27, 122, 61, .3);
  --sh-light: 0 6px 18px rgba(18, 48, 44, .2);
  --sh-float: 0 10px 30px rgba(18, 48, 44, .22);
  --sh-hero-card: 0 12px 30px rgba(0, 40, 35, .35);
  --sh-toast: 0 12px 30px rgba(18, 48, 44, .35);
  --sh-drawer: -20px 0 60px rgba(18, 48, 44, .22);
  --sh-phone: 0 30px 70px rgba(18, 48, 44, .32);
  --sh-composer: 0 -8px 28px rgba(18, 48, 44, .12);

  /* Appel à l'action (bouton principal .btn) : ambre plein, encre brun foncé */
  --cta: #ffc83d;
  --cta-ink: #3b2a00;

  /* Gabarits de formulaire : pastille d'icône, fond franc + icône encre (clé = FormTemplate.key).
     La couleur stockée en base (FormTemplate.color) n'est plus lue par l'interface : voir src/lib/form-colors.ts */
  --form-hse-quotidienne: #ffc83d;
  --form-incident: #f09a92;
  --form-permis-travail: #f4a261;
  --form-bon-livraison: #8dbbe8;
  --form-essai-etancheite: #9fd4e3;
  --form-mise-en-service-elec: #e2cfa4;
  --form-bon-travail: #bcc4cd;
  --form-ticket-dispatch: #8fd19e;
  --form-default: #d6d3cc;
}

/* ---------- 3. Jetons propres à la démo ---------- */
:root {
  --rail-on: rgba(255, 255, 255, .15);
  --font-sans: 'Barlow', system-ui, sans-serif;
  --font-cond: 'Barlow Condensed', 'Barlow', 'Arial Narrow', sans-serif;
  --demo-bg: #0c2320;          /* barre de démo, hors app : encre sarcelle profonde */
  --demo-line: rgba(255, 255, 255, .12);
  --stage-bg: #cfe3de;         /* scène derrière les cadres */
  --todo-bg: #fff8e0;          /* ligne « À faire pour toi » */
  --mine-bg-bureau: #d4f3eb;
  --info-glow: rgba(27, 77, 120, .18);
  --ok-glow: rgba(27, 122, 61, .08);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--stage-bg); color: var(--ink); font: 16px/1.45 var(--font-sans); -webkit-font-smoothing: antialiased; overflow: hidden; }
h1, h2, h3, .cond { font-family: var(--font-cond); letter-spacing: -0.02em; margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
input, textarea, select { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; }
svg.i { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i.s { width: 20px; height: 20px; }
svg.i.xs { width: 16px; height: 16px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
::selection { background: var(--sun); color: var(--ink); }

/* ---------- Barre de démo (hors app) ---------- */
.demobar { position: fixed; inset: 0 0 auto 0; height: 48px; z-index: 100; display: flex; align-items: center; gap: 8px; padding: 0 12px; background: var(--demo-bg); color: var(--band-text); font-size: 13px; white-space: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.demobar::-webkit-scrollbar { display: none; }
.demobar > * { flex: none; }
.demobar .brand { font: 700 18px var(--font-cond); color: var(--on-dark); margin-right: 4px; }
.demobar .brand small { font: 600 12px var(--font-sans); color: var(--band-text); margin-left: 6px; opacity: .8; }
.demobar .modes { display: flex; background: var(--demo-line); border-radius: 10px; padding: 3px; gap: 2px; }
.demobar .modes button { min-height: 32px; padding: 0 10px; border-radius: 7px; font-weight: 700; color: var(--band-text); white-space: nowrap; }
.demobar .modes button[aria-pressed="true"] { background: var(--cta); color: var(--cta-ink); }
.demobar .grp { display: flex; align-items: center; gap: 5px; padding-left: 8px; border-left: 1px solid var(--demo-line); }
.demobar select { min-height: 32px; max-width: 190px; border-radius: 8px; border: 1px solid var(--demo-line); background: var(--demo-line); color: var(--on-dark); padding: 0 8px; font-weight: 600; }
.demobar .sw { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 9px; border-radius: 7px; background: var(--demo-line); font-weight: 600; cursor: pointer; white-space: nowrap; }
.demobar .sw[aria-pressed="true"] { background: var(--alert); color: var(--on-dark); }
.demobar .sw.ok[aria-pressed="true"] { background: var(--ok); }
.demobar .spacer { flex: 1; }
.demobar .ghost { min-height: 32px; padding: 0 9px; border-radius: 7px; color: var(--band-text); font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.demobar .ghost[aria-pressed="true"] { background: var(--cta); color: var(--cta-ink); }
@media (max-width: 1500px) { .demobar .sw span, .demobar .ghost span { display: none; } .demobar .grp label { display: none; } }
.demobar .ghost:hover { background: var(--demo-line); color: var(--on-dark); }
.demobar-mini { position: fixed; right: 8px; top: 8px; z-index: 100; min-height: 32px; padding: 0 10px; border-radius: 16px; background: var(--demo-bg); color: var(--on-dark); font-weight: 700; font-size: 13px; opacity: .55; display: none; }

/* ---------- Scénario guidé ---------- */
.guided { position: fixed; right: 16px; bottom: 16px; z-index: 90; width: 360px; max-width: calc(100vw - 32px); background: var(--paper); border-radius: 18px; box-shadow: var(--sh-float); padding: 12px 14px 14px; display: grid; gap: 8px; animation: rise .4s var(--ease-out); }
.guided .ghd b svg { color: var(--dawn-1); }
body[data-mode="cote"] .guided { right: auto; left: 33%; bottom: 24px; }
.guided .ghd { display: flex; align-items: flex-start; gap: 8px; font-size: 15px; }
.guided .ghd b { flex: 1; display: flex; gap: 6px; align-items: center; font-family: var(--font-cond); font-size: 19px; line-height: 1.15; }
.guided .ghd .ib { width: 36px; height: 36px; }
.guided ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.guided li { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; border-bottom: 1px solid var(--line); }
.guided li:last-child { border-bottom: 0; }
.guided .n { width: 28px; height: 28px; border-radius: 50%; background: var(--quiet-bg); display: grid; place-items: center; font: 700 14px var(--font-cond); flex: none; }
.guided li.done .n { background: var(--ok); color: var(--on-dark); }
.guided li.now .n { background: var(--cta); color: var(--cta-ink); }
.guided li.done .t { opacity: .6; }
.guided .t { flex: 1; min-width: 0; display: grid; gap: 4px; font-size: 15px; }
.guided .t small { color: var(--muted); font-size: 13.5px; }
.guided .t .btn { justify-self: start; white-space: normal; text-align: left; min-height: 44px; }
.guided .gend { display: grid; gap: 8px; padding-top: 6px; font-size: 15px; }
@media (max-width: 700px) { .guided { right: 8px; left: 8px; bottom: 8px; width: auto; } }

/* ---------- Scène et cadres ---------- */
.stage { position: fixed; inset: 48px 0 0 0; overflow: auto; }
.stage[data-mode="bureau"] { overflow: hidden; }
.stage[data-mode="bureau"] .bureau-wrap { position: absolute; inset: 0; }
.stage[data-mode="bureau"] .phone-wrap { display: none; }
.stage[data-mode="terrain"] { display: grid; place-items: start center; padding: 16px 24px; }
.stage[data-mode="terrain"] .bureau-wrap { display: none; }
.stage[data-mode="cote"] { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; padding: 16px 24px; align-items: start; }
.stage[data-mode="cote"] .bureau-wrap { position: relative; height: calc(100vh - 88px); overflow: clip; border-radius: 22px; box-shadow: var(--sh-float); background: var(--cream); }
.stage[data-mode="cote"] .bureau-wrap .bureau { position: absolute; left: 0; top: 0; width: 1360px; height: 900px; transform-origin: top left; }
.stage[data-mode="cote"] .phone-wrap { justify-self: center; }
.frame-label { text-align: center; font: 700 14px var(--font-sans); color: var(--muted); margin-bottom: 10px; letter-spacing: .02em; }
.phone-wrap { transform-origin: top center; }
.phone-frame { width: 399px; padding: 34px 12px 12px; border-radius: 48px; background: var(--dawn-1); box-shadow: var(--sh-phone); position: relative; }
.phone-frame::before { content: ''; position: absolute; top: 13px; left: 50%; width: 88px; height: 8px; margin-left: -44px; border-radius: 4px; background: var(--rail-on); }
.phone { width: 375px; height: 812px; border-radius: 38px; overflow: clip; background: var(--cream); position: relative; display: flex; flex-direction: column; container: terrain / inline-size; }
.bureau { width: 100%; height: 100%; background: var(--cream); position: relative; overflow: clip; container: bureau / inline-size; }
/* Vrai téléphone : pas de cadre, la barre de démo devient un bouton */
@media (max-width: 700px) {
  .demobar { display: none; }
  .stage { inset: 0; padding: 0 !important; display: block !important; }
  .stage .phone-wrap { display: block !important; width: 100% !important; margin: 0 !important; justify-self: stretch; place-self: auto; }
  .stage .bureau-wrap { display: none !important; }
  .stage[data-mode="bureau"] .bureau-wrap { display: block !important; position: absolute; inset: 0; }
  .stage[data-mode="bureau"] .phone-wrap { display: none !important; }
  .frame-label { display: none; }
  .phone-frame { width: 100% !important; padding: 0; border-radius: 0; background: none; box-shadow: none; }
  .phone-frame::before { display: none; }
  .phone { width: 100% !important; height: 100dvh; border-radius: 0; }
}
.demobar .modes button[hidden] { display: none; }
.demo-menu { position: fixed; top: 56px; right: 12px; z-index: 110; width: 300px; max-height: calc(100vh - 70px); overflow: auto; background: var(--paper); border-radius: 16px; box-shadow: var(--sh-float); padding: 8px; display: grid; gap: 4px; }
@media (max-width: 700px) { .demo-menu { top: 8px; right: 8px; left: 8px; width: auto; } }
.demo-menu button { min-height: 48px; border-radius: 10px; padding: 0 12px; text-align: left; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.demo-menu button:hover { background: var(--hover-bg); }

/* ---------- Composants partagés ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 20px; border-radius: 14px; font-weight: 700; font-size: 17px; background: var(--cta); color: var(--cta-ink); box-shadow: var(--sh-cta); white-space: nowrap; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn.full { width: 100%; min-height: 56px; font-size: 18px; }
.btn.big { min-height: 64px; font-size: 19px; }
.btn.sm { min-height: 40px; padding: 0 14px; font-size: 15px; border-radius: 11px; }
.btn:disabled { opacity: .5; box-shadow: none; cursor: default; }
.btn-soft { background: var(--paper); color: var(--violet); box-shadow: var(--sh-1); border: 1.5px solid var(--line-2); }
.btn-ghost { background: transparent; color: var(--ink-2); box-shadow: none; }
.btn-ghost:hover { background: var(--ghost-hover); }
.btn-light { background: var(--paper); color: var(--ink); box-shadow: none; }
.btn-quiet { background: var(--chip-bg); color: var(--ink); box-shadow: none; }
.btn-dark { background: var(--dawn-1); color: var(--on-dark); box-shadow: none; }
.btn-ok { background: var(--ok); color: var(--on-dark); box-shadow: var(--sh-ok); }
.btn-danger { background: transparent; color: var(--alert); box-shadow: none; }
.btn-alert { background: var(--alert-bg); color: var(--alert); box-shadow: none; }
.link { padding: 0 4px; min-height: 48px; display: inline-flex; align-items: center; gap: 6px; color: var(--violet); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.ib { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; flex: none; color: inherit; }
.ib.on-band:hover { background: var(--rail-on); }
.ib.soft { background: var(--chip-bg); }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; border-radius: 99px; padding: 2px 9px; white-space: nowrap; }
.tag.warn { background: var(--warn-bg); color: var(--warn-ink); }
.tag.ok { background: var(--ok-bg); color: var(--ok-ink); }
.tag.quiet { background: var(--quiet-bg); color: var(--ink); }
.tag.info { background: var(--info-bg); color: var(--info-ink); }
.tag.alert { background: var(--alert-bg); color: var(--alert); }
.tag.violet { background: var(--chip-bg); color: var(--dawn-2); }
.card { background: var(--paper); border-radius: 18px; box-shadow: var(--sh-1); overflow: hidden; }
.pad { padding: 14px; }
.row { display: flex; align-items: center; gap: 12px; min-height: 76px; padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; width: 100%; color: inherit; }
.row:last-child { border-bottom: 0; }
.row .mid { flex: 1; min-width: 0; }
.row b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 17px; line-height: 1.2; overflow: hidden; }
.row .mid p { margin: 2px 0 0; font-size: 15px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .ch { color: var(--icon-faint); }
.row .xtra { display: none; }
@container bureau (min-width: 1024px) { .row .xtra { display: block; width: 190px; flex: none; font-size: 15px; color: var(--muted); } .row .xtra strong { display: block; color: var(--ink); font-weight: 600; } }
.av { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font: 700 16px var(--font-cond); color: var(--on-dark); flex: none; position: relative; }
.av.sm { width: 34px; height: 34px; font-size: 13px; }
.av .pb { position: absolute; right: -2px; top: -2px; width: 18px; height: 18px; border-radius: 50%; background: var(--alert); border: 3px solid var(--paper); }
.count { min-width: 26px; height: 26px; border-radius: 13px; background: var(--cta); color: var(--cta-ink); font-weight: 700; font-size: 15px; display: inline-grid; place-items: center; padding: 0 7px; }
.count.red { background: var(--alert); color: var(--on-dark); }
.count.teal { background: var(--dawn-1); color: var(--on-dark); }
.search { min-height: 48px; display: flex; align-items: center; gap: 10px; background: var(--paper); border: 2px solid var(--line); border-radius: 14px; padding: 0 12px; color: var(--muted); font-size: 17px; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; min-height: 44px; color: var(--ink); }
.search input::placeholder { color: var(--muted); }
.search.on-band { background: var(--band-tabs-bg); border-color: transparent; color: var(--band-text); }
.search.on-band input { color: var(--on-dark); }
.search.on-band input::placeholder { color: var(--band-text); }
.empty { text-align: center; padding: 36px 20px 28px; }
.empty .big { width: 96px; height: 96px; border-radius: 50%; background: var(--chip-bg); color: var(--dawn-2); display: grid; place-items: center; margin: 0 auto 16px; }
.empty .big svg { width: 44px; height: 44px; }
.empty h2 { font-size: 26px; }
.empty p { margin: 8px auto 0; max-width: 34ch; color: var(--muted); font-size: 17px; }
.empty .go { display: grid; gap: 8px; max-width: 360px; margin: 22px auto 0; }
.banner { border-radius: 12px; padding: 12px 14px; font-size: 15.5px; font-weight: 600; display: flex; gap: 10px; align-items: flex-start; }
.banner.ok { background: var(--ok-bg); color: var(--ok-ink); }
.banner.warn { background: var(--warn-bg); color: var(--warn-ink); border: 1.5px solid var(--warn-line); }
.banner.info { background: var(--info-bg); color: var(--info-ink); }
.banner.quiet { background: var(--paper); color: var(--muted); }
.banner.alert { background: var(--alert-bg); color: var(--alert); }
.apercu { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--warn-ink); background: var(--warn-bg); border-radius: 99px; padding: 3px 10px; }

/* Champs */
.field { display: grid; gap: 6px; font-size: 15px; font-weight: 600; color: var(--ink-2); }
.input { width: 100%; min-height: 48px; border-radius: 12px; border: 2px solid var(--line); background: var(--field-tint); padding: 10px 14px; font: 500 17px var(--font-sans); color: var(--ink); outline: none; }
.input:focus { border-color: var(--violet); background: var(--paper); }
.input::placeholder { color: var(--muted); font-weight: 400; }
textarea.input { min-height: 96px; resize: vertical; line-height: 1.4; }
select.input { appearance: none; padding-right: 36px; }
.hint { font-size: 14px; font-weight: 500; color: var(--muted); }
.err { font-size: 13px; font-weight: 700; color: var(--alert); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 48px; border-radius: 99px; padding: 0 16px; font-size: 16px; font-weight: 700; background: var(--paper); color: var(--ink-2); box-shadow: var(--sh-1); display: inline-flex; align-items: center; gap: 6px; }
.chip[aria-checked="true"], .chip.on { background: var(--dawn-1); color: var(--on-dark); box-shadow: none; }
.chip.sm { min-height: 40px; font-size: 14px; padding: 0 12px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@container bureau (max-width: 700px) { .two { grid-template-columns: 1fr; } }
.check { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 12px; border-radius: 12px; border: 2px solid var(--line); background: var(--paper); font-weight: 600; width: 100%; text-align: left; }
.check .box { width: 28px; height: 28px; border-radius: 8px; border: 2px solid var(--line-2); display: grid; place-items: center; color: var(--on-dark); flex: none; }
.check[aria-checked="true"] { border-color: var(--ok-line); background: var(--ok-bg); }
.check[aria-checked="true"] .box { background: var(--ok); border-color: var(--ok); }
.more { color: var(--ink); width: 100%; min-height: 64px; border: 2px dashed var(--line-2); border-radius: 14px; display: flex; align-items: center; gap: 12px; padding: 8px 14px; text-align: left; }
.more b { display: block; font-size: 17px; }
.more span { display: block; font-size: 14px; color: var(--muted); }
.more .i { color: var(--violet); }
.more[aria-expanded="true"] { border-style: solid; border-color: var(--line); background: var(--paper-tint); }
.details { display: grid; gap: 16px; padding: 2px 2px 4px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--pill-bg); border-radius: 14px; padding: 4px; gap: 4px; }
.seg button { min-height: 48px; border-radius: 11px; color: var(--band-text); font-weight: 700; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.seg button[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: var(--sh-1); }
.seg.light { background: var(--quiet-bg); }
.seg.light button { color: var(--muted); }
.seg.light button[aria-selected="true"] { color: var(--ink); }

/* Feuilles : tiroir (bureau) et feuille du bas (terrain) */
.sheet-wrap { position: absolute; inset: 0; z-index: 40; display: flex; justify-content: flex-end; }
.sheet-wrap .scrim { position: absolute; inset: 0; background: var(--scrim); }
.sheet { position: relative; display: flex; flex-direction: column; width: 100%; max-width: 560px; height: 100%; background: var(--cream); box-shadow: var(--sh-drawer); animation: slide-in .28s var(--ease-out); }
.sheet.wide { max-width: 720px; }
.sheet > header { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px 16px 20px; background: var(--sky); color: var(--on-dark); flex: none; }
.sheet > header .t { flex: 1; min-width: 0; }
.sheet > header .t p { margin: 0; font-size: 14px; font-weight: 600; color: var(--band-text); }
.sheet > header h2 { font-size: 24px; line-height: 1.15; }
.sheet > header .ib { background: var(--rail-on); }
.sheet .body { flex: 1; overflow: auto; padding: 18px; display: grid; gap: 16px; align-content: start; grid-auto-rows: max-content; }
.sheet > footer { background: var(--paper); border-top: 1px solid var(--line); padding: 12px 16px 16px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; flex: none; }
.sheet > footer .grow { flex: 1 1 200px; }
.sheet-wrap.bottom { align-items: flex-end; justify-content: stretch; }
.sheet-wrap.bottom .sheet { max-width: none; height: auto; max-height: 92%; border-radius: 24px 24px 0 0; background: var(--paper); box-shadow: var(--sh-float); animation: slide-up .28s var(--ease-out); }
.sheet-wrap.bottom .sheet > header { background: none; color: var(--ink); padding: 8px 16px 4px; align-items: center; }
.sheet-wrap.bottom .sheet > header .t p { color: var(--muted); }
.sheet-wrap.bottom .sheet > header::before { content: ''; position: absolute; top: 8px; left: 50%; width: 44px; height: 5px; margin-left: -22px; border-radius: 3px; background: var(--line-2); }
.sheet-wrap.bottom .sheet > header { padding-top: 22px; }
.sheet-wrap.bottom .sheet .body { padding: 8px 16px 12px; }
.sheet-wrap.bottom .sheet > footer { border-top: 0; padding-bottom: 24px; }
.sheet-wrap.full .sheet { max-width: none; }
.sheet .body.fo-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
@container bureau (max-width: 1023px) { .sheet .body.fo-body { grid-template-columns: minmax(0, 1fr); } }
.sheet.wide { max-width: 860px; }
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } }
@keyframes slide-up { from { transform: translateY(40px); opacity: 0; } }
@keyframes rise { from { transform: translateY(12px); opacity: 0; filter: blur(2px); } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 var(--live-glow-start); } 50% { box-shadow: 0 0 0 8px var(--live-glow-end); } }
@keyframes ring { 0% { box-shadow: 0 0 0 0 var(--ring-pulse); } 100% { box-shadow: 0 0 0 14px var(--ring-pulse-end); } }
@media (prefers-reduced-motion: reduce) { *, ::before, ::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* Grille de tuiles (feuille +, dossiers) */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 8px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 6px; }
.gi { display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; text-align: center; line-height: 1.2; }
.gi .ic { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; color: var(--ink); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { position: relative; min-height: 96px; background: var(--paper); border-radius: 16px; box-shadow: var(--sh-1); padding: 12px; display: flex; flex-direction: column; justify-content: space-between; text-align: left; }
.tile .n { font: 700 28px/1 var(--font-cond); }
.tile .l { font-weight: 700; font-size: 16px; }
.tile .sub { font-size: 13px; color: var(--muted); }
.tile .ic { position: absolute; top: 10px; left: 12px; }
.tile .ch { position: absolute; top: 10px; right: 8px; color: var(--icon-faint); }
.tile .n { margin-top: 26px; }

/* Toasts */
.toast { position: absolute; left: 12px; right: 12px; bottom: 96px; z-index: 60; background: var(--dawn-1); color: var(--on-dark); border-radius: 16px; padding: 12px 14px; box-shadow: var(--sh-toast); font-size: 15px; font-weight: 600; animation: rise .45s var(--ease-out); display: grid; gap: 6px; }
.toast .ln { display: flex; gap: 8px; align-items: center; animation: rise .4s var(--ease-out) both; }
.toast .ln svg { color: var(--live); }
.toast .act { margin-left: auto; color: var(--sun); font-weight: 700; text-decoration: underline; }
.toast.err { background: var(--alert); }

/* Étiquette de dossier (fond franc, texte encre) */
.ftag { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; border-radius: 99px; padding: 3px 10px 3px 7px; color: var(--ink); }
.ftag svg { width: 14px; height: 14px; stroke-width: 2.4; }
.f-PROBLEME { background: var(--f-probleme); } .f-LIVRAISON { background: var(--f-livraison); } .f-SECURITE { background: var(--f-securite); }
.f-AVANCEMENT { background: var(--f-avancement); } .f-PHOTO { background: var(--f-photo); } .f-DIVERS { background: var(--f-divers); }

/* Puces d'infos repérées */
.ent { display: inline-flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; max-width: 100%; font-size: 13px; background: var(--warn-bg); color: var(--warn-ink); border-radius: 10px; padding: 4px 9px; margin: 4px 4px 0 0; }
.ent b, .ent .pc { white-space: nowrap; }
.ent b { flex: 1 1 auto; min-width: 0; white-space: normal; }
.ent b { color: var(--ink); }
.ent .pc { font-weight: 700; }
.ent .pc.low { color: var(--alert); }
.ent.ok { background: var(--ok-bg); color: var(--ok-ink); }
.ent.no { background: var(--rejected-bg); color: var(--muted); text-decoration: line-through; }
.ent button { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--paper); color: var(--ink); }
.ent button.y { color: var(--ok); }
.ent button.n { color: var(--alert); }

/* ---------- Terrain ---------- */
.terrain { display: flex; flex-direction: column; height: 100%; background: var(--cream); }
.terrain .top { background: var(--dawn-1); color: var(--on-dark); padding: 14px 16px 12px; border-bottom: 4px solid var(--sun); flex: none; }
.terrain .top h1 { font-size: 30px; line-height: 1.1; display: flex; align-items: center; gap: 10px; }
.terrain .top .sub { font-size: 15px; color: var(--band-text); margin-top: 2px; }
.terrain .top.round { border-radius: 0 0 30px 30px; border-bottom: 0; }
.pastille { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 99px; background: var(--pill-bg); color: var(--on-dark); font: 600 13px var(--font-sans); letter-spacing: 0; }
.scroll { flex: 1; overflow: auto; min-height: 0; -webkit-overflow-scrolling: touch; }
.chathead { background: var(--dawn-1); color: var(--on-dark); display: flex; align-items: center; gap: 6px; padding: 8px 6px 8px 4px; min-height: 64px; border-bottom: 4px solid var(--sun); flex: none; }
.chathead .ib { color: var(--on-dark); }
.chathead .t { flex: 1; min-width: 0; }
.chathead .t b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font: 700 19px/1.15 var(--font-cond); overflow: hidden; }
.chathead .t span { display: block; font-size: 14px; color: var(--band-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chathead .t span.warn { color: var(--on-dark); font-weight: 700; }
.chathead .code { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font: 700 14px var(--font-cond); background: var(--band-tabs-bg); flex: none; }
.fixbar { display: flex; gap: 8px; padding: 10px 12px; background: var(--paper); border-bottom: 1px solid var(--line); flex: none; }
.fixbar .btn { height: 64px; min-height: 64px; font-size: 19px; }
.fixbar .cta { flex: 1.35; }
.fixbar .sec { background: var(--chip-bg); color: var(--ink); box-shadow: none; flex: 1; position: relative; }
.fixbar .sec.icon { flex: 0 0 64px; padding: 0; }
.fixbar .fin { background: var(--dawn-1); color: var(--on-dark); box-shadow: none; flex: 0 0 104px; }
.onsite { flex: 1.35; display: flex; flex-direction: column; justify-content: center; padding: 0 12px; background: var(--ok-bg); border-radius: 14px; height: 64px; min-width: 0; }
.onsite b { color: var(--ok-ink); font-size: 17px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.onsite span { font-size: 14px; color: var(--ok-ink); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); display: inline-block; animation: pulse 2s infinite; }
.fixbar .badge { position: absolute; top: -6px; right: -4px; min-width: 26px; height: 26px; border-radius: 13px; background: var(--alert); color: var(--on-dark); font-size: 15px; font-weight: 700; display: grid; place-items: center; padding: 0 7px; }
.fixbar .note { font-size: 14px; color: var(--muted); }
.fixnote { padding: 6px 14px 8px; background: var(--paper); font-size: 14.5px; color: var(--muted); border-bottom: 1px solid var(--line); }
.qstat { padding: 8px 14px; font-size: 14px; font-weight: 600; background: var(--warn-bg); color: var(--warn-ink); }

/* Liste de discussions */
.dlist { flex: 1; overflow: auto; background: var(--paper); }
.drow { display: flex; gap: 12px; align-items: center; padding: 12px 16px; min-height: 80px; border-bottom: 1px solid var(--line); width: 100%; text-align: left; animation: rise .4s var(--ease-out); }
.drow .av { width: 54px; height: 54px; font-size: 17px; }
.drow .mid { flex: 1; min-width: 0; }
.drow .mid b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 17px; line-height: 1.2; overflow: hidden; }
.drow .mid p { margin: 3px 0 0; font-size: 16px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drow .mid p.here { color: var(--ok-ink); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.drow .mid .chips { gap: 6px; margin-top: 6px; }
.drow .mid .chips .tag { font-size: 12.5px; }
.drow .end { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 14px; color: var(--muted); flex: none; }
.drow .end.un { color: var(--ink); font-weight: 700; }
.drow.urg { background: var(--alert-bg); }
.drow.todo { background: var(--todo-bg); }
.drow.todo .av { background: var(--cta); color: var(--cta-ink); }
.drow.sel { background: var(--chip-bg); }
.drow.special .av { background: var(--chip-bg); color: var(--dawn-2); }
.sect { padding: 10px 16px 6px; font-size: 14px; font-weight: 700; color: var(--muted); background: var(--paper-tint); }

/* Onglets terrain */
.ttabs { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--paper); border-top: 1px solid var(--line); padding-bottom: 14px; flex: none; }
.ttabs a, .ttabs button { min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-weight: 700; font-size: 14px; color: var(--muted); position: relative; }
.ttabs .on { color: var(--ink); }
.ttabs .on::before { content: ''; position: absolute; top: 0; left: 28%; right: 28%; height: 4px; background: var(--cta); border-radius: 0 0 4px 4px; }
.ttabs .tb { position: absolute; top: 6px; left: 56%; min-width: 22px; height: 22px; border-radius: 11px; background: var(--cta); color: var(--cta-ink); font-size: 13px; display: grid; place-items: center; padding: 0 6px; }
.backmoi { display: inline-flex; align-items: center; gap: 4px; min-height: 48px; padding: 0 10px; font-weight: 700; color: var(--band-text); }

/* Fil */
.feed { flex: 1; overflow: auto; padding: 12px 10px 8px; display: flex; flex-direction: column; gap: 8px; background: var(--cream); }
.feed .spacer { flex: 1; }
.day { align-self: center; background: var(--paper); border-radius: 8px; padding: 4px 12px; font-size: 14px; font-weight: 600; color: var(--muted); }
.sys { align-self: center; background: var(--quiet-bg); border-radius: 10px; padding: 6px 12px; font-size: 15px; color: var(--ink-2); display: flex; gap: 6px; align-items: center; text-align: center; animation: rise .45s var(--ease-out); }
.sys.go { background: var(--ok-bg); color: var(--ok-ink); font-weight: 600; }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 88%; animation: rise .5s var(--ease-out); }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.b { background: var(--paper); border-radius: 20px 20px 20px 6px; padding: 8px 12px 6px; box-shadow: var(--sh-1); font-size: 16px; line-height: 1.35; min-width: 0; max-width: 100%; }
.b .who { font-size: 13px; font-weight: 700; color: var(--dawn-2); margin-bottom: 2px; }
.b .txt { white-space: pre-wrap; word-wrap: break-word; }
.b .txt.done { text-decoration: line-through; color: var(--muted); }
.b .meta { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.b .meta .r { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.msg.me .b { background: var(--mine-bg); border-radius: 20px 20px 6px 20px; }
.msg.me .b .meta { color: var(--mine-meta); }
.b.wait { opacity: .8; }
.b .photo { width: 240px; max-width: 100%; height: 160px; border-radius: 10px; overflow: hidden; margin: 2px 0 6px; display: grid; place-items: center; background: linear-gradient(135deg, var(--cream-2), var(--line-2)); color: var(--ink-2); font-weight: 600; font-size: 14px; position: relative; }
.b .photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.b .photo .cap { position: absolute; left: 8px; bottom: 8px; background: var(--stamp-bg); border-radius: 8px; padding: 2px 8px; font-size: 12.5px; }
.b .audio { display: flex; align-items: center; gap: 8px; background: var(--field-tint); border-radius: 12px; padding: 8px 10px; margin: 2px 0 6px; }
.b .audio .wave { display: flex; gap: 2px; align-items: center; height: 24px; }
.b .audio .wave i { width: 3px; border-radius: 2px; background: var(--dawn-1); height: var(--h, 40%); }
.b .audio .tr { font-size: 14px; color: var(--muted); font-style: italic; }
.b .doc { display: inline-flex; align-items: center; gap: 6px; background: var(--chip-bg); color: var(--dawn-2); font-weight: 700; border-radius: 10px; padding: 6px 10px; margin: 2px 0 6px; }
.b .iabox { background: var(--field-tint); border-radius: 12px; padding: 8px 10px; margin: 4px 0; font-size: 14px; }
.b .iabox b { display: block; font-size: 13px; color: var(--dawn-2); }
.b .regle { width: 100%; min-height: 52px; margin-top: 8px; border-radius: 14px; background: var(--dawn-1); color: var(--on-dark); font-weight: 700; font-size: 17px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.b .resolved { color: var(--ok); font-weight: 700; font-size: 14px; margin-top: 4px; }
.b .fail { background: var(--alert-bg); color: var(--alert); border-radius: 10px; padding: 8px 10px; font-size: 14px; font-weight: 600; margin-top: 6px; }
.formcard { display: flex; gap: 10px; align-items: center; background: var(--field-tint); border-radius: 10px; padding: 10px; margin: 2px 0 6px; }
.formcard .fi { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.coach { align-self: stretch; margin: 0 6px; background: var(--light-hover); border-radius: 14px; padding: 12px 14px; font-size: 15px; box-shadow: var(--sh-1); }

/* Composeur */
.qchips { display: flex; gap: 8px; padding: 8px 10px 0; background: var(--cream); flex: none; }
.qchips .chip { box-shadow: none; }
.draft { background: var(--paper); margin: 8px 10px 0; border-radius: 14px; padding: 10px 12px; box-shadow: var(--sh-1); font-size: 14.5px; display: grid; gap: 8px; }
.draft .th { width: 96px; height: 72px; border-radius: 10px; object-fit: cover; }
.draft .rng { display: flex; align-items: center; gap: 8px; color: var(--dawn-2); font-weight: 600; }
.draft .eq { display: flex; gap: 3px; align-items: center; height: 22px; }
.draft .eq i { width: 4px; border-radius: 2px; background: var(--dawn-1); animation: eq .8s infinite alternate; }
.draft .eq i:nth-child(2) { animation-delay: .1s; } .draft .eq i:nth-child(3) { animation-delay: .2s; } .draft .eq i:nth-child(4) { animation-delay: .3s; } .draft .eq i:nth-child(5) { animation-delay: .15s; }
@keyframes eq { from { height: 4px; } to { height: 22px; } }
.composer { display: flex; align-items: flex-end; gap: 6px; padding: 8px 8px 22px; background: var(--cream); box-shadow: var(--sh-composer); flex: none; }
.composer .round { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); color: var(--ink); box-shadow: var(--sh-1); flex: none; }
.composer .field { flex: 1; min-height: 52px; border-radius: 26px; background: var(--paper); display: flex; align-items: center; padding: 0 16px; box-shadow: var(--sh-1); min-width: 0; }
.composer .field textarea { flex: 1; min-width: 0; border: 0; outline: none; background: none; resize: none; font-size: 17px; line-height: 1.3; padding: 13px 0; max-height: 120px; color: var(--ink); }
.composer .field textarea::placeholder { color: var(--muted); }
.composer .mic { width: 56px; height: 56px; background: var(--cta); color: var(--cta-ink); box-shadow: var(--sh-cta); }
.composer .mic.rec { animation: ring 1s infinite; }
.composer .mic.send { background: var(--dawn-1); color: var(--on-dark); box-shadow: none; }
.bureau .composer .mic:not(.send) { background: var(--paper); color: var(--dawn-2); box-shadow: var(--sh-1); }

/* Carte */
.mapbox { flex: 1; position: relative; background: var(--cream-2); min-height: 0; }
.mapbox .leaflet-container { width: 100%; height: 100%; font: inherit; }
.pin { width: 44px; height: 44px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); background: var(--cta); border: 3px solid var(--dawn-1); display: grid; place-items: center; box-shadow: var(--sh-2); }
.pin span { transform: rotate(45deg); font: 700 12px var(--font-cond); color: var(--ink); }
.pin.pbm { background: var(--alert); } .pin.pbm span { color: var(--on-dark); }
.me-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--info-ink); border: 4px solid var(--paper); box-shadow: 0 0 0 6px var(--info-glow); }
.mapcard { position: absolute; left: 10px; right: 10px; bottom: 12px; background: var(--paper); border-radius: 18px; padding: 14px; box-shadow: var(--sh-float); z-index: 500; animation: rise .4s var(--ease-out); }
.mapcard b { font-size: 19px; display: block; padding-right: 44px; }
.mapcard p { margin: 4px 0 12px; font-size: 15px; color: var(--muted); }
.mapcard .acts { display: flex; gap: 8px; }
.mapcard .acts .btn { flex: 1; min-height: 56px; font-size: 17px; }
.mapcard .close { position: absolute; top: 8px; right: 8px; }
.mapnote { position: absolute; top: 10px; left: 10px; z-index: 500; background: var(--paper); border-radius: 10px; padding: 6px 10px; font-size: 13.5px; font-weight: 600; box-shadow: var(--sh-1); display: flex; gap: 8px; align-items: center; }
.fakemap { position: absolute; inset: 0; overflow: hidden; background: var(--cream-2); }
.fakemap .r { position: absolute; background: var(--paper); }
.fakemap .park { position: absolute; border-radius: 12px; background: var(--ok-bg); }
.fakemap .fp { position: absolute; transform: translate(-50%, -100%); }
.minimap { height: 150px; border-radius: 14px; overflow: hidden; position: relative; border: 2px solid var(--line); background: var(--cream-2); }

/* Moi */
.today { margin: 14px 12px; background: var(--dawn-1); color: var(--on-dark); border-radius: 18px; padding: 16px; }
.today .k { font-size: 14px; color: var(--band-text); font-weight: 600; }
.today .big { font: 700 40px/1.1 var(--font-cond); margin: 2px 0; }
.today .s { font-size: 16px; color: var(--band-text-hero); display: flex; gap: 8px; align-items: center; }
.today .s2 { font-size: 14px; color: var(--band-text); margin-top: 6px; }
.menu { margin: 0 12px 14px; background: var(--paper); border-radius: 18px; overflow: hidden; box-shadow: var(--sh-1); }
.mi { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 0 16px; border-bottom: 1px solid var(--line); font-size: 18px; font-weight: 600; width: 100%; text-align: left; }
.mi:last-child { border-bottom: 0; }
.mi .mic2 { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--chip-bg); flex: none; }
.mi .ch { margin-left: auto; color: var(--icon-faint); }
.mi.quiet { color: var(--muted); }
.mi .count { margin-left: auto; }
.mi .count + .ch { margin-left: 0; }

/* Heures terrain */
.hweek { padding: 14px 16px; background: var(--dawn-1); color: var(--on-dark); }
.hweek .big { font: 700 40px/1.1 var(--font-cond); }
.hday { padding: 12px 14px 4px; display: flex; justify-content: space-between; font-weight: 700; color: var(--muted); font-size: 14.5px; }
.hentry { margin: 0 12px 8px; background: var(--paper); border-radius: 14px; padding: 10px 14px; box-shadow: var(--sh-1); display: grid; gap: 4px; }
.hentry .l1 { display: flex; justify-content: space-between; font-weight: 700; font-size: 16px; }
.hentry .l2 { font-size: 14.5px; color: var(--muted); }
.hentry .tags { display: flex; flex-wrap: wrap; gap: 4px; }
.footnote { padding: 12px 16px 24px; font-size: 14px; color: var(--muted); }

/* Formulaires terrain */
.morning { margin: 12px; min-height: 84px; background: var(--sun); color: var(--ink); border-radius: 18px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; box-shadow: var(--sh-cta); text-align: left; width: calc(100% - 24px); }
.morning b { display: block; font-size: 17px; }
.morning span { font-size: 14.5px; }
.morning .ch { margin-left: auto; }
.ftile { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; color: var(--ink); flex: none; }
.ffoot { position: sticky; bottom: 0; background: var(--paper); border-top: 1px solid var(--line); padding: 10px 14px 20px; display: grid; gap: 8px; }
.ffoot .prog { font-size: 14px; font-weight: 600; color: var(--muted); display: flex; justify-content: space-between; }
.bar { height: 10px; border-radius: 5px; background: var(--quiet-bg); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ok); border-radius: 5px; transition: width .3s; }
.sigpad { position: relative; height: 160px; border: 2px dashed var(--line-2); border-radius: 12px; background: var(--paper); touch-action: none; }
.sigpad canvas { width: 100%; height: 100%; display: block; }
.sigpad .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); pointer-events: none; }
.sigpad .clear { position: absolute; top: 6px; right: 6px; min-height: 36px; padding: 0 10px; border-radius: 8px; background: var(--chip-bg); font-weight: 700; font-size: 14px; }
.stamp { display: inline-block; border: 3px solid var(--ok); color: var(--ok); font: 700 22px var(--font-cond); letter-spacing: .12em; padding: 2px 10px; border-radius: 6px; transform: rotate(-4deg); }
.stamp.red { border-color: var(--alert); color: var(--alert); }
.section-title { font: 700 20px var(--font-cond); padding: 12px 0 4px; border-bottom: 2px solid var(--line); }
.photofield { display: flex; gap: 10px; align-items: center; }
.photofield img { width: 80px; height: 80px; border-radius: 10px; object-fit: cover; }
.violet-hint { display: flex; gap: 8px; align-items: center; font-size: 14.5px; font-weight: 600; color: var(--dawn-2); background: var(--chip-bg); border-radius: 10px; padding: 8px 12px; }

/* Urgences terrain */
.steps { display: flex; gap: 3px; margin: 8px 0; }
.steps i { flex: 1; height: 6px; border-radius: 3px; background: var(--quiet-bg); }
.steps i.done { background: var(--ok); }
.steps i.now { background: var(--cta); animation: pulse 1.6s infinite; }
.steps-l { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; color: var(--muted); }
.ucard { margin: 12px; background: var(--paper); border-radius: 18px; box-shadow: var(--sh-1); padding: 14px; display: grid; gap: 8px; }
.ucard .hd { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ucard .hd .since { margin-left: auto; font-size: 14px; color: var(--muted); }
.ucard h2 { font-size: 21px; }
.ucard .acts { display: flex; gap: 8px; }
.ucard .acts .btn { flex: 1; }
.bigbtn { position: sticky; bottom: 0; padding: 10px 12px 24px; background: linear-gradient(0deg, var(--cream) 70%, transparent); }
.bigbtn .btn { width: 100%; min-height: 72px; font-size: 20px; }

/* ---------- Bureau ---------- */
.bureau { display: flex; flex-direction: column; }
.brail { display: none; }
.btabs { position: absolute; inset: auto 0 0 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--paper); border-top: 1px solid var(--line); padding-bottom: 8px; }
.btabs button { position: relative; min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-weight: 700; font-size: 13px; color: var(--muted); }
.btabs .on { color: var(--ink); }
.btabs .on::before { content: ''; position: absolute; top: 0; left: 26%; right: 26%; height: 4px; background: var(--cta); border-radius: 0 0 4px 4px; }
.btabs .tb, .brail .tb { position: absolute; top: 6px; left: 56%; min-width: 22px; height: 22px; border-radius: 11px; background: var(--cta); color: var(--cta-ink); font-size: 13px; font-weight: 700; display: grid; place-items: center; padding: 0 6px; }
.bmain { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-bottom: 72px; overflow: hidden; }
.bmain > .screen { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
@container bureau (min-width: 1024px) {
  .bureau { flex-direction: row; }
  .btabs { display: none; }
  .bmain { padding-bottom: 0; }
  .brail { display: flex; flex-direction: column; gap: 6px; width: 96px; flex: none; background: var(--dawn-1); color: var(--on-dark); padding: 20px 8px 16px; }
  .brail .name { font: 700 20px/1 var(--font-cond); text-align: center; min-height: 48px; display: grid; place-items: center; margin-bottom: 12px; }
  .brail button { position: relative; min-height: 76px; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--band-text); }
  .brail button.on { background: var(--accent-bg); color: var(--dawn-2); }
  .brail button.on::before { content: ''; position: absolute; left: -8px; top: 18px; bottom: 18px; width: 4px; border-radius: 0 4px 4px 0; background: var(--cta); }
  .brail .me { margin: auto auto 0; width: 44px; height: 44px; border-radius: 50%; background: var(--ok); display: grid; place-items: center; font: 700 15px var(--font-cond); color: var(--on-dark); }
  .brail .out { min-height: 48px; }
}
/* Accueil 3 volets */
.disc3 { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.pane { display: flex; flex-direction: column; min-height: 0; background: var(--paper); border-right: 1px solid var(--line); }
.pane .top { background: var(--dawn-1); color: var(--on-dark); padding: 14px 16px 12px; border-bottom: 4px solid var(--sun); flex: none; }
.pane .top h1 { font-size: 28px; display: flex; align-items: center; gap: 10px; }
.pane .top .srow { display: flex; gap: 8px; margin-top: 10px; align-items: center; }
.pane .top .srow .search { flex: 1; min-width: 0; }
.pane .top .newbtn { min-height: 48px; padding: 0 14px; border-radius: 12px; background: var(--cta); color: var(--cta-ink); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; flex: none; box-shadow: var(--sh-cta); }
.pane .top .newbtn span { display: none; }
@container bureau (min-width: 400px) { .pane .top .newbtn span { display: inline; } }
.pane .filters { display: flex; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--line); align-items: center; flex: none; }
.pane .filters .chip { min-height: 36px; font-size: 14px; padding: 0 12px; box-shadow: none; background: var(--quiet-bg); }
.pane .filters .chip.on { background: var(--ink); color: var(--paper); }
.pane .filters .mapbtn { margin-left: auto; }
.pane .minimap { margin: 8px 12px 0; height: 130px; }
.convo { display: none; flex-direction: column; min-height: 0; background: var(--cream); position: relative; }
.convo.open { display: flex; }
.side { display: none; flex-direction: column; min-height: 0; background: var(--paper); border-left: 1px solid var(--line); }
.choose { flex: 1; display: none; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px; color: var(--muted); }
.choose .big { width: 112px; height: 112px; border-radius: 50%; background: var(--chip-bg); color: var(--dawn-2); display: grid; place-items: center; margin-bottom: 16px; }
.choose .big svg { width: 52px; height: 52px; }
.choose h2 { font-size: 30px; color: var(--ink); }
.choose p { margin: 8px 0 0; font-size: 18px; max-width: 40ch; }
.disc3[data-open="1"] .pane { display: none; }
.disc3[data-open="1"] .convo { display: flex; }
@container bureau (min-width: 1024px) {
  .disc3 { grid-template-columns: 380px minmax(0, 1fr); }
  .disc3[data-open="1"] .pane { display: flex; }
  .convo, .choose { display: flex; }
  .choose { grid-column: 2; }
  .disc3[data-open="1"] .choose { display: none; }
  .disc3:not([data-open="1"]) .convo { display: none; }
  .convo .chathead .ib.back { display: none; }
}
@container bureau (min-width: 1240px) {
  .disc3[data-open="1"] { grid-template-columns: 380px minmax(0, 1fr) 340px; }
  .disc3[data-open="1"] .side { display: flex; }
  .convo .chathead .ib.infos { display: none; }
}
.convo .chathead { border-bottom: 0; }
.bbar { display: flex; gap: 8px; padding: 10px 12px; background: var(--paper); border-bottom: 1px solid var(--line); flex: none; }
.bb { height: 56px; border-radius: 14px; font-weight: 700; font-size: 16px; white-space: nowrap; padding: 0 8px; display: flex; align-items: center; justify-content: center; gap: 6px; flex: 1 1 0; min-width: 0; background: var(--chip-bg); color: var(--ink); position: relative; }
.bb.hot { flex: 1.3 1 0; background: var(--cta); color: var(--cta-ink); box-shadow: var(--sh-cta); }
.bb .k { min-width: 24px; height: 24px; border-radius: 12px; background: var(--cta-ink); color: var(--cta); font-size: 14px; display: grid; place-items: center; padding: 0 6px; }
.bb:not(.hot) .k { background: var(--dawn-1); color: var(--on-dark); }
/* Volet droit Dossier / Infos */
.side .stabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); flex: none; }
.side .stabs button { min-height: 52px; font-weight: 700; color: var(--muted); position: relative; }
.side .stabs .on { color: var(--ink); }
.side .stabs .on::after { content: ''; position: absolute; left: 20%; right: 20%; bottom: 0; height: 3px; background: var(--cta); border-radius: 3px 3px 0 0; }
.side .sbody { flex: 1; overflow: auto; padding: 12px; display: grid; gap: 14px; align-content: start; }
.sblock h3 { font-size: 18px; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sblock h3 .n { margin-left: auto; font: 600 13px var(--font-sans); color: var(--muted); }
.sblock h3 .tgl { margin-left: 6px; font: 600 12.5px var(--font-sans); color: var(--violet); }
.gal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gal .ph { aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg, var(--cream-2), var(--line-2)); display: grid; place-items: center; color: var(--muted); font-size: 12px; text-align: center; padding: 4px; }
.gal .ph img { width: 100%; height: 100%; object-fit: cover; }
.frow { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 4px 8px; border-radius: 10px; width: 100%; text-align: left; font-weight: 600; font-size: 15px; }
.frow:hover { background: var(--hover-bg); }
.frow .n { margin-left: auto; color: var(--muted); font-weight: 600; font-size: 13.5px; }
.frow .fi { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--chip-bg); color: var(--dawn-2); flex: none; }
.rrow { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; font-weight: 600; }
.rrow .cnt { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14px; }
.rrow .cnt.ok { color: var(--ok-ink); }
.rrow .cnt.todo { color: var(--warn-ink); }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 10px; font-size: 15px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; font-weight: 600; }
.prog { display: grid; gap: 6px; }
.prog .pl { display: flex; justify-content: space-between; font-size: 14px; }
.assist { align-self: stretch; background: var(--paper); border-radius: 16px; padding: 12px 14px; box-shadow: var(--sh-1); display: grid; gap: 8px; }
.assist h3 { font-size: 17px; display: flex; gap: 6px; align-items: center; color: var(--dawn-2); }
.assist ul { margin: 0; padding-left: 18px; font-size: 15px; display: grid; gap: 4px; }

/* Pages bureau génériques (À faire, journal, modules) */
.page { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.band { background: var(--sky); color: var(--on-dark); padding: 12px 12px 16px; flex: none; }
.band .line { display: flex; align-items: center; gap: 4px; min-height: 52px; }
.band h1 { flex: 1; min-width: 0; font-size: 28px; line-height: 1.1; }
.band .sub { margin: 2px 0 0; font-size: 15px; color: var(--band-text); }
.band .acts { display: none; gap: 8px; align-items: center; }
.band .stats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.band .stats span { background: var(--pill-bg); border-radius: 99px; padding: 4px 10px; font-size: 13.5px; font-weight: 600; }
@container bureau (min-width: 1024px) {
  .band { padding: 22px 40px; }
  .band h1 { font-size: 36px; }
  .band .acts { display: flex; }
  .band .back { display: none; }
}
.wrap { flex: 1; overflow: auto; padding: 12px 12px 90px; }
@container bureau (min-width: 1024px) { .wrap { padding: 24px 40px 60px; } .wrap.narrow { max-width: 1100px; } }
.stack { display: grid; gap: 12px; align-content: start; grid-template-columns: minmax(0, 1fr); }
.task { display: flex; gap: 12px; align-items: center; background: var(--paper); border-radius: 18px; padding: 12px; box-shadow: var(--sh-1); animation: rise .4s var(--ease-out); }
.task .ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex: none; background: var(--chip-bg); color: var(--dawn-2); }
.task .ic.hot { background: var(--cta); color: var(--cta-ink); }
.task .mid { flex: 1; min-width: 0; }
.task b { display: block; font-size: 17px; }
.task .mid p { margin: 2px 0 0; font-size: 15px; color: var(--muted); }
.task .mid p.warn { color: var(--warn-ink); font-weight: 600; }
.task .go { margin-left: auto; min-height: 48px; padding: 0 14px; border-radius: 12px; background: var(--chip-bg); font-weight: 700; display: grid; place-items: center; white-space: nowrap; flex: none; }
.task.done { background: var(--paper-tint); box-shadow: none; }
.task.done .ic { background: var(--ok-bg); color: var(--ok); }
.task.locked { opacity: .75; }
.done-state { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.done-state .big { width: 128px; height: 128px; border-radius: 50%; background: var(--ok-bg); display: grid; place-items: center; color: var(--ok); margin-bottom: 18px; box-shadow: 0 0 0 12px var(--ok-glow); animation: rise .6s var(--ease-out); }
.done-state .big svg { width: 64px; height: 64px; stroke-width: 3; }
.done-state h2 { font-size: 34px; }
.done-state p { font-size: 18px; color: var(--muted); margin: 8px 0 0; }
.done-state .saved { margin-top: 18px; font: 700 48px/1 var(--font-cond); color: var(--dawn-1); }
.foot-cta { position: absolute; left: 0; right: 0; bottom: 72px; z-index: 20; padding: 10px 12px 12px; background: linear-gradient(0deg, var(--cream) 70%, transparent); }
@container bureau (min-width: 1024px) { .foot-cta { bottom: 0; padding: 12px 40px 20px; } .foot-cta.mobile { display: none; } .foot-cta > * { max-width: 1100px; margin-left: 0; } }
.foot-cta .hint { display: block; margin-bottom: 6px; }
.vitem { background: var(--paper); border-radius: 16px; padding: 12px; box-shadow: var(--sh-1); display: grid; gap: 6px; }
.vitem .q { font-size: 14px; color: var(--muted); font-weight: 600; }
.vitem .v { font-size: 20px; font-weight: 700; }
.vitem .cite { font-size: 14.5px; color: var(--ink-2); font-style: italic; }
.vitem .acts { display: flex; gap: 8px; margin-top: 4px; }
.vitem .acts .btn { flex: 1; }
.stepper { display: flex; gap: 4px; align-items: center; font-size: 13px; font-weight: 700; color: var(--muted); flex-wrap: wrap; }
.stepper span { padding: 4px 10px; border-radius: 99px; background: var(--quiet-bg); }
.stepper span.done { background: var(--ok-bg); color: var(--ok-ink); }
.stepper span.now { background: var(--cta); color: var(--cta-ink); }
.jblock h3 { font-size: 18px; margin: 12px 0 6px; }
.jline { display: flex; gap: 8px; font-size: 15px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.jline .t { color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.jline .a { color: var(--muted); margin-left: auto; flex: none; }
.pill-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--paper); border-radius: 14px; overflow: hidden; }
.table th { text-align: left; font: 600 12.5px var(--font-sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 2px solid var(--line); }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.first { margin: 12px; background: var(--paper); border-radius: 20px; box-shadow: var(--sh-1); padding: 16px 16px 12px; border-top: 5px solid var(--cta); }
.first .hd { display: flex; align-items: baseline; gap: 8px; }
.first h2 { font-size: 24px; flex: 1; }
.first .k { font-size: 15px; font-weight: 700; color: var(--muted); }
.first .bar { margin: 8px 0 6px; }
.step { display: flex; align-items: center; gap: 12px; min-height: 64px; border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: 0; }
.step .dot2 { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font: 700 18px var(--font-cond); flex: none; background: var(--quiet-bg); color: var(--ink); }
.step.done .dot2 { background: var(--ok); color: var(--on-dark); }
.step.now .dot2 { background: var(--cta); color: var(--cta-ink); }
.step .lbl { flex: 1; min-width: 0; font-size: 17px; font-weight: 600; }
.step.done .lbl { color: var(--muted); }
.step .lbl small { display: block; font-size: 14px; font-weight: 500; color: var(--muted); }
.step .btn { min-height: 48px; padding: 0 16px; font-size: 16px; }
.pop { position: absolute; right: 12px; top: 62px; z-index: 35; width: 280px; background: var(--paper); border-radius: 16px; box-shadow: var(--sh-float); padding: 6px; color: var(--ink); }
.pop button { width: 100%; min-height: 56px; border-radius: 12px; display: flex; align-items: center; gap: 12px; padding: 0 12px; font-size: 17px; font-weight: 600; text-align: left; }
.pop button:hover { background: var(--hover-bg); }
.pop .n { margin-left: auto; color: var(--muted); font-weight: 600; }
.money { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.money .m { background: var(--paper); border-radius: 14px; padding: 10px 12px; box-shadow: var(--sh-1); }
.money .m .k { font-size: 13px; font-weight: 600; color: var(--muted); }
.money .m .v { font: 700 24px/1.1 var(--font-cond); }
.money .m.bad .v { color: var(--alert); }
.money .m.good .v { color: var(--ok); }
.pass { background: var(--paper); border-radius: 18px; box-shadow: var(--sh-1); padding: 18px; text-align: center; }
.pass .who { font-size: 15px; color: var(--muted); }
.pass .id { font-size: 20px; font-weight: 700; margin: 2px 0 14px; }
.pass .lbl { font-size: 15px; font-weight: 700; color: var(--muted); }
.pass .pw { font: 700 44px/1.1 var(--font-cond); letter-spacing: .08em; margin: 6px 0 2px; padding: 10px 6px; border-radius: 14px; background: var(--warn-bg); color: var(--ink); }
.pass .spell { font-size: 14px; color: var(--muted); }
.acts3 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.acts3 .btn:last-child { grid-column: 1 / -1; }
.irow { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.irow:last-child { border-bottom: 0; }
.irow .st { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 800; }
.st.ok { background: var(--ok-bg); color: var(--ok); } .st.warn { background: var(--warn-bg); color: var(--warn-ink); } .st.same { background: var(--quiet-bg); color: var(--muted); font-size: 20px; }
.irow .mid { flex: 1; min-width: 0; }
.irow b { display: block; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.irow .mid > span { display: block; font-size: 14.5px; color: var(--muted); }
.irow .mid > span.why { color: var(--warn-ink); font-weight: 600; }
.lane { display: grid; gap: 10px; }
.trip { background: var(--paper); border-radius: 16px; box-shadow: var(--sh-1); padding: 12px 14px; display: grid; gap: 8px; }
.track { position: relative; height: 28px; }
.track::before { content: ''; position: absolute; left: 6px; right: 6px; top: 13px; height: 3px; background: var(--quiet-bg); border-radius: 2px; }
.track .tk { position: absolute; top: 1px; width: 26px; height: 26px; margin-left: -13px; color: var(--dawn-1); transition: left .6s var(--ease-out); }
.track .mk { position: absolute; top: 9px; width: 11px; height: 11px; margin-left: -5px; border-radius: 50%; background: var(--line-2); }
.track .mk.done { background: var(--ok); }
.track-l { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--muted); }
.print-only { display: none; }
@media print {
  body { background: var(--paper); overflow: visible; }
  .demobar, .demobar-mini, .stage > *:not(.print-area) { display: none !important; }
  .print-area { display: block !important; position: static; padding: 24px; font-size: 13px; }
  .print-only { display: block; }
}

/* ===== lot4 carte ===== */
/* Bandeau carte en haut des discussions (terrain ouvert par défaut, bureau replié) */
.mapstrip { flex: none; background: var(--paper); border-bottom: 1px solid var(--line); }
.mapstrip .strip-head { display: flex; align-items: center; gap: 6px; padding: 4px 8px; }
.mapstrip .strip-toggle { flex: 1; min-width: 0; overflow: hidden; min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 8px; border-radius: 12px; font-size: 16px; color: var(--ink); text-align: left; }
.mapstrip .strip-toggle b { font-weight: 700; }
.mapstrip .strip-toggle span { color: var(--muted); font-weight: 500; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mapstrip .strip-toggle:hover { background: var(--quiet-bg); }
.mapstrip .strip-grow { min-height: 44px; padding: 0 12px; border-radius: 12px; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; color: var(--dawn-1); background: var(--quiet-bg); flex: none; }
.mapstrip .strip-map { position: relative; height: 130px; margin: 0 12px 10px; border-radius: 14px; overflow: hidden; border: 2px solid var(--line); background: var(--cream-2); }
.mapstrip .strip-map .leaflet-container { width: 100%; height: 100%; font: inherit; }
.mapstrip .mapnote.small { top: auto; bottom: 6px; left: 6px; font-size: 12.5px; padding: 3px 8px; }
.terrain .top .sub { font-size: 15px; color: var(--band-text); margin-top: 2px; }
.pane .top .sub { font-size: 15px; color: var(--band-text); margin-top: 2px; }
/* ===== /lot4 carte ===== */

/* ===== lot4 regard ===== */
/* Lisibilité « avec des gants » : texte courant ≥ 17 px terrain, ≥ 16 px bureau (méta, étiquettes et tags gardent leur taille) */
.terrain .drow .mid p, .terrain .row .mid p, .terrain .b, .terrain .field, .terrain .check, .terrain .coach, .terrain .morning span, .terrain .hentry .l2, .terrain .today .s2, .terrain .mapcard p, .terrain .banner, .terrain .empty p, .terrain .kv, .terrain .task .mid p { font-size: 17px; }
.terrain .top .sub, .terrain .sys, .terrain .violet-hint, .terrain .fixnote, .terrain .b .resolved, .terrain .b .fail, .terrain .b .photo, .terrain .b .audio .tr, .terrain .draft, .terrain .footnote, .terrain .toast, .terrain .chathead .t span, .terrain .onsite span, .terrain .fixbar .note { font-size: 16px; }
.terrain .sect, .terrain .drow .end, .terrain .today .k, .terrain .hday { font-size: 15px; }
.bureau .row .mid p, .bureau .task .mid p, .bureau .field, .bureau .banner, .bureau .kv, .bureau .frow, .bureau .rrow, .bureau .assist ul, .bureau .mapcard p, .bureau .empty p, .bureau .b, .bureau .coach, .bureau .toast, .bureau .band .sub, .bureau .pane .top .sub, .bureau .check, .bureau .guided .t, .bureau .guided .ghd, .bureau .guided .gend { font-size: 16px; }
.bureau .sys, .bureau .b .resolved, .bureau .b .fail, .bureau .b .photo, .bureau .b .audio .tr, .bureau .draft, .bureau .prog .pl, .bureau .vitem .q, .bureau .bb .k, .bureau .more span { font-size: 15px; }
.sheet > header .t p { font-size: 16px; }
/* textes de lecture qui restaient sous le seuil (rendu.mjs STRICT) */
.terrain .top .sub, .terrain .sheet > header .t p, .terrain .chathead .t span, .terrain .chathead .t span.warn, .terrain .row .mid p span, .terrain .sheet .body p, .terrain .avis p { font-size: 17px; }
.terrain .steps-l, .bureau .steps-l { font-size: 12.5px; }
.bureau .chathead .t span, .bureau .more span, .bureau .irow, .bureau .irow span, .bureau .drop p, .bureau .dropzone p, .bureau .vitem .banner.warn, .bureau .banner.warn, .bureau .table td, .bureau .xtra, .bureau .pdf p, .bureau .doc-lines p, .bureau .sheet .body p, .bureau .kv span, .bureau .empty p, .bureau .choose p { font-size: 16px; }
.bureau .tgl { font-size: 14px; }
/* dernière passe : audio transcrite, tuiles Dossiers, « Ta journée », galerie, citations, aperçu d'accès, bon de livraison, devis */
.terrain .b .audio .tr, .terrain .tile .l, .terrain .today .s, .terrain .ucard p, .terrain .fixnote, .terrain .fixnote span { font-size: 17px; }
.bureau .b .audio .tr, .bureau .gal .n, .bureau .sblock .n, .bureau .vitem .cite, .bureau .jblock span, .bureau .jblock li, .bureau .pass .preview, .bureau .tcard span, .bureau .trip span, .bureau .trip .done, .bureau .apercu-doc p, .bureau .docview p, .bureau .fa-meta span, .bureau .fa-meta, .bureau .sheet .body span.muted, .bureau .sheet .body .hint-lg { font-size: 16px; }
.terrain .onsite span { font-size: 17px; }
.bureau .vitem .q { font-size: 16px; }
.terrain .sys, .terrain .sys.go { font-size: 17px; }
.bureau .pass .lbl { font-size: 16px; }
.terrain .violet-hint { font-size: 17px; }
.bureau .violet-hint { font-size: 16px; }
.terrain .hday { font-size: 17px; }
.bureau .eq-row b, .bureau .eq-membre b, .bureau .row .mid b, .bureau table.table td b { font-size: 16px; }
.bureau .table { font-size: 16px; }
.terrain .today div, .terrain .hweek div, .terrain .wsum div { font-size: 17px; }
.terrain .today .k, .terrain .hweek .k, .terrain .wsum .k { font-size: 15px; }
.bureau .row .mid p b { font-size: 16px; }
.terrain .hentry .l1, .terrain .hentry .l1 span { font-size: 17px; }
.terrain .footnote { font-size: 17px; }
.bureau .card .row .mid p b, .bureau .row .mid p > b { font-size: 16px !important; }
/* ===== /lot4 regard ===== */

/* ===== lot4 planning ===== */
/* B18c — vue Jour du planning en calendrier vertical (type Google / Outlook). Les blocs gardent .pl-bar (tests lot 2) ; les règles
   .cal-col .pl-bar.cal-ev battent le <style id="pl-style"> du module par leur spécificité. Couleurs : jetons seulement. */
.cal-sub { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.cal-mode { flex: 0 0 auto; min-width: 300px; }
.cal-mode button { min-height: 40px; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; min-width: 0; }
.cal-legend .hint { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; }
.cal-legend .hint b { color: var(--ink); }
.cal-legend i { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.cal-wrap { background: var(--paper); border-radius: 14px; box-shadow: var(--sh-1); min-width: 0; overflow: hidden; --cal-hw: 64px; --cal-cw: 120px; }
.cal-scroll { overflow: auto; max-height: min(72vh, 780px); overscroll-behavior: contain; }
.cal-inner { min-width: calc(var(--cal-hw) + var(--cal-n) * var(--cal-cw)); }
.cal-head, .cal-body { display: grid; grid-template-columns: var(--cal-hw) repeat(var(--cal-n), minmax(var(--cal-cw), 1fr)); }
.cal-head { position: sticky; top: 0; z-index: 4; background: var(--paper-tint); border-bottom: 2px solid var(--line); }
.cal-corner { position: sticky; left: 0; z-index: 5; background: var(--paper-tint); border-right: 1px solid var(--line); }
.cal-ch { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 6px 8px; font-size: 16px; border-left: 1px solid var(--line); min-width: 0; }
.cal-ch b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cal-ch .code { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font: 700 12px var(--font-cond); color: var(--on-dark); flex: none; }
.cal-body { position: relative; }
.cal-hours { position: sticky; left: 0; z-index: 3; background: var(--paper); border-right: 1px solid var(--line); height: var(--cal-hh); }
.cal-h { position: absolute; right: 6px; transform: translateY(-50%); font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.cal-hours .cal-h:first-child { transform: none; top: 2px !important; }
.cal-now-t { position: absolute; right: 4px; transform: translateY(-50%); font-size: 13px; font-weight: 700; color: var(--on-dark); background: var(--alert); border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.cal-col { position: relative; border-left: 1px solid var(--line); min-width: 0; }
.cal-hr { display: block; height: 56px; border-top: 1px solid var(--line); position: relative; }
.cal-hr::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px dashed var(--line-2); opacity: .6; }
.cal-hr.cal-cur { background: var(--todo-bg); }
.cal-now { position: absolute; left: var(--cal-hw); right: 0; height: 2px; background: var(--alert); z-index: 2; pointer-events: none; }
.cal-now::before { content: ''; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--alert); }
.cal-col .pl-bar.cal-ev { position: absolute; display: block; margin: 0 0 0 2px; padding: 5px 7px; min-height: 0; border-radius: 8px; font-size: 16px; line-height: 1.2; text-align: left; overflow: hidden; z-index: 1; box-shadow: var(--sh-1); container-type: normal; }
.cal-col .pl-bar.cal-ev span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; overflow: hidden; }
.cal-col .pl-bar.cal-ev.cal-short { padding-top: 2px; padding-bottom: 2px; }
.cal-col .pl-bar.cal-ev.cal-short span { -webkit-line-clamp: 1; }
.cal-col .pl-bar.cal-ev .cal-code { display: inline-flex; margin-top: 4px; max-width: 100%; background: var(--stamp-bg); color: var(--ink); font-size: 12.5px; }
.cal-col .pl-bar.cal-ev.cal-short .cal-code { display: none; }
.cal-col .pl-bar.cal-ev.cal-cut-t { border-top-left-radius: 0; border-top-right-radius: 0; }
.cal-col .pl-bar.cal-ev.cal-cut-b { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.cal-col .pl-bar.cal-ev[aria-pressed="true"] { outline: 3px solid var(--cta); outline-offset: 1px; z-index: 2; box-shadow: var(--sh-cta); }
@container bureau (max-width: 1023px) { .cal-wrap { --cal-cw: 140px; --cal-hw: 56px; } .cal-scroll { max-height: min(62vh, 640px); } .cal-mode { min-width: 0; flex: 1 1 100%; } }
/* ===== /lot4 planning ===== */

/* ===== lot4 forms-bureau ===== */
/* Formulaires (bureau) : lignes lisibles, tuiles de familles, cartes de modèles « Utiliser tel quel » / « Adapter » */
.fo-tabs { margin: 0 0 12px; max-width: 560px; }
@container bureau (max-width: 700px) { .fo-tabs button { font-size: 16px; padding: 4px 6px; line-height: 1.15; text-align: center; } .fo-tabs button .c { display: none; } }
.fo-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.fo-bar .link { margin-left: auto; }
.fo-lead { font-size: 16px; color: var(--muted); margin: 0 0 10px; }
.fo-title { font-size: 22px; margin: 4px 0 2px; }
.fo-row b, .fo-card b { font-size: 18px; }
.fo-row .mid p, .fo-card .mid p { font-size: 16px; }
.fo-row .fo-etat { color: var(--ink); font-weight: 600; }
.fo-row .fo-etat.warn { color: var(--warn-ink); }
.fo-sig { width: 64px; height: 32px; object-fit: contain; background: var(--paper); border-radius: 6px; flex: none; }
.fo-acts { display: flex; gap: 8px; align-items: center; flex: none; }
.fo-acts .btn { min-height: 44px; padding: 0 14px; font-size: 16px; border-radius: 12px; white-space: nowrap; }
.fo-search { margin-bottom: 12px; }
.fo-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@container bureau (min-width: 1024px) { .fo-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fo-tile { display: flex; align-items: center; gap: 12px; min-height: 76px; padding: 10px 12px; background: var(--paper); border-radius: 16px; box-shadow: var(--sh-1); text-align: left; color: var(--ink); }
.fo-tile .mid { flex: 1; min-width: 0; }
.fo-tile b { display: block; font-size: 17px; line-height: 1.2; }
.fo-tile .fo-n { display: block; font-size: 16px; color: var(--muted); margin-top: 2px; }
.fo-tile > svg { color: var(--icon-faint); flex: none; }
.fo-crumb { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; flex-wrap: wrap; }
.fo-crumb .fo-path { display: inline-flex; align-items: center; gap: 6px; font-size: 18px; }
.fo-crumb .fo-path .link { font-size: 18px; min-height: 44px; padding: 0; }
.fo-crumb .fo-path .sep { color: var(--muted); }
.fo-crumb .fo-path b { font-family: var(--font-cond); font-size: 24px; }
.fo-crumb .fo-n { font-size: 16px; color: var(--muted); margin-left: auto; }
.fo-card { flex-wrap: wrap; cursor: pointer; }
.fo-card .fo-keys { color: var(--ink); }
.fo-card .fo-side { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; width: 100%; padding-left: 60px; }
.fo-card .fo-side .fo-acts { margin-left: auto; }
@container bureau (min-width: 1024px) { .fo-card { flex-wrap: nowrap; } .fo-card .fo-side { width: auto; padding-left: 0; flex: none; justify-content: flex-end; } }
/* ===== /lot4 forms-bureau ===== */

/* ===== lot4 planning (suite) ===== */
/* Vue Jour : le calendrier prend exactement la hauteur restante de la page (flex-basis 0 → défilement interne, ligne « maintenant »
   amenée dans le cadre par after()), comme Google Agenda. Repli sans :has() = max-height du bloc précédent. */
.stack:has(> .cal-wrap) { display: flex; flex-direction: column; min-height: 100%; }
.stack:has(> .cal-wrap) > .cal-wrap { flex: 1 1 0; min-height: 360px; display: flex; flex-direction: column; }
.stack:has(> .cal-wrap) .cal-scroll { flex: 1 1 auto; min-height: 0; max-height: none; }
@container bureau (max-width: 1023px) { .stack:has(> .cal-wrap) > .cal-wrap { min-height: 440px; } }
/* Texte du bloc en haut (un <button> centre son contenu) et collant sous l'entête : le titre d'un long bloc reste visible au défilement */
.cal-col .pl-bar.cal-ev { display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; }
.cal-col .pl-bar.cal-ev .cal-txt { display: block; position: sticky; top: 62px; min-width: 0; -webkit-line-clamp: unset; }
/* ===== /lot4 planning (suite) ===== */

/* ===== lot4 forms-bureau (suite) ===== */
/* Tuiles de familles à 375 : icône au-dessus du nom, compteur sur une ligne, sans chevron */
@container bureau (max-width: 700px) {
  .fo-tile { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; min-height: 120px; }
  .fo-tile .mid { width: 100%; }
  .fo-tile .fo-n { white-space: nowrap; }
  .fo-tile > svg { display: none; }
  .fo-crumb .fo-n { margin-left: 0; width: 100%; padding-left: 58px; }
}
/* ===== /lot4 forms-bureau (suite) ===== */

/* ===== lot4 heures ===== */
/* B18a Paie : barre d'action, note repliée, une carte par salarié (trois gros chiffres), tableau global · B18b Heures : carte lisible, une ligne par jour */
.pay-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-bottom: 12px; }
.pay-export { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.pay-hint { flex-basis: 100%; font-size: 16px; font-weight: 600; color: var(--muted); }
.pay-note { flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 16px; margin-bottom: 12px; }
.pay-note .l { display: inline-flex; align-items: center; gap: 8px; }
.pay-note .txt { flex-basis: 100%; font-weight: 500; line-height: 1.4; }
.pay-note .link { margin-left: auto; min-height: 40px; font-size: 16px; color: var(--warn-ink); }
.pay-card { padding: 14px 16px; display: grid; gap: 12px; }
.pay-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pay-who { flex: 1; min-width: 180px; display: grid; gap: 2px; }
.pay-who b { font-size: 19px; line-height: 1.15; }
.pay-who span { font-size: 16px; color: var(--muted); }
.pay-state { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 12px; margin-left: auto; }
.pay-state .tag { font-size: 15px; padding: 6px 12px; }
.pay-msg { margin: 0; font-size: 17px; font-weight: 700; color: var(--warn-ink); }
.pay-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; }
.pn { background: var(--paper-tint); border-radius: 12px; padding: 8px 12px; display: grid; gap: 2px; align-content: start; }
.pn .k { font-size: 16px; font-weight: 600; color: var(--muted); }
.pn .v { font: 700 30px/1.1 var(--font-cond); font-variant-numeric: tabular-nums; color: var(--ink); }
.pn.total .v { color: var(--dawn-2); }
.pay-exc { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pay-exc li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 16px; font-weight: 600; padding: 8px 12px; border-radius: 10px; }
.pay-exc li.warn { background: var(--warn-bg); color: var(--warn-ink); }
.pay-exc li.info { background: var(--info-bg); color: var(--info-ink); }
.pay-exc li .link { margin-left: auto; min-height: 36px; font-size: 16px; }
.pay-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pay-tot { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 12px; }
.pay-tot .m { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 8px 12px; }
.pay-tot .m .k { font-size: 16px; }
.pay-tot .m .v { font-size: 22px; }
.pay-scroll { overflow-x: auto; }
.pay-table { font-size: 16px; border-radius: 0; }
.pay-table td { padding: 12px; }
.pay-table tfoot td { border-top: 2px solid var(--line); background: var(--paper-tint); }
.pay-etat { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 16px; white-space: nowrap; }
.pay-etat::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: currentColor; flex: none; }
.pay-etat.ok { color: var(--ok); }
.pay-etat.warn { color: var(--warn-icon); }
.pay-detail .table { font-size: 16px; }
.pay-card .btn.sm, .hr-card .btn.sm { font-size: 16px; }
@container bureau (max-width: 700px) { .pay-table .c-sup { display: none; } .pay-table td, .pay-table th { padding: 10px 8px; } .pay-tot .m .v { font-size: 20px; } }
@container bureau (max-width: 480px) { .pay-table .c-reg { display: none; } }
.hr-card { padding: 14px 16px; display: grid; gap: 10px; }
.hr-head { display: flex; align-items: center; gap: 12px; }
.hr-who { flex: 1; min-width: 0; display: grid; gap: 4px; }
.hr-who b { font-size: 19px; line-height: 1.15; }
.hr-who > span { font-size: 16px; color: var(--muted); }
.hr-who .chips { gap: 6px; }
.hr-total { font: 700 30px/1.1 var(--font-cond); font-variant-numeric: tabular-nums; white-space: nowrap; flex: none; color: var(--ink); }
.hr-jours { list-style: none; margin: 0; padding: 0; display: grid; }
.hr-jour { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 16px; min-height: 38px; border-top: 1px solid var(--line); }
.hr-jour .j { font-weight: 700; width: 36px; }
.hr-jour b { font-variant-numeric: tabular-nums; }
.hr-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding-top: 2px; }
.hr-foot .btn-ok { min-height: 48px; }
.hr-foot .hr-raison { flex-basis: 100%; font-size: 16px; color: var(--muted); }
.hr-detail { border-top: 2px solid var(--line); }
/* ===== /lot4 heures ===== */

/* ===== lot4 dire ===== */
.dire { display: grid; gap: 10px; border: 2px solid var(--cta); }
.dire .dire-t { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 800; color: var(--ink); }
.dire .hint.ex { margin: 0; font-size: 15px; color: var(--muted); font-weight: 500; line-height: 1.35; }
.dire-row { display: flex; gap: 12px; align-items: stretch; }
.dire-row .input { flex: 1; min-height: 64px; resize: vertical; }
.dire-mic { width: 64px; height: 64px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--cta); color: var(--cta-ink); box-shadow: var(--sh-cta); }
.dire-mic.rec { animation: ring 1s infinite; background: var(--alert-bg); color: var(--alert); box-shadow: none; }
.compris-band { align-items: flex-start; }
.compris-band > span:last-child { display: grid; gap: 6px; min-width: 0; }
.compris-list { display: grid; gap: 4px; font-weight: 500; }
.compris-list .ci { display: block; line-height: 1.35; }
.compris-list .ci b { font-weight: 800; }
.field.compris .input, .field.compris .check, .field.compris .chip[aria-checked="true"], .field.compris .sigpad { border-color: var(--ok); background: var(--ok-bg); }
.field.compris .chip[aria-checked="true"] { color: var(--ok-ink); }
.question { display: grid; gap: 10px; border-left: 6px solid var(--cta); }
.question .q { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 800; color: var(--ink); }
.question.ok { border-left-color: var(--ok); }
.question.ok .q { color: var(--ok-ink); }
.question .hint { margin: 0; }
.question .chips { gap: 8px; }
.dire-inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.dire-inline .input { flex: 1; min-width: 140px; }
.dire-inline .chip { flex: none; }
.dire-rien { align-items: flex-start; }
.terrain .dire .dire-t, .terrain .question .q { font-size: 20px; }
.terrain .dire .hint.ex { font-size: 17px; }
.terrain .compris-band, .terrain .compris-list, .terrain .dire-rien, .terrain .question .hint { font-size: 17px; }
.terrain .sigpad .clear { min-height: 44px; min-width: 64px; }
.sigpad.pulse { animation: ring 1s 2; border-color: var(--cta); }
.bureau .dire .hint.ex, .bureau .compris-list, .bureau .question .hint { font-size: 16px; }
/* ===== /lot4 dire ===== */

/* ===== lot5 infos-terrain ===== */
.terrain .tinfos b, .terrain .tinfos dd { font-size: 17px; }
.terrain .tinfos h3 { font-size: 19px; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.terrain .tinfos .kv { font-size: 17px; grid-template-columns: 104px 1fr; }
.terrain .tinfos .prog .pl { display: flex; justify-content: space-between; font-size: 16px; margin-top: 8px; }
.pay-etat.info { color: var(--info-ink); }
.hr-table td.quiet { color: var(--muted); }
/* ===== /lot5 infos-terrain ===== */
