/* 1. LES ECRANS PRODUIT DE LA VITRINE : recrees en HTML, pas... : voir notes/demo.notes.md §1 */

.demo {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 30px 70px -40px rgba(10, 12, 24, .45);
  overflow: hidden;
}
[data-theme='dark'] .demo, .demo-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--subtle);
}
.demo-title { font-size: 13px; font-weight: 600; letter-spacing: -0.01em; }
.demo-sub { font-size: 12px; color: var(--faint); margin-left: auto; font-family: var(--font-data); }
/* voir notes/demo.notes.md §2 */
.demo-body { padding: 18px; min-height: 530px; }
.screen { display: none; }
.screen.is-on { display: block; animation: screenIn .45s var(--ease) both; }
@keyframes screenIn { from { opacity: 0; transform: translateY(10px) scale(.995); } to { opacity: 1; transform: none; } }

/* --- Bandeau de chiffres commun aux ecrans -------------------------------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(130px, 100%), 1fr)); gap: 10px; margin-bottom: 16px; }
.kpi { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--page); }
.kpi span { display: block; font-size: 11.5px; color: var(--faint); }
.kpi b { display: block; margin-top: 3px; font-family: var(--font-data); font-size: 21px; font-weight: 620; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi.is-accent b { color: var(--accent-strong); }

/* --- ECRAN 1 : le planning qui se remplit --------------------------------- */
.plan { display: grid; grid-template-columns: 46px repeat(8, minmax(0, 1fr)); gap: 3px; }
.plan-h { font-family: var(--font-data); font-size: 10.5px; color: var(--faint); text-align: center; padding-bottom: 4px; }
.plan-t { font-family: var(--font-data); font-size: 10.5px; color: var(--faint); text-align: right; padding-right: 6px; line-height: 26px; }
.cell { height: 26px; border-radius: 4px; background: var(--subtle); position: relative; }
.slot {
  position: absolute; inset: 1px;
  border-radius: 4px;
  border-left: 2px solid var(--accent);
  background: var(--accent-soft);
  font-size: 10.5px;
  line-height: 1.15;
  padding: 3px 5px;
  overflow: hidden;
  color: var(--accent-strong);
  font-weight: 550;
  /* voir notes/demo.notes.md §3 */
  white-space: nowrap;
  text-overflow: ellipsis;
}
/* voir notes/demo.notes.md §4 */
.slot.is-warm { border-left-color: #d97706; background: color-mix(in srgb, #d97706 12%, transparent); color: #ac4f08; }
.slot.is-green { border-left-color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); }
/* Le creux : c'est LE sujet du produit, il doit attirer l'oeil sans crier. */
.cell.is-gap { background: transparent; border: 1px dashed color-mix(in srgb, var(--accent) 45%, var(--line)); animation: gapPulse 2.4s ease-in-out infinite; }
@keyframes gapPulse { 0%, 100% { border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); } 50% { border-color: var(--accent); } }
/* voir notes/demo.notes.md §5 */
.cell.is-scan {
  background: color-mix(in srgb, var(--accent) 16%, var(--subtle));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent);
  transition: background-color .12s linear, box-shadow .12s linear;
}
/* La case retenue, elle, reste allumee jusqu'a ce que la reservation s'y pose. */
.cell.is-found {
  background: color-mix(in srgb, var(--ok) 14%, var(--subtle));
  box-shadow: inset 0 0 0 1.5px var(--ok);
}

/* voir notes/demo.notes.md §6 */
.cell.is-blocked {
  background: repeating-linear-gradient(45deg,
    var(--subtle) 0 5px, color-mix(in srgb, var(--faint) 22%, transparent) 5px 10px);
}
/* voir notes/demo.notes.md §7 */
.slot.is-moving { transition: opacity .38s var(--m-ease), transform .38s var(--m-ease);
  opacity: .25; transform: scale(.94); }

/* voir notes/demo.notes.md §8 */
.gap-tag {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  white-space: nowrap; font-size: 10px; font-weight: 600; color: var(--accent-strong);
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  padding: 1px 7px; border-radius: var(--radius-full); z-index: 2;
}

/* --- ECRAN 2 : les reservations ------------------------------------------
   REFAIT le 2026-08-13, apres confrontation ligne a ligne avec l'ecran reel
   (releve dans staff-pages-v2.js, fonction renderStaffReservationsPage).
   L'ancienne scene dessinait une boite de reception filtrable : une barre de
   recherche, une colonne « canal », des etats « A valider » et « Nouveau ».
   Rien de tout cela n'existe. L'ecran reel est un COCKPIT : quatre cartes de
   statistiques, un calendrier du mois en carte de chaleur a gauche, et le flux
   d'UNE journee a droite, trie par heure. C'est ce qu'on dessine maintenant. */
.rs-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 12px; align-items: start; }
.rs-panel { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--page); overflow: hidden; }
.rs-ph { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.rs-ph b { font-size: 12.5px; font-weight: 640; }
.rs-ph span { font-size: 10.5px; color: var(--faint); }
.rs-dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; padding: 8px 10px 0; }
.rs-dow span { font-size: 9.5px; color: var(--faint); text-align: center; font-family: var(--font-data); letter-spacing: .03em; }
.rs-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; padding: 6px 10px 10px; }
.rs-day {
  aspect-ratio: 1 / .82; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--page); padding: 4px 5px; display: flex; flex-direction: column; justify-content: space-between;
  transition: background-color .3s var(--m-ease), border-color .3s var(--m-ease), transform .25s var(--m-ease);
}
.rs-day b { font-family: var(--font-data); font-size: 10.5px; font-weight: 600; color: var(--muted); }
.rs-day i { font-family: var(--font-data); font-size: 9px; font-style: normal; color: var(--faint); }
.rs-day.lv1 { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.rs-day.lv2 { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.rs-day.lv3 { background: color-mix(in srgb, var(--accent) 32%, transparent); }
.rs-day.is-sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); transform: scale(1.06); }
.rs-day.is-void { border-color: transparent; background: transparent; }
.rs-flow { display: flex; flex-direction: column; }
.rs-line {
  display: grid; grid-template-columns: 46px 1fr auto; gap: 10px; align-items: center;
  padding: 9px 12px; border-top: 1px solid var(--line); font-size: 12.5px;
}
.rs-line:first-child { border-top: 0; }
.rs-line.is-new { background: var(--accent-soft); }
.rs-h { font-family: var(--font-data); font-variant-numeric: tabular-nums; }
.rs-h b { display: block; font-size: 12.5px; font-weight: 620; }
.rs-h i { display: block; font-size: 10px; font-style: normal; color: var(--faint); }
.rs-who { min-width: 0; }
.rs-who b { display: block; font-size: 12.5px; font-weight: 620; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-who span { display: block; font-size: 10.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 860px) {
  .rs-split { grid-template-columns: 1fr; }
}
.tag { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: var(--radius-full); white-space: nowrap; }
.tag.web { background: var(--accent-soft); color: var(--accent-strong); }
.tag.tel { background: var(--subtle); color: var(--muted); }
.tag.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }

/* --- ECRAN 3 : le fichier clients ----------------------------------------- */
/* voir notes/demo.notes.md §9 */

/* --- ECRAN 4 : l'agent marketing qui ecrit -------------------------------- */
.agent { display: grid; gap: 12px; }
/* La ligne de tete porte l'etat du travail, pas un constat : elle reste sobre. */
/* voir notes/demo.notes.md §10 */
.type { font-size: 13.5px; line-height: 1.6; color: var(--muted); min-height: 2.4em; }
.agent-cta { display: flex; gap: 8px; margin-top: 12px; }
.mini { height: 32px; padding: 0 14px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 550;
  border: 1px solid var(--line-strong); background: var(--page); color: var(--text);
  transition: transform .16s var(--m-ease), box-shadow .16s var(--m-ease); }
.mini.solid { background: var(--text); color: var(--page); border-color: var(--text); }
/* voir notes/demo.notes.md §11 */
.mini.is-press { transform: scale(.94); box-shadow: 0 0 0 4px var(--accent-soft); }

/* La barre d'action porte un bouton : elle doit donc aligner un controle et du
   texte, pas seulement du texte. */
.act-bar .mini { flex: none; }
.act-bar .m-check { flex: none; }
/* voir notes/demo.notes.md §12 */
/* La zone de decision devient une zone d'etat une fois le bouton actionne. */
.agent-cta.m-state { padding: 4px 0; }

/* voir notes/demo.notes.md §13 */
.live-bar { min-height: 34px; margin-bottom: 12px; }
.live {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 12px; border-radius: var(--radius-md);
  border: 1px solid var(--line); background: var(--page);
  font-size: 12.5px; color: var(--muted);
}
.live.is-ok { border-color: color-mix(in srgb, var(--ok) 45%, transparent); color: var(--ok); }
.live-txt { font-weight: 550; }
/* voir notes/demo.notes.md §14 */

/* §15 : la barre de recherche a ete RETIREE le 2026-08-13, avec la scene qui
   l'employait. L'ecran Reservations du produit n'a aucun champ de recherche :
   dessiner le contraire promettait une fonction inexistante. */

/* voir notes/demo.notes.md §16 */
.act-bar {
  display: flex; align-items: center; gap: 9px; margin-top: 12px;
  padding: 10px 13px; border-radius: var(--radius-md);
  border: 1px solid var(--line); background: var(--page);
  font-size: 12.5px; color: var(--muted); font-weight: 550;
}
.act-bar.is-ok { border-color: color-mix(in srgb, var(--ok) 45%, transparent); color: var(--ok); }

@media (prefers-reduced-motion: reduce) {
  .cell.is-gap { animation: none; }
}
@media (max-width: 720px) {
  .demo-body { padding: 12px; min-height: 0; }
  .plan { grid-template-columns: 34px repeat(4, minmax(0, 1fr)); }
  .plan .c5, .plan .c6, .plan .c7, .plan .c8, .plan .h5, .plan .h6, .plan .h7, .plan .h8 { display: none; }
  /* voir notes/demo.notes.md §17 */
  .gap-tag { left: auto; right: 0; transform: translateY(-50%); max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  /* voir notes/demo.notes.md §18 */
  .rs-line { grid-template-columns: 40px 1fr; row-gap: 6px; padding: 9px 10px; }
  .rs-line .tag { grid-column: 2; justify-self: start; }
  .live { font-size: 11.5px; }
}

/* 19. LE VRAI PRODUIT EN DIRECT : voir notes/demo.notes.md §19 */
/* voir notes/demo.notes.md §20 */

/* 21. ECRAN 3 : LE FICHIER CLIENTS, tel qu'il est VRAIMENT : voir notes/demo.notes.md §21 */
.cl-seg { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.cl-tab {
  border: 0; background: transparent; padding: 5px 10px; border-radius: var(--radius-sm);
  font-family: var(--font-ui); font-size: 12.5px; font-weight: 550; color: var(--faint); cursor: default;
}
.cl-tab.is-on { background: var(--accent-soft); color: var(--accent-strong); }
.cl-search {
  display: flex; align-items: center; gap: 7px; flex: 1; min-width: 150px; max-width: 300px;
  height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius-md);
  background: var(--page); font-size: 12.5px;
}
.cl-search.is-on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cl-search i { font-style: normal; color: var(--faint); }
.cl-q { flex: 1; min-height: 1.1em; color: var(--text); font-weight: 500; }
.cl-count { font-family: var(--font-data); font-size: 11.5px; color: var(--faint); white-space: nowrap; margin-left: auto; }
.cl-count b { color: var(--accent-strong); }

.cl-split { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.cl-table { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--page); overflow: hidden; }
.cl-head, .cl-row {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 46px 74px;
  gap: 10px; align-items: center; padding: 9px 12px;
}
.cl-head { background: var(--subtle); font-size: 10.5px; color: var(--faint); font-family: var(--font-data); letter-spacing: .03em; }
.cl-head span:nth-child(3), .cl-head span:nth-child(4), .cl-row .cl-n, .cl-row .cl-e { text-align: right; }
.cl-row { border-top: 1px solid var(--line); font-size: 12.5px; }
.cl-row.is-sel { background: var(--accent-soft); }
.cl-who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cl-av {
  flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--subtle); color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: .02em;
}
.cl-row.is-sel .cl-av { background: var(--accent); color: #fff; }
.cl-nom { min-width: 0; }
.cl-nom b { display: block; font-size: 12.5px; font-weight: 620; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-nom span { display: block; font-size: 10.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-when b { display: block; font-size: 12px; font-weight: 600; color: var(--accent-strong); }
.cl-when span { display: block; font-size: 10.5px; color: var(--faint); }
.cl-n, .cl-e { font-family: var(--font-data); font-variant-numeric: tabular-nums; }
.cl-e { font-weight: 600; }

/* voir notes/demo.notes.md §22 */
.cl-fiche { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--page); padding: 14px; min-height: 240px; }
.cl-fh { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cl-fh .cl-av { width: 34px; height: 34px; font-size: 12px; background: var(--accent); color: #fff; }
.cl-fh b { font-size: 15px; font-weight: 650; letter-spacing: -0.01em; }
.cl-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.cl-chip { font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: var(--radius-full); background: var(--accent-soft); color: var(--accent-strong); }
.cl-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px 0; border-block: 1px solid var(--line); margin-bottom: 12px; }
.cl-nums div b { display: block; font-family: var(--font-data); font-size: 16px; font-weight: 640; letter-spacing: -0.02em; }
.cl-nums div span { display: block; font-size: 9.5px; color: var(--faint); letter-spacing: .04em; text-transform: uppercase; margin-top: 2px; }
.cl-next { font-size: 10.5px; color: var(--faint); letter-spacing: .04em; text-transform: uppercase; margin-bottom: 6px; }
.cl-next-when { font-size: 13px; font-weight: 620; }
.cl-next-what { font-size: 11.5px; color: var(--faint); margin-bottom: 10px; }
/* voir notes/demo.notes.md §23 */
.cl-check { display: flex; flex-wrap: wrap; gap: 5px; }
.cl-ck {
  font-size: 10.5px; font-weight: 600; padding: 3px 8px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); color: var(--faint); background: var(--page);
  transition: color .25s var(--m-ease), border-color .25s var(--m-ease), background-color .25s var(--m-ease);
}
.cl-ck.is-ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); background: color-mix(in srgb, var(--ok) 10%, transparent); }

@media (max-width: 860px) {
  .cl-split { grid-template-columns: 1fr; }
  .cl-fiche { min-height: 0; }
  .cl-head, .cl-row { grid-template-columns: minmax(0, 1.4fr) 44px 68px; }
  .cl-head span:nth-child(2), .cl-row .cl-when { display: none; }
}

/* voir notes/demo.notes.md §24 */
.ag-desk { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 12px; align-items: stretch; min-height: 452px; }
.ag-chat { display: flex; flex-direction: column; min-width: 0; }
/* voir notes/demo.notes.md §25 */
.ag-thread { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; padding-bottom: 12px; }
/* voir notes/demo.notes.md §26 */
.ag-msg { max-width: 94%; }
.ag-msg p { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--text); }
.ag-me { align-self: flex-end; max-width: 82%; background: var(--accent-soft); border-radius: var(--radius-md); padding: 8px 13px; }
.ag-me p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--accent-strong); font-weight: 550; }
/* voir notes/demo.notes.md §27 */
.ag-think { display: flex; align-items: center; gap: 8px; }
.ag-verbe {
  font-size: 12.5px; font-weight: 550;
  background: linear-gradient(90deg, var(--faint) 32%, var(--text) 50%, var(--faint) 68%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: agVerbe 1.5s linear infinite;
}
@keyframes agVerbe { from { background-position-x: 130%; } to { background-position-x: -90%; } }
.ag-facts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.ag-chip {
  font-family: var(--font-data); font-size: 10.5px; font-weight: 550; white-space: nowrap;
  padding: 2px 8px; border-radius: var(--radius-full);
  border: 1px solid var(--line); background: var(--page); color: var(--muted);
}
.ag-acts { display: flex; gap: 8px; margin-top: 10px; }
.ag-card { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--page); padding: 12px 14px; }
.ag-card h4 { margin: 0 0 6px; font-size: 13px; font-weight: 620; }

/* Le composeur : c'est lui qui dit « parlez-lui ». Fixe en bas du fil. */
.ag-comp {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 8px 8px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-full);
  background: var(--page);
  transition: border-color .25s var(--m-ease), box-shadow .25s var(--m-ease);
}
.ag-comp.is-focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ag-modes { display: flex; gap: 4px; flex: none; }
.ag-mode { font-size: 10.5px; font-weight: 600; padding: 3px 9px; border-radius: var(--radius-full); background: var(--subtle); color: var(--faint); white-space: nowrap; }
.ag-mode.is-on { background: var(--accent-soft); color: var(--accent-strong); }
.ag-input { flex: 1; min-width: 0; min-height: 1.2em; font-size: 13px; color: var(--text); font-weight: 500; white-space: nowrap; overflow: hidden; }
.ag-send {
  flex: none; width: 28px; height: 28px; border-radius: 50%; border: 0;
  background: var(--text); color: var(--page); font-size: 14px; line-height: 1;
  display: grid; place-items: center;
  transition: transform .16s var(--m-ease), box-shadow .16s var(--m-ease);
}
.ag-send.is-press { transform: scale(.88); box-shadow: 0 0 0 4px var(--accent-soft); }

/* voir notes/demo.notes.md §28 */
.ag-panel { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--subtle); padding: 12px; min-width: 0; }
.ag-p-head { font-size: 12.5px; font-weight: 650; margin-bottom: 10px; }
.ag-p-group { margin-bottom: 12px; }
.ag-p-lab { display: block; font-family: var(--font-data); font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
.ag-p-empty {
  border: 1px dashed var(--line-strong); border-radius: var(--radius-sm);
  padding: 9px 11px; font-size: 11.5px; color: var(--faint);
}
.ag-p-card {
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--page);
  padding: 8px 11px; margin-bottom: 6px;
  transition: border-color .3s var(--m-ease), box-shadow .3s var(--m-ease);
}
.ag-p-card b { display: block; font-size: 12px; font-weight: 620; }
.ag-p-card span { display: block; font-size: 10.5px; color: var(--faint); margin-top: 1px; }
.ag-p-card.is-new { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ag-p-card.is-ok span { color: var(--ok); font-weight: 600; }

/* 29. ECRAN 5 : LES EMAILS & RELANCES : voir notes/demo.notes.md §29 */
.em-seqs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.em-seq {
  padding: 8px 11px; border: 1px solid var(--line); border-radius: var(--radius-md);
  background: var(--page);
  transition: border-color .3s var(--m-ease), box-shadow .3s var(--m-ease);
}
.em-seq b { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 620; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* voir notes/demo.notes.md §30 */
.em-seq b::before {
  content: ''; flex: none; width: 6px; height: 6px; border-radius: 50%;
  background: var(--ok); animation: emVit 2.6s ease-in-out infinite;
}
@keyframes emVit { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
.em-seq span { display: block; font-size: 10.5px; color: var(--faint); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.em-seq.is-live { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.em-seq.is-live b::before { background: var(--accent); animation-duration: 1.1s; }

/* voir notes/demo.notes.md §31 */
.em-tok {
  display: inline-block; padding: 0 7px; margin: 0 1px; border-radius: 6px;
  background: var(--accent-soft); color: var(--accent-strong); font-weight: 600;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent);
  animation: emTok 1.6s ease-in-out infinite;
  transition: background-color .45s var(--m-ease), box-shadow .45s var(--m-ease), color .45s var(--m-ease);
}
@keyframes emTok {
  0%, 100% { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent); }
  50% { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 60%, transparent), 0 0 10px var(--accent-soft); }
}
.em-tok.is-resolved {
  animation: none;
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  box-shadow: none; color: var(--accent-strong); font-weight: 620;
}

/* voir notes/demo.notes.md §32 */
.em2-pipe {
  position: relative; display: flex; gap: 4px; margin-bottom: 12px;
  padding: 4px; border: 1px solid var(--line); border-radius: var(--radius-full);
  background: var(--page); width: fit-content; max-width: 100%;
}
/* Le rail ne DEPLACE plus sa boite, il decoupe la sienne. Il animait `left` ET
   `width` : deux proprietes de mise en page, sur un element repositionne a
   chaque battement de la scene des emails. La boite occupe desormais tout
   l'interieur du segmente une fois pour toutes, et c'est le `clip-path` qui
   voyage - une propriete de PEINTURE, jamais de mise en page.
   `round var(--radius-full)` garde la pilule exacte : les rayons d'un `inset()`
   suivent la meme regle de reduction que `border-radius`, donc min(l,h)/2 a
   chaque image. Un `scaleX` aurait ecrase les deux bouts en ellipses.
   Les valeurs posees par le script sont en POURCENTAGE, pas en pixels : deux
   `inset()` ne s'interpolent que si leurs unites concordent, et l'etat de
   depart ci-dessous en est un. */
.em2-rail {
  position: absolute; top: 4px; bottom: 4px; left: 4px; right: 4px;
  background: var(--accent-soft);
  clip-path: inset(0 100% 0 0 round var(--radius-full));
  transition: clip-path .38s var(--m-ease);
}
.em2-seg {
  position: relative; display: flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: var(--radius-full);
  font-size: 12px; font-weight: 550; color: var(--faint); white-space: nowrap;
}
.em2-seg.is-on { color: var(--accent-strong); }
.em2-seg b { font-family: var(--font-data); font-size: 11.5px; font-weight: 640; font-variant-numeric: tabular-nums; }

/* La file en table a gauche, le detail a droite : la disposition de la
   console. */
.em2-split { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 12px; align-items: start; margin-bottom: 12px; }
.em2-file { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--page); overflow: hidden; }
.em2-head, .em2-row {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto;
  gap: 10px; align-items: center; padding: 8px 12px;
}
.em2-head { background: var(--subtle); font-size: 10.5px; color: var(--faint); font-family: var(--font-data); letter-spacing: .03em; }
.em2-row { border-top: 1px solid var(--line); transition: background-color .3s var(--m-ease), box-shadow .3s var(--m-ease); }
.em2-row.is-sel { background: var(--accent-soft); }
.em2-row.is-new { box-shadow: inset 2px 0 0 var(--accent); }
.em2-msg { min-width: 0; }
.em2-msg b { display: block; font-size: 12.5px; font-weight: 620; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.em2-msg small { display: block; font-size: 10.5px; color: var(--faint); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.em2-mod { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.em2-chip {
  font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: var(--radius-full);
  background: var(--subtle); color: var(--muted); white-space: nowrap;
}
.em2-chip.is-origin { background: transparent; border: 1px solid var(--line); color: var(--faint); }
.em2-chip.is-ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
/* La coche a l'echelle du contexte : une pastille de 10 px ne porte pas une
   coche de 13. */
.em2-chip .m-check { width: 10px; height: 10px; vertical-align: -1px; margin-right: 3px; }
.tag .m-check { width: 10px; height: 10px; }
.al-txt small .m-check { width: 11px; height: 11px; }
.em2-chip.is-reply { background: var(--accent-soft); color: var(--accent-strong); }
.em2-row .em-etat { justify-self: end; }

/* voir notes/demo.notes.md §33 */
.em2-detail { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--page); padding: 12px; min-height: 252px; }
.em2-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 10px; margin-bottom: 10px; }
.em2-kv dt { font-size: 9.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); font-family: var(--font-data); }
.em2-kv dd { margin: 0; font-size: 11.5px; font-weight: 600; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.em2-kv dd.is-ok { color: var(--ok); }
.em2-kv dd.is-wait { color: var(--faint); display: flex; align-items: center; gap: 5px; }
.em2-mail-titre { display: block; font-size: 9.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); font-family: var(--font-data); margin-bottom: 6px; }

/* voir notes/demo.notes.md §34 */
.em2-mail {
  border: 1px solid #e3e4e9; border-radius: 8px; background: #fff; color: #21242c;
  padding: 13px 14px;
}
.em2-mail-centre { display: block; font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: #8b8e98; }
.em2-mail-objet { display: block; font-size: 13.5px; font-weight: 650; margin: 5px 0 6px; color: #21242c; }
.em2-mail-corps { margin: 0 0 10px; font-size: 12px; line-height: 1.65; color: #4a4e59; }
.em2-mail-btn {
  display: inline-block; padding: 6px 13px; border-radius: 6px;
  background: #21242c; color: #fff; font-size: 11.5px; font-weight: 600;
}

/* 35. ECRAN 6 : LES CHIFFRES : voir notes/demo.notes.md §35 */
/* voir notes/demo.notes.md §36 */
.kpi { position: relative; }
.kpi-extra {
  position: absolute; top: 12px; right: 14px;
  font-family: var(--font-data); font-size: 9.5px; font-weight: 600;
  color: var(--ok); white-space: nowrap;
}

.dash-row { display: grid; gap: 12px; margin-bottom: 12px; }
.dash-row.is-2 { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.dash-row.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dash-mod { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--page); padding: 12px 14px; min-width: 0; }
.dash-mod-t { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.dash-mod-t b { font-size: 12.5px; font-weight: 640; }
.dash-mod-t span { font-size: 10.5px; color: var(--faint); font-family: var(--font-data); }
.dash-mod-t .rv-total { margin-left: auto; font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--accent-strong); }

/* voir notes/demo.notes.md §37 */
.dh-svg { display: block; width: 100%; height: auto; }
.dh-ligne { stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dh-aire { fill: var(--accent); opacity: 0; transition: opacity .8s var(--m-ease); }
.dh-aire.is-on { opacity: .1; }
.dh-pt { fill: var(--accent); opacity: 0; transition: opacity .3s var(--m-ease); }
.dh-pt.is-on { opacity: 1; }
.dh-x { fill: var(--faint); font-family: var(--font-data); font-size: 8px; }

/* voir notes/demo.notes.md §38 */
.do-wrap { display: flex; align-items: center; gap: 16px; }
.do-ring {
  position: relative; flex: none; width: 96px; height: 96px; border-radius: 50%;
  background: conic-gradient(var(--subtle) 0 100%);
}
.do-ring::after { content: ''; position: absolute; inset: 11px; border-radius: 50%; background: var(--page); }
.do-core { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; z-index: 1; }
.do-core b { font-family: var(--font-data); font-size: 20px; font-weight: 650; letter-spacing: -0.02em; }
.do-core span { font-size: 8.5px; color: var(--faint); letter-spacing: .04em; text-transform: uppercase; }
.do-leg { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.do-item { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.do-item b { margin-left: auto; font-family: var(--font-data); font-size: 12px; font-variant-numeric: tabular-nums; padding-left: 14px; }
.do-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; }
.do-dot.is-bowl { background: var(--accent); }
.do-dot.is-laser { background: #d97706; }

/* Les prochaines arrivees. */
.ar-rows { display: flex; flex-direction: column; gap: 7px; }
.ar-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ar-time { flex: none; font-family: var(--font-data); font-size: 11px; font-weight: 640; font-variant-numeric: tabular-nums; color: var(--accent-strong); }
.ar-qui { min-width: 0; flex: 1; }
.ar-qui b { display: block; font-size: 12px; font-weight: 620; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-qui small { display: block; font-size: 10px; color: var(--faint); }
.ar-row .em2-chip { flex: none; }

/* Les alertes : chaque ligne porte SON bouton. Le dashboard se regle. */
.al-rows { display: flex; flex-direction: column; gap: 8px; }
.al-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .3s var(--m-ease);
}
.al-row.is-ok { border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.al-txt { min-width: 0; flex: 1; }
.al-txt b { display: block; font-size: 11.5px; font-weight: 620; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.al-txt small { display: flex; align-items: center; gap: 5px; font-size: 10px; color: var(--faint); margin-top: 1px; }
.al-row.is-ok .al-txt small { color: var(--ok); font-weight: 600; }
.al-row .mini { flex: none; height: 28px; padding: 0 11px; font-size: 11.5px; }

/* Les revenus des 7 derniers jours, en mini-barres. */
.rv-chart { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; align-items: end; height: 74px; }
.rv-col { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
/* Les barres montaient en animant `height`, donc en redimensionnant la colonne
   qui les porte, donc en remettant en page la grille des sept jours a chaque
   image, sept fois de suite. Elles reservent maintenant leur hauteur MAXIMALE
   (54 px, la valeur que le script calculait deja comme plafond) et se deplient
   en `scaleY` depuis leur base. La colonne ne bouge plus : le libelle du jour
   etait deja cale en bas par `align-items: end`, il l'est toujours, au pixel.
   Cout assume : les 4 px de rayon du haut se lisent aplatis PENDANT la montee
   (2 px a mi-course). A l'arrivee, echelle 1, la barre est exacte. */
.rv-bar {
  display: block; width: 100%; max-width: 22px; height: 54px; flex: none;
  border-radius: 4px 4px 2px 2px;
  background: color-mix(in srgb, var(--accent) 52%, var(--subtle));
  transform: scaleY(0); transform-origin: 50% 100%;
  transition: transform .5s var(--m-ease);
}
.rv-day { font-size: 8.5px; color: var(--faint); font-family: var(--font-data); }

@media (max-width: 720px) {
  .em-seq span { display: none; }
  .em-seq b { font-size: 11px; }
  .em2-split { grid-template-columns: 1fr; }
  .em2-head, .em2-row { grid-template-columns: minmax(0, 1fr) auto; }
  .em2-head span:nth-child(2), .em2-row .em2-mod { display: none; }
  .em2-detail { min-height: 0; }
  .em2-seg { padding: 4px 9px; font-size: 11px; }
  /* Le segmente defile dans sa boite plutot que de couper « A valider ». */
  .em2-pipe { overflow-x: auto; scrollbar-width: none; }
  .dash-row.is-2, .dash-row.is-3 { grid-template-columns: 1fr; }
  .kpi-extra { position: static; display: block; margin-top: 3px; }
  /* voir notes/demo.notes.md §39 */
  .ag-desk { grid-template-columns: 1fr; min-height: 0; }
  .ag-modes { display: none; }
  .ag-msg p { font-size: 12.5px; }
}

/* L'HISTORIQUE DE LA FICHE CLIENT (2026-08-13). Remplace la liste de controle
   avant venue (.cl-check / .cl-ck), RETIREE parce que la fonction n'existe plus
   dans le produit. Ce que la vraie fiche porte : « Messages & relances ». */
.cl-histo { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); }
.cl-histo-t { margin-bottom: 6px; font-size: 10.5px; font-weight: 600; color: var(--muted); }
.cl-histo-l { display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  padding: 3px 0; font-size: 11px; color: var(--text); }
.cl-histo-l em { font-style: normal; font-size: 10px; color: var(--faint); white-space: nowrap; }
.cl-histo-l.is-ok span { color: var(--ok); font-weight: 600; }

/* --- LA HIERARCHIE DU MENU, DEPLIEE (2026-08-13) --------------------------
   Le groupe ouvert tourne son chevron vers le bas et ses trois sous-entrees
   s'affichent en retrait, exactement comme la console. C'est ce qui dit que
   « Toutes » est une SOUS-entree de Planning et pas une page voisine de
   « Reservations » : la confusion que ce tour corrige tenait entiere dans un
   menu aplati. */
.sb-ouvert::after { transform: translateY(-30%) rotate(-135deg); opacity: .8; }
.sb-sous { position: relative; display: flex; align-items: center; min-height: 27px;
  margin-left: 10px; padding: 0 10px; border-radius: 7px;
  color: var(--faint); font-size: 12px; font-weight: 500;
  transition: background-color .25s var(--e-doux), color .25s var(--e-doux); }
.sb-sous::before { content: ''; position: absolute; left: -6px; top: 6px; bottom: 6px; width: 1.5px;
  border-radius: 999px; background: var(--line-strong); transition: background-color .25s var(--e-doux); }
[data-ecran="planning"] .sb-sous[data-s="planning"],
[data-ecran="toutes"] .sb-sous[data-s="toutes"] { background: var(--subtle); color: var(--text); }
[data-ecran="planning"] .sb-sous[data-s="planning"]::before,
[data-ecran="toutes"] .sb-sous[data-s="toutes"]::before { background: var(--accent); }
/* Le groupe reste allume tant qu'on est dans l'une de ses sous-entrees : sinon
   « Planning » s'eteint alors qu'on y est. */
[data-ecran="planning"] .sb-ouvert, [data-ecran="toutes"] .sb-ouvert { color: var(--text); }

/* --- PLANNING > TOUTES : la liste du jour (2026-08-13) --------------------
   Releve dans le depot applicatif, pas dessine de memoire : barre de recherche
   + cinq puces de statut, titre « Toutes les reservations » avec son compteur,
   quatre sections dont « Hors planning » en tete, et par ligne une colonne
   « Ressources » et les trois boutons de statut. */
.tt-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.tt-rech { display: flex; align-items: center; gap: 7px; flex: 1 1 190px; min-width: 0;
  height: 30px; padding: 0 11px; border-radius: 999px;
  background: var(--page); box-shadow: inset 0 0 0 1px var(--line); }
.tt-loupe { flex: none; width: 12px; height: 12px; background: var(--faint);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4.3-4.3'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4.3-4.3'/%3E%3C/svg%3E") center / contain no-repeat; }
.tt-champ { display: flex; align-items: center; min-width: 0; font-size: 11.5px; }
.tt-saisie { font-style: normal; color: var(--text); white-space: pre; }
.tt-invite { font-style: normal; color: var(--faint); white-space: nowrap;
  transition: opacity .2s var(--e-sec); }
.tt-invite.is-parti { opacity: 0; }
.tt-puces { display: flex; gap: 6px; flex-wrap: wrap; }
.tt-puce { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px;
  border-radius: 999px; background: var(--page); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 11px; color: var(--muted);
  transition: background-color .3s var(--e-doux), color .3s var(--e-doux), box-shadow .3s var(--e-doux); }
.tt-puce b { font-weight: 550; }
.tt-puce i { font-style: normal; font-family: var(--font-data); font-size: 10px; color: var(--faint); }
.tt-puce.is-on { background: var(--accent); color: #fff; box-shadow: none; }
.tt-puce.is-on i { color: rgba(255, 255, 255, .8); }

.tt-tete { display: flex; align-items: center; gap: 9px; padding: 12px 0 6px; }
.tt-tete b { font-size: 12.5px; font-weight: 640; }
.tt-compte { display: inline-grid; place-items: center; min-width: 20px; height: 18px; padding: 0 6px;
  border-radius: 999px; background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent-strong); font-family: var(--font-data); font-size: 10.5px; font-weight: 600; }
.tt-sous { margin-left: auto; font-style: normal; font-size: 10.5px; color: var(--faint); }

.tt-liste { position: relative; display: flex; flex-direction: column; gap: 8px; }
.tt-sec { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--page);
  overflow: hidden; transition: opacity .35s var(--e-sec); }
.tt-sec.is-vide, .tt-sec.is-filtre { opacity: .28; }
.tt-sec-t { padding: 7px 12px; background: var(--subtle); border-bottom: 1px solid var(--line);
  font-family: var(--font-data); font-size: 10px; letter-spacing: .05em; text-transform: uppercase;
  color: var(--faint); }
/* Une recherche qui ne rend rien le DIT : une liste vide et muette laisse
   croire a une panne. Le message est pose par le conteneur, pas par une ligne
   fantome, donc il ne fausse aucun compteur. */
.tt-liste.is-rien::after { content: 'Aucune réservation ne correspond'; position: absolute;
  left: 50%; top: 46%; transform: translate(-50%, -50%); padding: 8px 16px; border-radius: 999px;
  background: var(--page); box-shadow: var(--hair), var(--sh-1);
  font-size: 11.5px; color: var(--muted); }

.tt-line { grid-template-columns: 52px minmax(0, 1fr) 108px auto; align-items: center; }
.tt-line.is-hors { display: none; }
.tt-line.is-vise { background: var(--accent-soft); }
.tt-res { min-width: 0; }
.tt-res i { display: block; font-style: normal; font-family: var(--font-data); font-size: 9px;
  letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.tt-res b { display: block; font-size: 11px; font-weight: 550; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-act { display: flex; align-items: center; gap: 8px; }
.tt-btns { display: flex; gap: 3px; }
.tt-b { padding: 3px 7px; border-radius: 6px; background: var(--page);
  box-shadow: inset 0 0 0 1px var(--line); font-size: 9.5px; color: var(--faint);
  transition: background-color .2s var(--e-doux), color .2s var(--e-doux),
              box-shadow .2s var(--e-doux), transform .12s var(--e-sec); }
.tt-b.is-on { background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent-strong); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); }
/* L'appui : 120 ms, enfoncement inverse - la meme grammaire que les boutons de
   la page (section 42 de refonte.css). */
.tt-b.is-presse { transform: translateY(1px) scale(.96);
  background: var(--accent); color: #fff; box-shadow: none; }

@media (prefers-color-scheme: dark) {
  .tt-b.is-presse, .tt-puce.is-on { color: var(--page); }
  .tt-puce.is-on i { color: rgba(6, 8, 13, .72); }
}
@media (max-width: 900px) {
  .tt-line { grid-template-columns: 46px minmax(0, 1fr); row-gap: 6px; }
  .tt-res, .tt-act { grid-column: 2; }
  .tt-act { justify-self: start; flex-wrap: wrap; }
  .tt-sous { display: none; }
}
