/* Thème de l'app iPhone (STYLE-ET-COULEURS.md) : brun café en sombre, crème en clair, terre cuite en accent. */
:root {
  --ts: 1;   /* taille du texte de l'iPhone (Réglages > Luminosité et affichage > Taille du texte), posée par applyTextSize (core.js) */
  --bg: #F6F0E2; --card: #FFFCF4; --fg: #1E1A16; --sec: #7A6D5E; --accent: #984528; --on-accent: #FFFFFF;
  --blue: #3F6F96; --green: #4E7E5C; --red: #B93A2D; --red-bg: #B93A2D; --orange: #9A6A0A; --brown: #8F7249; --ko: #9A8B78;
  --kd: #B93A2D; --kr: #3F6F96; --kbr: #C25E12; --refus: #8A4A7C;
  --empty: #EADFCB; --bright: #FFFCF4; --ink: #1E1A16; --seg-on: #FFFCF4;
  --fill: rgba(80, 55, 30, .08); --sep: rgba(60, 40, 20, .12);
  --glass: rgba(255, 252, 244, .72); --shadow: 0 6px 24px rgba(40, 25, 10, .16);
  --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
:root[data-theme="sombre"] {
  --bg: #16110E; --card: #221B16; --fg: #F4EBDD; --sec: #A39685; --accent: #DB8560; --on-accent: #1A130F;
  --blue: #7FA6C9; --green: #7DB38B; --red: #E4695B; --red-bg: #B4372B; --orange: #E0A63A; --brown: #B79A6B; --ko: #857668;
  --kd: #E4695B; --kr: #7FA6C9; --kbr: #F08C3C; --refus: #CE8DC0;
  --empty: #2A221C; --bright: #F4EBDD; --seg-on: #4A3F36;
  --fill: rgba(244, 235, 221, .08); --sep: rgba(244, 235, 221, .12);
  --glass: rgba(42, 34, 28, .74); --shadow: 0 6px 28px rgba(0, 0, 0, .5);
  --wm-filter: brightness(0) invert(1);   /* le logo Alfred Hotels est noir : on le passe en blanc sur fond sombre */
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg: #16110E; --card: #221B16; --fg: #F4EBDD; --sec: #A39685; --accent: #DB8560; --on-accent: #1A130F;
    --blue: #7FA6C9; --green: #7DB38B; --red: #E4695B; --red-bg: #B4372B; --orange: #E0A63A; --brown: #B79A6B; --ko: #857668;
  --kd: #E4695B; --kr: #7FA6C9; --kbr: #F08C3C; --refus: #CE8DC0;
    --empty: #2A221C; --bright: #F4EBDD; --seg-on: #4A3F36;
    --fill: rgba(244, 235, 221, .08); --sep: rgba(244, 235, 221, .12);
    --glass: rgba(42, 34, 28, .74); --shadow: 0 6px 28px rgba(0, 0, 0, .5);
    --wm-filter: brightness(0) invert(1);   /* le logo Alfred Hotels est noir : on le passe en blanc sur fond sombre */
  color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg); }
body {
  font: calc(17px * var(--ts))/1.3 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; touch-action: manipulation; }
input, textarea, select { background: transparent; border: 0; outline: 0; }
.rounded, .num { font-family: ui-rounded, "SF Pro Rounded", -apple-system, sans-serif; }
.num, .code { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
.boot { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; color: var(--sec); padding: 24px; }
.boot img { width: 56px; height: 56px; animation: bootPulse 1.4s ease-in-out infinite; }
@keyframes bootPulse { 50% { opacity: .45; transform: scale(.94); } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ─── Écran ─── */
.screen { min-height: 100%; padding: calc(var(--safe-top) + 8px) 16px calc(var(--safe-bottom) + 120px); max-width: 640px; margin: 0 auto; }
.topfade { position: fixed; inset-inline-start: 0; inset-inline-end: 0; top: 0; height: calc(var(--safe-top) + 10px); z-index: 20; pointer-events: none;
  background: linear-gradient(var(--bg) 55%, transparent); }
.header { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 4px 0 12px; }
.header .logo { width: 34px; height: 34px; border-radius: 9px; flex: none; }
.header .t { flex: 1; min-width: 0; }
.header h1 { margin: 0; font-size: calc(22px * var(--ts)); font-weight: 700; letter-spacing: -.01em; }
.header .sub { font-size: calc(15px * var(--ts)); color: var(--sec); }
.large-title { font-size: calc(34px * var(--ts)); font-weight: 700; margin: 0; letter-spacing: -.01em; }
.big-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 14px 0 14px; }

.card { background: var(--card); border-radius: 26px; overflow: hidden; }
.card.pad { padding: 18px; }
.section-title { font-size: calc(15px * var(--ts)); font-weight: 600; color: var(--sec); padding: 20px 18px 8px; }
.bloc-title { font-size: calc(20px * var(--ts)); font-weight: 700; padding: 22px 4px 0; }
.floor-title { font-size: calc(15px * var(--ts)); font-weight: 600; color: var(--sec); padding: 14px 18px 8px; }
.foot { font-size: calc(13px * var(--ts)); color: var(--sec); padding: 8px 18px 0; }
.foot.warn { color: var(--orange); } .foot.bad { color: var(--red); }
.divider { height: .5px; background: var(--sep); margin-inline-start: 18px; }
.divider.tile { margin-inline-start: 70px; }
.problem { display: flex; gap: 10px; align-items: flex-start; background: var(--red-bg); color: #fff; font-size: calc(13px * var(--ts)); font-weight: 600;
  border-radius: 18px; padding: 14px; margin-bottom: 14px; }

/* ─── Boutons ─── */
.press { transition: transform .12s ease-out, opacity .12s; }
.press:active { transform: scale(.97); opacity: .75; }
/* Taille par défaut des icônes (les règles plus bas l’ajustent) */
svg[viewBox="0 0 24 24"] { width: 20px; height: 20px; flex: none; }
.pill { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 44px; padding: 0 20px;
  border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: calc(15px * var(--ts)); font-weight: 600; white-space: nowrap; }
.pill.soft { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.pill.red { background: var(--red-bg); color: #fff; }
.pill.red.soft { background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); }
.pill.green { background: var(--green); color: var(--on-accent); }
.pill[disabled] { opacity: .45; pointer-events: none; }
.pills { display: flex; gap: 10px; }
.glass-btn { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none;
  background: var(--glass); backdrop-filter: blur(18px) saturate(1.6); -webkit-backdrop-filter: blur(18px) saturate(1.6);
  box-shadow: inset 0 0 0 .5px var(--sep), 0 2px 10px rgba(0, 0, 0, .08); color: var(--fg); position: relative; }
.glass-btn svg { width: 20px; height: 20px; }
.glass-btn .dot { position: absolute; top: 6px; inset-inline-end: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--red-bg); box-shadow: 0 0 0 2px var(--bg); }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none;
  font-weight: 700; font-size: 16px; color: #fff; }
.row-btn { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 0 18px; text-align: start; }
.row-btn .ic { width: 24px; display: inline-flex; justify-content: center; color: var(--accent); }
.row-btn .ic svg { width: 20px; height: 20px; }
.row-btn .chev { margin-inline-start: auto; color: var(--sec); }
.row-btn .right + .chev { margin-inline-start: 0; }   /* valeur à droite collée à la flèche (sinon l’espace se partage et la valeur flotte au milieu) */
.row-btn.danger { color: var(--red); } .row-btn.danger .ic { color: var(--red); }
.field { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 18px; }
.field label { flex: none; }
.field input, .field select { flex: 1; min-width: 0; text-align: end; color: var(--fg); }
.field input::placeholder, .input::placeholder, textarea::placeholder { color: var(--sec); opacity: .8; }
.input { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 12px; background: var(--fill); }
textarea.input { min-height: 88px; resize: none; line-height: 1.35; }
.tr-lab { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tr-ic { display: inline-flex; flex: none; color: var(--sec); }
.tr-ic svg { width: 22px; height: 22px; }
.tr-lab.red .tr-ic { color: var(--red); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 0 18px; width: 100%; text-align: start; }
.switch { width: 51px; height: 31px; border-radius: 999px; background: var(--fill); position: relative; flex: none; transition: background .2s; box-shadow: inset 0 0 0 1px var(--sep); }
.switch::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .25); transition: transform .25s cubic-bezier(.3, 1.3, .5, 1); }
.switch.on { background: var(--green); box-shadow: none; }
.switch.on::after { transform: translateX(20px); }

/* ─── Sélecteur segmenté ─── */
.seg { display: flex; padding: 3px; border-radius: 999px; background: var(--fill); gap: 0; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: 1 0 auto; min-height: 36px; padding: 0 12px; border-radius: 999px; font-size: calc(15px * var(--ts)); font-weight: 500; white-space: nowrap; transition: background .2s; }
.seg button.on { background: var(--seg-on); font-weight: 600; box-shadow: 0 2px 4px rgba(0, 0, 0, .12); }
.filters { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 999px; font-size: calc(13px * var(--ts)); font-weight: 600;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); white-space: nowrap; }
.chip.on { background: var(--accent); color: var(--on-accent); }
.chip.brown { color: var(--brown); background: color-mix(in srgb, var(--brown) 14%, transparent); }
.chip svg { width: 12px; height: 12px; }

/* ─── Résumé ─── */
.progress { display: flex; align-items: center; gap: 14px; min-height: 46px; padding: 0 18px; }
.progress .l { width: calc(96px * var(--ts)); flex: none; }
.progress .bar { flex: 1; height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.progress .bar i { display: block; height: 100%; border-radius: 3px; transition: width .4s; }
.progress .n { min-width: 40px; text-align: end; color: var(--sec); font-variant-numeric: tabular-nums; }
.empty-day { padding: 18px; display: flex; flex-direction: column; gap: 14px; color: var(--sec); }

/* ─── Lignes de chambre ─── */
.room-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 10px 16px; text-align: start; }
.room-row .main { flex: 1; min-width: 0; display: block; }
.room-row .code { font-size: calc(20px * var(--ts)); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.room-row.handled .code { color: var(--sec); }
.room-row .meta { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: calc(15px * var(--ts)); color: var(--sec); overflow: hidden; overflow-wrap: anywhere; }   /* deux lignes au plus : le prénom n'est plus coupé sur téléphone */
.room-row .notes { font-size: calc(15px * var(--ts)); font-weight: 600; color: var(--orange); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.room-row .who { font-size: calc(13px * var(--ts)); font-weight: 600; }
.st-word { font-weight: 600; }
.st-done { color: var(--green); } .st-refused { color: var(--refus); } .st-cleared, .st-available { color: var(--blue); } .st-unavailable { color: var(--sec); }
.star { color: var(--orange); width: 14px; height: 14px; flex: none; }
.late { color: var(--red); font-size: calc(13px * var(--ts)); font-weight: 700; }
.kind-tile { width: 38px; height: 38px; border-radius: 11px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  font: 700 14px ui-rounded, -apple-system, sans-serif; }
/* Couleur du type, la même partout (liste, plan, éditeur, feuilles) : Départ rouge, Recouche bleu, Blanc recouche orange */
.kD { --kc: var(--kd); } .kR { --kc: var(--kr); } .kBR { --kc: var(--kbr); }
.kind-tile.D { color: var(--kd); background: color-mix(in srgb, var(--kd) 18%, transparent); }
.kind-tile.R { color: var(--kr); background: color-mix(in srgb, var(--kr) 20%, transparent); }
.kind-tile.BR { color: var(--kbr); background: color-mix(in srgb, var(--kbr) 18%, transparent); }
.kind-tile.task { color: var(--accent); background: var(--fill); }
.kind-tile.task svg { width: 18px; height: 18px; }
.kind-tile.task.info { color: var(--sec); }
.kind-tile.task.all { color: var(--on-accent); background: var(--accent); }
.kind-tile.dim { opacity: .5; }
.badge { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; flex: none; }
.badge svg { display: block; }
.b-done { background: var(--green); } .b-refused { background: var(--refus); } .b-cleared, .b-available { background: var(--blue); }
.b-unavailable { background: var(--ko); }
.b-verified { background: var(--green); }

/* ─── Urgent ─── */
.urgent-card { background: color-mix(in srgb, var(--red) 14%, var(--card)); border-radius: 26px; overflow: hidden; box-shadow: inset 0 0 0 1.5px var(--red); }
.urgent-card .room-row .code { color: var(--red); }
.urgent-tag { display: inline-flex; align-items: center; gap: 4px; font-size: calc(12px * var(--ts)); font-weight: 800; letter-spacing: .04em; color: #fff; background: var(--red-bg);
  padding: 2px 8px; border-radius: 999px; }
.pulse { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.alarm { position: fixed; inset: 0; z-index: 200; background: #B3261E; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(var(--safe-top) + 24px) 24px calc(var(--safe-bottom) + 24px); text-align: center; gap: 14px; animation: flash 1s steps(2, start) infinite; }
@keyframes flash { 50% { background: #7E140E; } }
.alarm .big { font: 800 56px/1 ui-rounded, -apple-system, sans-serif; letter-spacing: .02em; }
.alarm .room { font: 800 72px/1 ui-rounded, -apple-system, sans-serif; }
.alarm .txt { font-size: calc(20px * var(--ts)); font-weight: 600; max-width: 22em; }
.alarm button { margin-top: 18px; min-height: 64px; width: min(340px, 100%); border-radius: 999px; background: #fff; color: #B3261E; font-size: calc(22px * var(--ts)); font-weight: 800; }

/* ─── Plan ─── */
.plan { padding: 18px 6px; }
.plan .lvl { display: flex; align-items: stretch; gap: 6px; }
.plan .flab { width: 24px; flex: none; font-size: 13px; font-weight: 700; color: var(--sec); text-align: center; padding-top: 10px; }
.plan .tower { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; }
.plan .tower > .cell { flex: 1; }
.plan .cell { display: flex; flex-wrap: wrap; justify-content: center; align-content: center; gap: 4px; padding: 5px 4px;
  min-height: calc(var(--t) + 10px); box-shadow: inset 2px 0 var(--sep), inset -2px 0 var(--sep), inset 0 1px var(--sep); }
.plan .cell.rows { flex-direction: column; flex-wrap: nowrap; align-items: center; justify-content: center; }
.plan .prow { display: flex; justify-content: center; gap: 4px; }   /* disposition réelle d'un étage (bâtiment A du Wilson) */
.plan .tile.gap { visibility: hidden; }
.plan .cell.base { box-shadow: inset 2px 0 var(--sep), inset -2px 0 var(--sep), inset 0 1px var(--sep), inset 0 -2px var(--sep); }
.plan .roof { height: 24px; position: relative; display: flex; align-items: flex-end; }
.plan .roof svg { width: 100%; height: 14px; display: block; color: var(--sec); }
.plan .names { display: flex; gap: 6px; padding-top: 12px; }
.plan .names div { flex: 1; text-align: center; font-weight: 700; }
.tile { position: relative; flex: none; width: var(--t); height: var(--t); border-radius: 9px; display: flex; align-items: center; justify-content: center; }
.tile .n { font: 700 calc(var(--t) * .34) ui-rounded, -apple-system, sans-serif; font-variant-numeric: tabular-nums; margin-top: calc(var(--t) * -.06); }
.tile .k { position: absolute; left: calc(var(--t) * .12); bottom: calc(var(--t) * .06); font: 800 max(10px, calc(var(--t) * .24)) ui-rounded, -apple-system, sans-serif; }
.tile .s { position: absolute; right: calc(var(--t) * .06); bottom: calc(var(--t) * .06); }
.tile .p { position: absolute; right: calc(var(--t) * .05); top: calc(var(--t) * .04); width: calc(var(--t) * .2); height: calc(var(--t) * .2); color: var(--orange); }
.tile .o { position: absolute; left: calc(var(--t) * .07); top: calc(var(--t) * .03); font: 800 calc(var(--t) * .2) -apple-system, sans-serif; }
.tile .mk { position: absolute; left: 50%; top: calc(var(--t) * .03); transform: translateX(-50%); display: flex; gap: 1px; pointer-events: none; }
.tile .mk i { font: 800 calc(var(--t) * .18) -apple-system, sans-serif; font-style: normal; line-height: 1; padding: 1px calc(var(--t) * .05); border-radius: 4px; color: #fff; }
.tile .mk .a { background: var(--blue); }
.tile .mk .b { background: none; padding: 0; display: inline-flex; }
.tile .mk .b img { width: calc(var(--t) * .22); height: calc(var(--t) * .22); min-width: 11px; min-height: 11px; display: block; border-radius: 3px; }
.tile .nd { position: absolute; left: calc(var(--t) * .08); top: calc(var(--t) * .08); width: calc(var(--t) * .15); height: calc(var(--t) * .15); border-radius: 50%; background: var(--orange); }
.tile.dep { background: var(--fill); color: var(--sec); }
.tile.dep.on { background: var(--bright); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.tile.rec { color: var(--sec); box-shadow: inset 0 0 0 1.5px var(--ko); background-image: none; border: 1.5px dashed var(--ko); box-shadow: none; }
.tile.rec.on { color: var(--fg); border: 1.5px solid color-mix(in srgb, var(--fg) 75%, transparent); }
.tile.void { background: var(--empty); }
.tile.out { color: var(--sec); border: 1px dashed var(--ko); }
.tile.out .n { font-weight: 600; }
.tile.urg { box-shadow: 0 0 0 2.5px var(--red); }
.tile.sel { transform: scale(1.12); transition: transform .2s; z-index: 2; }

/* ─── Bulle (popover) ─── */
.scrim { position: fixed; inset: 0; z-index: 80; }
.bubble { position: fixed; z-index: 81; width: 300px; max-width: calc(100vw - 24px); max-height: min(480px, calc(100vh - 140px)); overflow-y: auto;
  background: var(--card); border-radius: 26px; box-shadow: var(--shadow), inset 0 0 0 .5px var(--sep); padding: 16px;
  transform-origin: var(--ox, 50%) var(--oy, 0); scrollbar-width: none; }
.bubble::-webkit-scrollbar { display: none; }
.bubble.anim { animation: pop .22s cubic-bezier(.2, 1.2, .4, 1); }
@keyframes pop { from { opacity: 0; transform: scale(.85); } }
.bubble .bh { display: flex; align-items: center; gap: 8px; }
.bubble .bh .title { font: 700 calc(24px * var(--ts)) ui-rounded, -apple-system, sans-serif; font-variant-numeric: tabular-nums; }
.bubble .meta { font-size: calc(13px * var(--ts)); color: var(--sec); margin-top: 3px; }
.bubble .bnote { font-size: calc(13px * var(--ts)); font-weight: 600; color: var(--accent); margin-top: 2px; }
.bubble .stack { display: flex; flex-direction: column; gap: 14px; }
.del { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px; border-radius: 999px; color: var(--red); font-weight: 700; font-size: calc(15px * var(--ts)); margin-inline-start: auto; }
.del.armed { background: var(--red-bg); color: #fff; padding: 0 14px; }
.del svg { width: 18px; height: 18px; }
.mini-seg .seg button { font-size: calc(14px * var(--ts)); min-height: 32px; padding: 0 8px; }
.note-item { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; min-height: 40px; padding: 0 12px; border-radius: 12px;
  background: var(--fill); font-size: calc(15px * var(--ts)); font-weight: 500; text-align: start; }
.note-item svg { width: 18px; height: 18px; color: var(--sec); flex: none; }
.add-line { display: flex; align-items: center; gap: 6px; padding: 0 6px 0 12px; min-height: 44px; border-radius: 12px; background: var(--fill); }
.add-line input { flex: 1; min-width: 0; }
.add-line button { color: var(--accent); width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; }
.add-line button svg { width: 26px; height: 26px; }
.kv { font-size: calc(13px * var(--ts)); color: var(--sec); }
.kv b { color: var(--fg); font-weight: 600; }

/* ─── Feuille (sheet) ─── */
.sheet-scrim { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .35); }
.sheet-scrim.anim { animation: fade .25s; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: fixed; inset-inline-start: 0; inset-inline-end: 0; bottom: 0; top: calc(var(--safe-top) + 12px); z-index: 91; background: var(--bg); border-radius: 26px 26px 0 0;
  display: flex; flex-direction: column; max-width: 680px; margin: 0 auto; box-shadow: 0 -4px 30px rgba(0, 0, 0, .25); }
.sheet.level2 { z-index: 93; top: calc(var(--safe-top) + 24px); }
.sheet-scrim.level2 { z-index: 92; }
@keyframes up { from { transform: translateY(100%); } }
.sheet.anim { animation: up .32s cubic-bezier(.2, .9, .3, 1); }
.sheet .grab { width: 36px; height: 5px; border-radius: 3px; background: var(--sep); margin: 6px auto 0; flex: none; }
.sheet .nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 12px 8px; flex: none; }
.sheet .nav .ttl { font-size: calc(17px * var(--ts)); font-weight: 600; text-align: center; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet .nav .glass-btn.ok { background: var(--accent); color: var(--on-accent); }
.sheet .body { flex: 1; overflow-y: auto; padding: 0 16px calc(var(--safe-bottom) + 24px); -webkit-overflow-scrolling: touch; }
.sheet .tools { flex: none; padding: 10px 16px calc(var(--safe-bottom) + 8px); border-top: .5px solid var(--sep); background: var(--bg); display: flex; flex-direction: column; gap: 8px; }
.tools .tr { display: flex; gap: 8px; }
.tool { flex: 1; min-height: 44px; border-radius: 999px; font-size: calc(15px * var(--ts)); font-weight: 600; background: var(--glass);
  box-shadow: inset 0 0 0 .5px var(--sep), 0 1px 4px rgba(0, 0, 0, .06); white-space: nowrap; padding: 0 6px; }
.tool.on { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.who-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.who-row::-webkit-scrollbar { display: none; }
.who-row .chip { min-height: 36px; }

/* ─── Barre d'onglets ─── */
.tabbar { position: fixed; z-index: 50; left: 50%; transform: translate(-50%, var(--tb-dy, 0px)); bottom: calc(var(--safe-bottom) + 10px); display: flex; gap: 2px; padding: 4px;
  border-radius: 999px; background: var(--glass); backdrop-filter: blur(20px) saturate(1.7); -webkit-backdrop-filter: blur(20px) saturate(1.7);
  box-shadow: var(--shadow), inset 0 0 0 .5px var(--sep); max-width: calc(100vw - 24px); }
.tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: 64px; height: 54px;
  padding: 0 8px; border-radius: 999px; color: var(--fg); font-size: 10px; font-weight: 600; }
.tabbar button svg { width: 24px; height: 24px; }
.tabbar button.on { color: var(--accent); background: var(--fill); }
.tabbar .count { position: absolute; top: 3px; inset-inline-end: 10px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red-bg); color: #fff;
  font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* ─── Annuler, messages courts ─── */
/* « Annuler » toujours au premier plan (z-index 110) : au-dessus de la bulle et de toutes les fenêtres ; seules les confirmations, l'alerte urgente, la photo agrandie et les messages courts passent devant */
.undo { position: fixed; z-index: 110; left: 50%; transform: translateX(-50%); bottom: calc(var(--safe-bottom) + 84px); display: flex; align-items: center; gap: 14px;
  padding: 6px 6px 6px 20px; border-radius: 999px; background: var(--glass); backdrop-filter: blur(20px) saturate(1.7); -webkit-backdrop-filter: blur(20px) saturate(1.7);
  box-shadow: var(--shadow), inset 0 0 0 .5px var(--sep); max-width: calc(100vw - 32px); }
.undo.anim { animation: rise .25s cubic-bezier(.2, 1.1, .4, 1); }
.undo.in-sheet { bottom: calc(var(--safe-bottom) + 140px); }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 20px); } }
.undo span { font-size: calc(15px * var(--ts)); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.undo button { min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 700; flex: none; }
.toast { position: fixed; z-index: 300; left: 50%; transform: translateX(-50%); top: calc(var(--safe-top) + 12px); max-width: calc(100vw - 32px);
  padding: 12px 18px; border-radius: 18px; background: var(--fg); color: var(--bg); font-size: calc(15px * var(--ts)); font-weight: 600; box-shadow: var(--shadow); }
.toast.anim { animation: fade .2s; }
.toast.err { background: var(--red-bg); color: #fff; }
.live { position: fixed; z-index: 55; top: calc(var(--safe-top) + 6px); left: 50%; transform: translateX(-50%); font-size: calc(12px * var(--ts)); font-weight: 700; padding: 4px 10px;
  border-radius: 999px; background: var(--orange); color: #fff; }

/* ─── Connexion ─── */
.login { max-width: 420px; margin: 0 auto; padding: calc(var(--safe-top) + 40px) 16px calc(var(--safe-bottom) + 24px); }
.login .brand { display: flex; flex-direction: column; align-items: center; gap: 10px; padding-bottom: 24px; text-align: center; }
.login .brand img { width: 60px; height: 60px; border-radius: 16px; }
.login .brand img.wordmark { width: min(240px, 70vw); height: auto; border-radius: 0; margin-bottom: 6px; }
.login .brand h1 { margin: 0; font-size: calc(28px * var(--ts)); }
.login .brand .hk-logo-h { width: min(360px, 84vw); line-height: 0; color: var(--fg); }
.login .brand .hk-logo { width: 100%; height: auto; display: block; overflow: visible; }
.login .brand p { margin: 0; color: var(--sec); }
.demo-code { margin-top: 6px; font-size: calc(14px * var(--ts)); color: var(--muted, var(--fg)); }
.demo-code b { font-size: calc(18px * var(--ts)); letter-spacing: 2px; color: var(--fg); }
.pin-dots { display: flex; justify-content: center; gap: 16px; margin: 10px 0 8px; height: 16px; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--fg); }
.pin-dots i.on { background: var(--fg); }
.pad { display: grid; grid-template-columns: repeat(3, 76px); gap: 16px 24px; justify-content: center; margin-top: 22px; }
.pad button { width: 76px; height: 76px; border-radius: 50%; background: var(--fill); font: 500 30px ui-rounded, -apple-system, sans-serif; }
.pad button.ok { background: var(--accent); color: var(--on-accent); font-size: 17px; font-weight: 700; }
.pad button.txt { background: none; font-size: 15px; font-weight: 600; color: var(--accent); }
.pad button svg { width: 26px; height: 26px; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }

/* ─── Messages, signalements ─── */
.msg { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.msg .top { display: flex; align-items: baseline; gap: 8px; font-size: calc(13px * var(--ts)); color: var(--sec); }
.msg .top b { color: var(--fg); font-size: calc(15px * var(--ts)); }
.msg .top .t { margin-inline-start: auto; font-variant-numeric: tabular-nums; }
.msg .txt { font-size: calc(17px * var(--ts)); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.unread .txt { font-weight: 600; }
.steps { display: flex; gap: 6px; flex-wrap: wrap; }
.step { min-height: 40px; padding: 0 14px; border-radius: 999px; font-size: calc(14px * var(--ts)); font-weight: 600; display: inline-flex; align-items: center; gap: 6px;
  background: var(--fill); color: var(--fg); }
.step.on { background: var(--green); color: var(--on-accent); }
.step svg { width: 14px; height: 14px; }
.track { font-size: calc(13px * var(--ts)); color: var(--sec); display: flex; flex-direction: column; gap: 2px; }
.track b { color: var(--fg); font-weight: 600; }
.tagline { display: inline-flex; align-items: center; gap: 4px; font-size: calc(12px * var(--ts)); font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--fill); color: var(--sec); }
.tagline.done { background: color-mix(in srgb, var(--green) 18%, transparent); color: var(--green); }
.thumb { width: 100%; max-height: 220px; object-fit: cover; border-radius: 14px; display: block; }
.photo-pick { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; border-radius: 14px; background: var(--fill); color: var(--accent); font-weight: 600; width: 100%; }
.photo-pick svg { width: 20px; height: 20px; }
.viewer { position: fixed; inset: 0; z-index: 250; background: rgba(0, 0, 0, .92); display: flex; align-items: center; justify-content: center; }
.viewer img { max-width: 100%; max-height: 100%; }

/* ─── Historique ─── */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 14px; }
.cal .h { text-align: center; font-size: calc(12px * var(--ts)); font-weight: 600; color: var(--sec); }
.cal .d { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: color-mix(in srgb, var(--sec) 60%, transparent); }
.cal .d.has { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.cal .d.today { box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent); }
.month-nav { display: flex; align-items: center; justify-content: space-between; min-height: 52px; }

/* ─── Divers ─── */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.pad16 { padding: 16px; }
.mt14 { margin-top: 14px; } .mt20 { margin-top: 20px; } .mt28 { margin-top: 28px; }
.muted { color: var(--sec); }
.small { font-size: calc(13px * var(--ts)); }
.hint { font-size: calc(13px * var(--ts)); color: var(--orange); }
.person-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.right { margin-inline-start: auto; }
/* Mouvements réduits : tout s'arrête sauf les alertes (clignotement lent, demandé par l'hôtel) */
@media (prefers-reduced-motion: reduce) { *:not(.blink):not(.alarm):not([data-blink]), *::before, *::after { animation: none !important; transition: none !important; } }
@media print { #app { display: none !important; } }

.conn { display: inline-flex; align-items: center; gap: 6px; flex: none; font-size: calc(12px * var(--ts)); font-weight: 700; padding: 5px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); white-space: nowrap; }
.conn i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.conn.off { background: color-mix(in srgb, var(--orange) 18%, transparent); color: var(--orange); }
.conn.off i { animation: pulse 1.2s infinite; }
@media (max-width: 380px) { .conn { font-size: 0; gap: 0; padding: 7px; } }

/* ─── Avis « chambre faite » (réception) ─── */
@keyframes blink { 0%, 100% { background: var(--red-bg); color: #fff; box-shadow: 0 0 0 0 color-mix(in srgb, var(--red) 55%, transparent); }
  50% { background: #6E140C; color: #fff; box-shadow: 0 0 0 7px transparent; } }
.blink { animation: blink 1.1s ease-in-out infinite; background: var(--red-bg); color: #fff; }
.notice { display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 10px 14px 10px 16px; }
.notice .main { flex: 1; min-width: 0; cursor: pointer; }
.notice .code { font-size: calc(20px * var(--ts)); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.notice .meta { font-size: calc(15px * var(--ts)); color: var(--sec); }
.notice:not(.wait) .code { color: var(--sec); }
.notice .ack { flex: none; min-height: 44px; padding: 0 18px; border-radius: 999px; font-weight: 700; font-size: calc(15px * var(--ts)); }
.notice .acked { flex: none; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--green);
  background: color-mix(in srgb, var(--green) 16%, transparent); }
.notice .acked svg { width: 16px; height: 16px; }
.notice-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 52px; padding: 8px 8px 8px 20px;
  border-radius: 999px; margin-bottom: 14px; font-weight: 700; text-align: start; }
.notice-banner .go { flex: none; padding: 8px 16px; border-radius: 999px; background: rgba(255, 255, 255, .22); }

/* ─── Menu latéral : caché sur téléphone ─── */
.side-brand, .side-wm, .tabbar .side-me, .side-title { display: none; }

/* Menu déroulant Messagerie : sur téléphone une barre flottante au-dessus du menu ; sur ordinateur les trois entrées sous « Messagerie » */
.tabbar .subtabs { position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); display: flex; gap: 2px; padding: 4px; border-radius: 999px;
  background: var(--glass); backdrop-filter: blur(20px) saturate(1.7); -webkit-backdrop-filter: blur(20px) saturate(1.7); box-shadow: var(--shadow), inset 0 0 0 .5px var(--sep); }
.tabbar .grp-btn .chev { display: none; width: 16px; height: 16px; transition: transform .2s; }
.tabbar .grp-btn .chev svg { width: 100%; height: 100%; }
.tabbar.many .subtabs button:not(.on) .lbl { display: inline; }
.tabbar.many .subtabs button, .tabbar.many .subtabs button.on { min-width: 64px; padding: 0 8px; }

/* Beaucoup d'onglets (réception) sur téléphone ou tablette : icônes seules, le nom seulement pour l'onglet ouvert */
@media (max-width: 1023px) {
  .tabbar.many button { min-width: 46px; padding: 0 8px; }
  .tabbar.many button:not(.on) .lbl { display: none; }
  .tabbar.many button.on { padding: 0 14px; }
  .tabbar.many .count { inset-inline-end: 4px; }
}

/* ─── Petits téléphones (iPhone SE, 320–360 px) ─── */
@media (max-width: 360px) {
  .screen { padding-inline-start: 12px; padding-inline-end: 12px; }
  .tabbar button { min-width: 54px; padding: 0 4px; }
  .large-title { font-size: 30px; }
  .notice .ack { padding: 0 12px; }
  .seg button { padding: 0 8px; font-size: 13.5px; }
  .notice { gap: 10px; padding-inline-start: 12px; }
}

/* ─── Tablette et ordinateur : les feuilles deviennent des fenêtres centrées ─── */
@media (min-width: 760px) and (min-height: 600px) {
  .sheet { top: 5vh; bottom: 5vh; border-radius: 24px; max-width: 680px; box-shadow: 0 10px 50px rgba(0, 0, 0, .35); }
  .sheet.level2 { top: 7vh; bottom: 7vh; }
  .sheet .grab { visibility: hidden; }
  .sheet .body { padding-bottom: 24px; }
  .sheet .tools { padding-bottom: 12px; border-radius: 0 0 24px 24px; }
}

/* ─── Ordinateur : menu à gauche, contenu large ─── */
@media (min-width: 1024px) {
  .topfade { display: none; }
  .screen { margin: 0; margin-inline-start: 232px; max-width: none; padding: 28px 40px 60px; }
  .screen.no-side { margin: 0 auto; max-width: 640px; padding: 28px 16px 60px; }   /* connexion : pas de menu à gauche */
  .screen > * , .screen .duo { margin-inline-start: auto; margin-inline-end: auto; }
  .screen > .fold { margin-inline-start: auto; margin-inline-end: auto; }   /* « Clôturés » : même colonne que les cartes */
  .screen.tab-messages > *, .screen.tab-signalements > *, .screen.tab-historique > *, .screen.tab-equipe > * { max-width: 860px; }
  .screen.tab-feuilles > *, .screen.tab-gouvernante > * { max-width: 1120px; }
  .screen.tab-jour > .duo { max-width: 1320px; }
  .duo { display: grid; grid-template-columns: minmax(0, 1fr) var(--side, 470px); gap: 28px; align-items: start; }
  .duo .side { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; scrollbar-width: thin; padding-bottom: 8px; }
  .side-title { display: block; font-size: calc(22px * var(--ts)); font-weight: 700; padding: 10px 4px 14px; }
  .header .logo { display: none; }

  .tabbar { inset-inline-start: 0; top: 0; bottom: 0; transform: none; width: 232px; max-width: none; flex-direction: column; align-items: stretch; gap: 4px;
    padding: 22px 14px 18px; border-radius: 0; box-shadow: inset -.5px 0 var(--sep); background: var(--card); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .tabbar button { flex-direction: row; justify-content: flex-start; gap: 12px; height: 46px; min-width: 0; padding: 0 14px; border-radius: 12px; font-size: 16px; font-weight: 600; }
  .tabbar button svg { width: 22px; height: 22px; }
  .tabbar .subtabs { position: static; transform: none; flex-direction: column; gap: 2px; padding: 0 0 4px 20px; background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; border-radius: 0; }
  .tabbar .subtabs button { height: 40px; font-size: 15px; }
  .tabbar .grp-btn .chev { display: inline-flex; margin-inline-start: auto; }
  .tabbar .grp-btn .count + .chev { margin-inline-start: 8px; }
  .tabbar button:hover:not(.on) { background: color-mix(in srgb, var(--fill) 60%, transparent); }
  .tabbar .count { position: static; margin-inline-start: auto; height: 22px; min-width: 22px; border-radius: 11px; font-size: 12px; }
  .side-brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 22px; }
  .side-brand img { width: 40px; height: 40px; border-radius: 11px; }
  .side-brand b { display: block; font-size: calc(17px * var(--ts)); }
  .side-brand span { display: block; font-size: calc(13px * var(--ts)); color: var(--sec); }
  .tabbar .side-me { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; text-align: start; margin-top: auto; height: auto; min-height: 56px;
    padding: 8px 14px; font-size: 15px; border-top: .5px solid var(--sep); border-radius: 0; }
  .tabbar .side-me .me-txt { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
  .tabbar .side-me small { font-size: 12px; color: var(--sec); font-weight: 500; }

  .undo, .toast, .live { left: calc(50% + 116px); }
  .undo { bottom: 28px; }
  .undo.in-sheet { bottom: 28px; }
  .room-row:hover, .notice:hover { background: color-mix(in srgb, var(--fill) 45%, transparent); }
  .screen .pills { max-width: 640px; }
  .screen .mt14 > .pill, .screen > .pill { max-width: 420px; }
  .duo .side .pills { max-width: none; }
}

/* Plan : numéro complet (A204, SSA001), taille selon la longueur, comme sur les feuilles */
.tile .n.l4 { font-size: calc(var(--t) * .29); letter-spacing: -.02em; }
.tile .n.l5 { font-size: calc(var(--t) * .245); letter-spacing: -.03em; }
.tile .n.l6 { font-size: calc(var(--t) * .21); letter-spacing: -.03em; }

/* Message reçu : « Lu » clignote tant qu'il n'est pas touché ; avis de changement ; texte sur plusieurs lignes */
.step[data-blink] { animation: blink 1.1s ease-in-out infinite; background: var(--red-bg); color: #fff; }
.msg .txt { white-space: pre-line; }
.tagline.change { background: color-mix(in srgb, var(--orange) 16%, transparent); color: var(--orange); }
.msg .top .urgent-tag { margin-inline-end: 2px; }
.notice .ack { background: var(--fill); color: var(--fg); }

/* ── Discussions : bulles, zone de réponse ── */
.thread-btn .dot { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #fff; color: var(--red); font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.chat { display: flex; flex-direction: column; gap: 6px; padding: 4px 2px 8px; }
.chat-empty { color: var(--sec); font-size: calc(15px * var(--ts)); text-align: center; padding: 14px 0; }
.bub { position: relative; -webkit-touch-callout: none; align-self: flex-start; max-width: 82%; background: var(--card); border-radius: 18px 18px 18px 6px; padding: 8px 12px; box-shadow: 0 1px 0 var(--sep); }
.bub.me { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-radius: 18px 18px 6px 18px; }
.bub .who { font-size: calc(13px * var(--ts)); font-weight: 700; padding-bottom: 2px; }
.bub .t { font-size: calc(16px * var(--ts)); white-space: pre-line; overflow-wrap: anywhere; }
.bub .h { font-size: calc(11px * var(--ts)); opacity: .65; text-align: end; padding-top: 2px; font-variant-numeric: tabular-nums; }
.reply-line { display: flex; gap: 8px; align-items: flex-end; }
.reply-line textarea { flex: 1; min-height: 44px; max-height: 140px; resize: none; field-sizing: content; }
.reply-line .send { width: 44px; height: 44px; flex: none; border-radius: 22px; background: var(--accent); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; }
.reply-line .send svg { width: 20px; height: 20px; }

/* ── Groupe général ── */
.group-row { gap: 12px; }
.group-av { width: 40px; height: 40px; background: var(--accent); color: var(--on-accent); flex: none; }
.group-av svg { width: 22px; height: 22px; }
.gr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gr-prev { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.group-row .count { position: static; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--red-bg); color: #fff; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.bub-ph { display: block; margin: 2px 0 4px; }
.bub-ph img { display: block; width: min(240px, 60vw); height: 180px; object-fit: cover; border-radius: 12px; }
.bub .h { display: flex; justify-content: flex-end; gap: 10px; align-items: baseline; }
.bub .rm { font-size: calc(11px * var(--ts)); font-weight: 600; color: inherit; opacity: .8; text-decoration: underline; }
.bub .edit-box { display: grid; gap: 8px; min-width: min(260px, 60vw); }
.bub .edit-box textarea { width: 100%; }
.bub .edit-actions { display: flex; justify-content: flex-end; gap: 8px; }
.bub .rm.on {opacity: 1; color: #fff; background: var(--red-bg); border-radius: 8px; padding: 1px 6px; text-decoration: none; }
.reply-line .send.soft { background: var(--fill); color: var(--accent); cursor: pointer; }
.grp-pick { display: flex; align-items: center; gap: 10px; }
.grp-pick img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.grp-pick .pill { flex: 1; }

.mention { font-weight: 700; color: var(--accent); }
.mention.me { background: color-mix(in srgb, var(--accent) 16%, transparent); border-radius: 6px; padding: 0 3px; }
.bub.me .mention { color: inherit; text-decoration: underline; }
.bub.me .mention.me { background: rgba(255, 255, 255, .22); }
.mention-row .chip { min-height: 32px; font-size: calc(14px * var(--ts)); padding: 0 12px; flex: none; }

/* ── Logo Alfred Hotels (lettres seules, fond transparent) ── */
.wordmark { display: block; height: auto; filter: var(--wm-filter, none); }
.side-wm { padding: 4px 8px 18px; }
.side-wm .wordmark { width: 150px; }
.about-wm { display: flex; justify-content: center; padding: 22px 0 6px; }
.about-wm .wordmark { width: 150px; opacity: .85; }
@media (min-width: 1024px) { .side-wm { display: block; } }

/* ─── Préparer la journée : plein écran ─── */
.sheet.full { top: 0; bottom: 0; inset-inline-start: 0; inset-inline-end: 0; max-width: none; margin: 0; border-radius: 0; z-index: 95; padding-top: var(--safe-top); box-shadow: none; }
.sheet.full.anim { animation: fade .2s; }
.sheet.short { top: auto; max-height: 70%; }   /* petite confirmation : pas toute la hauteur */
.sheet.full .grab { display: none; }
.sheet-scrim:has(+ .sheet.full) { z-index: 94; }
.sheet.level2 { z-index: 97; }
.sheet-scrim.level2 { z-index: 96; }
.sheet .nav .ttl small { display: block; font-size: calc(12px * var(--ts)); font-weight: 500; color: var(--sec); }
.sheet.full .nav { padding: 8px 14px; }
.sheet.full .tools { padding-top: 8px; gap: 6px; }
.sheet.full .plan { padding: 12px 6px; }
.sheet.full .tile { transition: transform .08s; }
.sheet.full .plan .tile:active { transform: scale(.94); }
.sheet .nav .nav-l { display: flex; align-items: center; gap: 8px; min-width: 44px; }

/* En-tête : Réglages, titre + résumé, Terminé */
.ed-nav .ttl { text-align: start; min-width: 0; }
.ed-nav .ttl h2 { margin: 0; font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-nav .ttl small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-done { width: auto; flex: none; gap: 6px; padding: 0 16px 0 12px; }
.ed-done svg { width: 18px; height: 18px; stroke-width: 2.6; }

/* Plan de l'éditeur */
.ed-card { user-select: none; -webkit-user-select: none; }
.ed-bat { margin: 2px 0 10px; }
.ed-bat .seg button { min-height: 44px; }
.ed-bat .seg-n { background: rgba(127, 127, 127, .25); color: inherit; }
.tile.et { overflow: hidden; }
.tile.et .n { margin-top: calc(var(--t) * -.1); }
.tile.et .k { left: calc(var(--t) * .08); top: calc(var(--t) * .05); bottom: auto; font-size: max(9px, calc(var(--t) * .19)); line-height: 1; }
.tile.et .p { right: calc(var(--t) * .06); top: calc(var(--t) * .05); width: calc(var(--t) * .2); height: calc(var(--t) * .2); }
.tile.et .p svg { width: 100%; height: 100%; }
.tile.et .mk { top: calc(var(--t) * .05); }
.tile.et .who { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--t) * .27); display: flex; align-items: center; justify-content: center; gap: 2px;
  font: 800 max(8px, calc(var(--t) * .17)) -apple-system, sans-serif; color: #fff; letter-spacing: .01em; }
.tile.et.has .who { background: color-mix(in srgb, var(--pc) 78%, #000); }
.tile.et .who, .tile.own .who { white-space: nowrap; overflow: hidden; line-height: 1; font-family: -apple-system, BlinkMacSystemFont, sans-serif; letter-spacing: 0; }
/* Plan du jour de la réception : comme l'éditeur, bandeau du bas à la couleur de la personne avec son prénom entier */
.tile.own, .tile.et { overflow: visible; }
.tile.et .who { border-radius: 0 0 8px 8px; }
.tile.et.rec .who { border-radius: 0 0 9px 9px; }
.tile.et .k { display: inline-flex; align-items: center; gap: 1px; }
.tile.et .k .pi { display: inline-flex; width: max(9px, calc(var(--t) * .2)); height: max(9px, calc(var(--t) * .2)); color: var(--orange); }
.tile.et .k .pi svg { width: 100%; height: 100%; }
.tile.et .s { position: absolute; top: -5px; right: -5px; bottom: auto; z-index: 1; display: inline-flex; border-radius: 50%; box-shadow: 0 0 0 2px var(--card); }
.tile.own .n { margin-top: calc(var(--t) * -.1); }
.tile.own .k { left: calc(var(--t) * .08); top: calc(var(--t) * .05); bottom: auto; font-size: max(9px, calc(var(--t) * .19)); line-height: 1; }
.tile.own .who { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--t) * .27); display: flex; align-items: center; justify-content: center; gap: 2px;
  font-weight: 800; font-family: -apple-system, BlinkMacSystemFont, sans-serif; color: #fff; background: color-mix(in srgb, var(--pc) 78%, #000); }
.tile.own .who { border-radius: 0 0 8px 8px; }
.tile.own.rec .who { bottom: -1.5px; left: -1.5px; right: -1.5px; border-radius: 0 0 9px 9px; }
.tile.own .k { display: inline-flex; align-items: center; gap: 1px; }
.tile.own .k .pi { display: inline-flex; width: max(9px, calc(var(--t) * .2)); height: max(9px, calc(var(--t) * .2)); color: var(--orange); }
.tile.own .k .pi svg { width: 100%; height: 100%; }
/* l'état dépasse sur le coin, comme une pastille de notification : l'intérieur garde de la place pour le numéro */
.tile.own .s { top: -5px; right: -5px; bottom: auto; z-index: 1; display: inline-flex; border-radius: 50%; box-shadow: 0 0 0 2px var(--card); }
.tile.et .who .s { position: static; display: inline-flex; }
.tile.et.dep { background: var(--bright); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .25), inset 0 0 0 1.5px color-mix(in srgb, var(--fg) 55%, transparent); }
.tile.et.rec { background: transparent; color: var(--fg); border: 1.5px dashed color-mix(in srgb, var(--fg) 70%, transparent); }
.tile.et.rec .who { bottom: -1.5px; left: -1.5px; right: -1.5px; }
.tile.et.out { background: transparent; border: none; box-shadow: inset 0 0 0 1px var(--sep); color: var(--sec); }
.tile.et.out .n { font-weight: 500; }
.tile.et.mine { box-shadow: 0 0 0 3px var(--pc), 0 2px 6px rgba(0, 0, 0, .2); }
.tile.et:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; z-index: 3; }

/* Légende sous le plan */
.lt { width: 20px; height: 20px; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; font: 800 10px -apple-system, sans-serif; font-style: normal; color: var(--fg); }
.lt.dep { background: var(--bright); box-shadow: 0 1px 2px rgba(0, 0, 0, .25), inset 0 0 0 1.5px color-mix(in srgb, var(--fg) 55%, transparent); }
.lt.rec { border: 1.5px dashed color-mix(in srgb, var(--fg) 70%, transparent); }
.lt.out { box-shadow: inset 0 0 0 1px var(--sep); }

/* Dessins des outils (mêmes signes que sur les cases) */
.ti { flex: none; width: 24px; height: 24px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font: 800 11px -apple-system, sans-serif; font-style: normal; line-height: 1; color: var(--fg); }
.ti.dep { background: var(--bright); box-shadow: 0 1px 2px rgba(0, 0, 0, .25), inset 0 0 0 1.5px color-mix(in srgb, var(--fg) 55%, transparent); color: var(--ink); }
.ti.rec { border: 1.5px dashed color-mix(in srgb, var(--fg) 70%, transparent); }
.ti.rm { color: var(--red); }
.ti.rm svg { width: 20px; height: 20px; stroke-width: 2.6; }
.ti.pr { color: var(--orange); }
.ti.pr svg { width: 20px; height: 20px; }
.ti.ar { width: 22px; height: 20px; border-radius: 5px; color: #fff; font-size: 12px; }
.ti.bk { width: 24px; height: 24px; border-radius: 6px; }
.ti.ar { background: var(--blue); }
.ti.bk img { width: 100%; height: 100%; display: block; border-radius: 6px; }

/* Étiquette d'une personne (même que le bas des cases) */
.wt { flex: none; min-width: 34px; height: 24px; padding: 0 6px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center;
  font: 800 12px -apple-system, sans-serif; font-style: normal; color: #fff; background: color-mix(in srgb, var(--pc) 78%, #000); }
.wt.none { background: var(--fill); color: var(--sec); }
/* Pastille de couleur seule (le prénom est écrit à côté, et en entier sur les cases) */
.wt.dot, .tools .ewho .wt.dot { min-width: 0; width: 14px; height: 14px; padding: 0; border-radius: 50%; }

/* Panneau des outils */
.ed-ctl { display: flex; flex-direction: column; gap: 10px; }
.ed-lab { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--sec); padding: 0 4px 6px; }
.ed-tools { display: grid; gap: 8px; }
.etool { position: relative; min-height: 48px; border-radius: 14px; background: var(--card); color: var(--fg); font-size: 15px; font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--sep), 0 1px 3px rgba(0, 0, 0, .06); display: flex; align-items: center; gap: 10px; padding: 0 12px; text-align: start; }
.etool .lb { flex: 1; min-width: 0; }
.etool.on, .ewho.on { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 2px var(--accent), 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent); }
.etool.on .ti.rec { border-color: currentColor; color: var(--on-accent); }
.etool.on .ti.rm, .etool.on .ti.pr { color: var(--on-accent); }
.tile:is(.kD, .kR, .kBR) .k, .ti:is(.kD, .kR, .kBR), .lt:is(.kD, .kR, .kBR) { color: var(--kc); }
.etool.on .ti.rec:is(.kR, .kBR) { color: var(--on-accent); }
.etool.danger:not(.on) .lb { color: var(--red); }
.ed-who { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ewho { min-height: 48px; border-radius: 14px; background: var(--card); color: var(--fg); font-size: 15px; font-weight: 600; box-shadow: inset 0 0 0 1px var(--sep), 0 1px 3px rgba(0, 0, 0, .06);
  display: flex; align-items: center; gap: 8px; padding: 0 10px; text-align: start; }
.ewho .lb { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ewho .cnt { flex: none; white-space: nowrap; min-width: 26px; height: 24px; padding: 0 7px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; background: var(--fill); }
.ewho.nobody { grid-column: 1 / -1; }
.ewho.on .cnt { background: rgba(255, 255, 255, .25); }
.ewho.on .wt { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .8); }
.ed-help { font-size: 13px; line-height: 1.5; color: var(--sec); padding: 10px 6px 0; }
.ed-help p { margin: 0 0 6px; }
.ed-help b { color: var(--fg); font-weight: 600; }
.ed-help kbd { font: 600 11px ui-monospace, Menlo, monospace; min-width: 18px; display: inline-block; padding: 1px 5px; border-radius: 5px; text-align: center;
  border: 1px solid color-mix(in srgb, var(--fg) 30%, transparent); color: var(--fg); background: var(--card); }
.ed-extra { padding: 0 0 16px; }
.ed-extra .chip { min-height: 44px; padding: 0 14px; font-size: 14px; }
.ed-danger { padding: 14px 0 0; }
.ed-danger .pill svg { width: 18px; height: 18px; }
.sheet.full .body { padding-bottom: 24px; }

@media (min-width: 900px) {
  .sheet.full .ed.split { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 400px; }
  .ed-plan { overflow-y: auto; padding: 0 12px 16px 24px; }
  .ed-card { border-radius: 22px; }
  .ed-side { overflow-y: auto; padding: 0 24px 24px; border-inline-start: .5px solid var(--sep); }
  .ed-side > .seg { margin-bottom: 14px; }
  .ed-side > .seg button { min-height: 44px; }
  .ed-side .ed-extra { padding-bottom: 8px; }
  .ed-side .ed-ctl { padding: 0 0 16px; gap: 14px; }
  .ed-tools.four, .ed-tools.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .etool, .ewho { min-height: 52px; font-size: 16px; }
  .ed-nav { padding-inline-start: 24px !important; padding-inline-end: 24px !important; }
}
/* Écran bas : outils plus serrés pour que tout tienne sans défiler */
@media (min-width: 900px) and (max-height: 820px) {
  .ed-side .ed-ctl { gap: 8px; }
  .ed-side .ed-lab { padding-bottom: 3px; }
  .etool, .ewho { min-height: 46px; font-size: 15px; }
  .editing-split .undo, .editing-split .toast, .editing-split .live { inset-inline-start: calc((100% - 400px) / 2); }
  .editing-split .undo, .editing-split .undo.in-sheet { bottom: 24px; }
}

/* Téléphone et tablette : outils en bas, compacts (icône au-dessus du nom) */
@media (max-width: 899px) {
  .sheet.full .tools.ed-ctl { gap: 8px; padding-top: 8px; }
  .tools .ed-lab { display: none; }
  .tools .ed-tools.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tools .ed-tools.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tools .ed-tools { gap: 6px; }
  .tools .etool { flex-direction: column; justify-content: center; gap: 3px; min-height: 48px; padding: 4px 2px; font-size: 13px; text-align: center; border-radius: 12px; line-height: 1.1; }
  .tools .etool .ti { width: 22px; height: 20px; }
  .tools .etool .ti svg { width: 18px; height: 18px; }
  /* Personnes : une seule ligne qui défile (le bord droit s'efface pour montrer qu'il y en a d'autres) */
  .tools .ed-who { display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: -3px -16px; padding: 3px 16px;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
  .tools .ed-who::-webkit-scrollbar { display: none; }
  .tools .ewho { flex: none; min-height: 44px; font-size: 14px; padding: 0 8px; gap: 6px; border-radius: 12px; }
  .tools .ewho:last-child { margin-inline-end: 24px; }
  .tools .ewho .lb { overflow: visible; }
  .tools .ewho .wt { min-width: 30px; height: 22px; font-size: 11px; padding: 0 5px; }
  .tools .ewho .cnt { min-width: 22px; height: 22px; font-size: 12px; padding: 0 5px; }
  .editing .undo.in-sheet { bottom: calc(var(--safe-bottom) + 184px); }
}
@media (max-width: 360px) {
  .ed-bat .seg-n { display: none; }
  .ed-bat .seg button { padding: 0 8px; font-size: 14px; }
  .ed-done span { display: none; }
  .ed-done { padding: 0; width: 44px; border-radius: 50%; }
  .tools .etool { font-size: 12px; }
}
.chip .cnt { font-weight: 800; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; background: rgba(127, 127, 127, .22); }
.chip.on .cnt { background: rgba(255, 255, 255, .28); }
.ed-tabs { flex: none; padding: 0 16px 8px; }
.ed-tabs .seg button { min-height: 44px; }
.ed-tabs .seg button, .ed-side > .seg button { padding: 0 6px; font-size: 14.5px; }
.wt.all { background: var(--accent); }
.wt.all svg { width: 18px; height: 18px; }
/* Éditeur, « Tâches du jour » : une rangée Équipe + ceux qui travaillent, puis la carte de la personne choisie (tout tient sur un écran) */
.dt-who { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 10px; }
.dt-who .ewho { flex: 0 1 auto; min-height: 42px; padding: 0 12px 0 8px; gap: 8px; }
.dt-who .ewho .lb { flex: 0 1 auto; }
.dt-more { min-height: 42px; padding: 0 12px; border-radius: 14px; border: 1.5px dashed var(--sep); color: var(--sec); font-size: calc(15px * var(--ts)); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.dt-more svg { width: 16px; height: 16px; }
.dt-card { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.dt-card .bn-add { min-height: 42px; }
.dt-h { font-size: calc(15px * var(--ts)); font-weight: 700; padding-top: 2px; }
.dt-h:not(:first-child) { margin-top: 8px; }
.dt-row { display: flex; align-items: center; gap: 8px; min-height: 42px; padding-inline-start: 12px; border-radius: 12px; background: var(--fill); }
.dt-t { flex: 1; min-width: 0; font-size: calc(16px * var(--ts)); overflow-wrap: anywhere; }
.dt-ok { flex: none; font-size: calc(13px * var(--ts)); font-weight: 700; color: var(--green); }
.dt-x { flex: none; width: 44px; height: 42px; display: flex; align-items: center; justify-content: center; color: var(--sec); }
.dt-x svg { width: 18px; height: 18px; }
.dt-picks { gap: 6px; }
.dt-picks .chip { min-height: 38px; gap: 4px; }
.dt-picks .chip svg { width: 14px; height: 14px; }
.dt-link { align-self: flex-start; min-height: 40px; margin-top: 4px; color: var(--sec); font-size: calc(14px * var(--ts)); text-decoration: underline; text-underline-offset: 3px; }
/* Plan de l'éditeur : cases HRC et terrasses sous les bâtiments, arrondies pour ne pas ressembler à une chambre */
.plan .lvl.spots .tower { justify-content: flex-start; }
.plan .spot-row { display: flex; justify-content: center; gap: 4px; padding: 8px 4px 0; }
.plan .spot { flex: 1 1 0; min-width: 0; max-width: calc(var(--t) * 2.2); min-height: max(36px, calc(var(--t) * .72)); padding: 3px 4px; border-radius: 999px; border: 1.5px dashed var(--sep); color: var(--sec);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; line-height: 1.1; }
.plan .spot .sl { font-size: max(10px, calc(var(--t) * .2)); font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan .spot .sw { font-size: max(9px, calc(var(--t) * .17)); font-weight: 800; color: #fff; background: color-mix(in srgb, var(--pc) 78%, #000); border-radius: 999px; padding: 1px 6px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan .spot.has { border-style: solid; border-color: color-mix(in srgb, var(--pc) 70%, transparent); background: color-mix(in srgb, var(--pc) 12%, var(--card)); color: var(--fg); }
.plan .spot.mine { box-shadow: 0 0 0 3px var(--pc); }
.plan .spot:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.plan .spot-hours { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 6px; padding: 8px 4px 0; font-size: 13px; color: var(--sec); }
.plan .spot-hours .sh-l { font-weight: 700; color: var(--fg); }
.plan .sh-sel { min-height: 36px; padding: 0 8px; border-radius: 10px; background: var(--fill); color: var(--fg); font: inherit; font-weight: 700; border: none; }
.ed-present .toggle-row { min-height: 46px; padding-top: 0; padding-bottom: 0; }

/* ─── Discussion intégrée sous un message ou un signalement ─── */
.inline-thread { margin-top: 10px; padding-top: 10px; border-top: .5px solid var(--sep); display: flex; flex-direction: column; gap: 8px; }
.inline-thread .chat { padding: 0; }
.inline-thread .chat:empty { display: none; }
.inline-thread .reply-line textarea { min-height: 42px; }
.link-btn { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 4px; font-size: calc(14px * var(--ts)); font-weight: 600; color: var(--sec); }
.link-btn svg { width: 14px; height: 14px; }

/* ─── Un message ou un signalement = un ticket à part ─── */
.tickets { display: flex; flex-direction: column; gap: 14px; }
.ticket { box-shadow: 0 1px 3px rgba(0, 0, 0, .06), inset 0 0 0 .5px var(--sep); }
.ticket .msg { padding: 16px 18px 14px; }
.ticket .msg.unread { box-shadow: inset 4px 0 var(--red); }

.seg-n { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; margin-inline-start: 6px; border-radius: 10px; background: var(--red-bg); color: #fff; font-size: 12px; font-weight: 800; vertical-align: 1px; }

.fold { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 48px; margin: 18px 0 10px; padding: 0 18px; border-radius: 16px; background: var(--card); color: var(--sec); font-size: calc(15px * var(--ts)); font-weight: 600; box-shadow: inset 0 0 0 .5px var(--sep); }
.fold .chev { width: 18px; height: 18px; transition: transform .2s; display: inline-flex; }
.fold .chev svg { width: 100%; height: 100%; }

/* ─── Confirmation (ex. « faite » sur une chambre pas disponible) ─── */
.confirm-scrim { position: fixed; inset: 0; z-index: 120; background: rgba(0, 0, 0, .4); animation: fade .15s; }
.confirm { position: fixed; z-index: 121; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(340px, calc(100vw - 40px)); background: var(--bg); border-radius: 24px; padding: 24px 20px 16px; box-shadow: 0 10px 50px rgba(0, 0, 0, .35); text-align: center; }
.confirm p { font-size: calc(17px * var(--ts)); font-weight: 600; margin: 0 0 18px; }
.confirm p.confirm-sub { font-size: calc(15px * var(--ts)); font-weight: 400; margin: -8px 0 18px; }
.confirm-list { list-style: none; margin: -6px 0 18px; padding: 4px 14px; text-align: start; background: var(--glass); box-shadow: inset 0 0 0 .5px var(--sep); border-radius: 14px; max-height: 40vh; overflow-y: auto; overscroll-behavior: none; }
.confirm-list li { font-size: calc(16px * var(--ts)); font-weight: 600; padding: 9px 0; overflow-wrap: anywhere; }
.confirm-list li + li { border-block-start: .5px solid var(--sep); }
.confirm-btns { display: flex; gap: 10px; }
.confirm-btns button { flex: 1; min-height: 50px; border-radius: 999px; font-size: calc(16px * var(--ts)); font-weight: 700; background: var(--glass); box-shadow: inset 0 0 0 .5px var(--sep); }
.confirm-btns .yes { background: var(--accent); color: var(--on-accent); box-shadow: none; }

.notice-banner { border-radius: 24px; padding: 10px 10px 10px 20px; }
.notice-banner .nb-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.notice-banner .nb-prev { font-weight: 500; font-size: calc(14px * var(--ts)); opacity: .95; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.notice-banner .nb-prev b { font-weight: 700; }

.notice-banner .nb-prev.one { -webkit-line-clamp: 1; }

/* Interrupteurs du plan (au-dessus) */
.chks{margin:0 0 12px;padding:0}
.chks.under{margin:12px 0 0}
.chks .toggle-row{min-height:46px}

/* ═══════════ Discussions : liste, conversation, bulles ═══════════ */
.chat-list { padding: 4px 0; overflow: hidden; }
.chat-sec { padding: 18px 18px 8px; }
.chat-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 16px; text-align: start; }
.chat-row .cr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.chat-row .cr-top { display: flex; align-items: baseline; gap: 8px; }
.chat-row .cr-top b { flex: 1; min-width: 0; font-size: calc(17px * var(--ts)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-row .cr-t { font-size: calc(12px * var(--ts)); color: var(--sec); font-variant-numeric: tabular-nums; }
.chat-row .cr-t.new { color: var(--accent); font-weight: 700; }
.chat-row .cr-last { font-size: calc(15px * var(--ts)); color: var(--sec); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-row .count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--red-bg); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.avatar svg { width: 55%; height: 55%; }
.avatar.bot { background: var(--card); box-shadow: inset 0 0 0 1px var(--sep); }
.avatar.bot img { width: 70%; height: 70%; object-fit: contain; }

.screen.chat-open { padding: 0; max-width: none; }
.chat-view { display: flex; flex-direction: column; height: 100dvh; width: 100%; background: var(--bg); }
.chat-head { display: flex; align-items: center; gap: 10px; padding: calc(var(--safe-top) + 8px) 12px 8px; border-bottom: 1px solid var(--sep); background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.chat-head .ch-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-head .ch-title b { font-size: calc(17px * var(--ts)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-head .ch-title small { font-size: calc(12px * var(--ts)); color: var(--sec); }
.chat-head .small-pill { height: 36px; padding: 0 14px; font-size: calc(14px * var(--ts)); width: auto; flex: none; }
.chat-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: none; display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 14px; }
.chat-foot { padding: 8px 12px calc(var(--safe-bottom) + 10px); border-top: 1px solid var(--sep); background: var(--bg); display: grid; gap: 8px; }
.chat-foot .mention-row { margin: 0; }

.cbw { display: flex; flex-direction: column; align-items: flex-start; max-width: 100%; }
.cbw.me { align-items: flex-end; }
.cbw.flash .cb { animation: flash 1.2s; }
@keyframes flash { 0%, 60% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 1px 0 var(--sep); } }
.cb { position: relative; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; max-width: min(82%, 520px); background: var(--card); border-radius: 18px 18px 18px 6px; padding: 7px 11px 5px; box-shadow: 0 1px 0 var(--sep); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cbw.me .cb { background: var(--accent); color: var(--on-accent); border-radius: 18px 18px 6px 18px; }
.cb.sel { outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent); }
.cb .who { font-size: calc(13px * var(--ts)); font-weight: 700; padding-bottom: 1px; }
.cb .t { font-size: calc(16px * var(--ts)); white-space: pre-line; overflow-wrap: anywhere; }
.cb .t.del { font-style: italic; opacity: .65; }
.cb .h { display: flex; justify-content: flex-end; align-items: baseline; gap: 6px; font-size: calc(11px * var(--ts)); opacity: .7; padding-top: 1px; font-variant-numeric: tabular-nums; }
.cb .h i { font-style: italic; }
.cb .tk { letter-spacing: -2px; font-size: calc(12px * var(--ts)); }
.cb .tk.all { color: #7fd0ff; opacity: 1; }
.cbw:not(.me) .cb .tk.all { color: var(--blue); }
.cb .bub-ph { display: block; margin: 2px 0 4px; }
.cb .quote { display: flex; flex-direction: column; text-align: start; width: 100%; margin: 2px 0 5px; padding: 4px 8px; border-radius: 8px; border-inline-start: 3px solid var(--accent); background: var(--fill); font-size: calc(13px * var(--ts)); gap: 1px; }
.cbw.me .cb .quote { background: rgba(255, 255, 255, .2); border-inline-start-color: #fff; }
.cb .quote span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; opacity: .85; }
.cb .edit-box { display: grid; gap: 8px; min-width: min(280px, 64vw); }
.cb .edit-box textarea { width: 100%; }
.cb .edit-actions { display: flex; justify-content: flex-end; gap: 8px; }
.cb .mention { font-weight: 700; color: var(--accent); }
.cbw.me .cb .mention { color: inherit; text-decoration: underline; }
.cbw.me .cb .mention.me { background: rgba(255, 255, 255, .22); }
.cb .botcard { display: grid; gap: 4px; min-width: 200px; padding-bottom: 2px; }
.cb .bc-top { display: flex; align-items: center; gap: 8px; }
.cb .bc-ic { width: 26px; height: 26px; border-radius: 8px; background: var(--accent); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; }
.cb .bc-ic svg { width: 16px; height: 16px; }
.cb .bc-line { font-size: calc(15px * var(--ts)); }
.cb .bc-codes { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 2px; }
.cb .bc-codes span { background: var(--fill); border-radius: 8px; padding: 2px 8px; font-weight: 700; font-size: calc(14px * var(--ts)); }
.cb.bot { border-inline-start: 4px solid var(--accent); }

.reacts { display: flex; gap: 4px; margin: -6px 10px 2px; position: relative; z-index: 1; }
.rx { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 12px; background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.18); font-size: calc(14px * var(--ts)); }
.rx small { font-size: calc(11px * var(--ts)); font-weight: 700; color: var(--sec); }
.rx.mine { outline: 1.5px solid var(--accent); }
.msg-actions { display: grid; gap: 6px; margin: 4px 0 6px; max-width: min(92%, 420px); }
.rx-row { display: flex; gap: 2px; padding: 4px 6px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); width: fit-content; }
.rx-row button { font-size: calc(24px * var(--ts)); width: 40px; height: 40px; border-radius: 50%; }
.ma-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.ma-btns button { padding: 6px 14px; border-radius: 999px; background: var(--card); box-shadow: 0 1px 0 var(--sep); font-size: calc(14px * var(--ts)); font-weight: 600; color: var(--accent); }
.ma-btns button.red { color: var(--red); }
.ma-btns button.red.on { background: var(--red-bg); color: #fff; }
.msg-actions .vu { font-size: calc(13px * var(--ts)); color: var(--sec); padding: 0 4px; }
.day-sep { align-self: center; margin: 10px 0 6px; }
.day-sep span { font-size: calc(12px * var(--ts)); font-weight: 600; color: var(--sec); background: var(--fill); padding: 3px 12px; border-radius: 999px; text-transform: capitalize; }
.chat-scroll .more { align-self: center; font-size: calc(14px * var(--ts)); font-weight: 600; color: var(--accent); padding: 8px 16px; }
.chat-scroll .legacy { margin: 6px 0; align-self: stretch; }
.reply-bar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; background: var(--fill); border-inline-start: 3px solid var(--accent); }
.reply-bar span { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: calc(13px * var(--ts)); overflow: hidden; }
.reply-bar span b { font-size: calc(13px * var(--ts)); }
.reply-bar button svg { width: 18px; height: 18px; }
/* Discussion ouverte : la barre du bas reste visible (25 nov. 2026, Nathan : « mettre les onglets en dessous, même dans les discussions ») ; la discussion lui laisse la place.
   Clavier ouvert (champ d'écriture touché) : la barre se cache, la discussion reprend toute la hauteur. */
@media (max-width: 1023px) {
  body.in-chat .chat-view { padding-bottom: calc(var(--safe-bottom) + 92px); }
  body.in-chat .chat-foot { padding-bottom: 10px; }
  body.in-chat:has(.chat-view textarea:focus) .tabbar { display: none; }
  body.in-chat:has(.chat-view textarea:focus) .chat-view { padding-bottom: 0; }
  body.in-chat:has(.chat-view textarea:focus) .chat-foot { padding-bottom: calc(var(--safe-bottom) + 10px); }
}
/* Discussion ouverte sur téléphone : calée sur la zone réellement visible (--vvh / --vvt posées par keepChatFit, main.js). Safari garde parfois la hauteur « clavier ouvert » une fois le clavier baissé. */
/* Fenêtre « Signaler un problème » : la barre du bas reste visible au-dessus (25 nov. 2026, Nathan : « les onglets en dessous, même dans signalements »).
   Clavier ouvert (champ touché) : la barre se cache et la fenêtre reprend toute la hauteur. */
@media (max-width: 1023px) {
  body.rep-open .tabbar { z-index: 100; }
  body.rep-open .sheet.rep { padding-bottom: calc(var(--safe-bottom) + 92px); }
  body.rep-open .sheet.rep .body { padding-bottom: 24px; }
  body.rep-open:has(.sheet.rep :is(input, textarea):focus) .tabbar { display: none; }
  body.rep-open:has(.sheet.rep :is(input, textarea):focus) .sheet.rep { padding-bottom: 0; }
  body.rep-open:has(.sheet.rep :is(input, textarea):focus) .sheet.rep .body { padding-bottom: calc(var(--safe-bottom) + 24px); }
}
@media (max-width: 1023px) { body.in-chat .chat-view { position: fixed; inset-inline-start: 0; top: var(--vvt, 0px); height: var(--vvh, 100dvh); z-index: 5; } }
.cbw.me .cb .quote b, .cbw.me .cb .who { color: inherit !important; }


/* ═══ Tâches : une carte partout (écran Jour, onglet Tâches) ═══ */
.tc-list { padding: 2px 0; margin-bottom: 4px; }
.tc { display: flex; align-items: flex-start; gap: 12px; padding: 12px 12px 12px 14px; position: relative; }
.tc-ic { flex: none; width: 34px; height: 34px; margin-top: 2px; border-radius: 10px; display: grid; place-items: center; background: var(--fill); color: var(--accent); }
.tc-ic svg { width: 19px; height: 19px; }
.tc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.tc-main { display: flex; flex-direction: column; gap: 3px; text-align: start; width: 100%; min-height: 40px; justify-content: center; }
.tc-text { font-size: calc(16.5px * var(--ts)); font-weight: 600; line-height: 1.3; white-space: pre-line; overflow-wrap: anywhere; }
.tc:not(.open) .tc-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tc-meta { font-size: calc(13px * var(--ts)); color: var(--sec); line-height: 1.35; }
.tc-new { color: var(--accent); }
.tc-urg { display: inline-block; margin-inline-end: 6px; padding: 1px 7px; border-radius: 6px; background: var(--red-bg); color: #fff; font-size: calc(11.5px * var(--ts)); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; vertical-align: 2px; }
.tc-btns { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; align-self: center; }
.tc-b { min-height: 44px; min-width: 74px; padding: 0 14px; border-radius: 22px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: calc(15px * var(--ts)); font-weight: 700; background: var(--fill); color: var(--fg); }
.tc-b svg { width: 16px; height: 16px; }
.tc-b.ok { background: var(--green); color: var(--on-accent); }
.tc-b.red { background: var(--red-bg); color: #fff; max-width: 120px; line-height: 1.1; text-align: center; }
.tc-b.red[data-blink] { animation: blink 1.1s ease-in-out infinite; }
.tc-b.soft { min-height: 34px; min-width: 0; font-size: calc(13px * var(--ts)); font-weight: 600; color: var(--sec); background: none; padding: 0 8px; }
.tc-did { display: inline-flex; align-items: center; gap: 5px; font-size: calc(14px * var(--ts)); font-weight: 700; color: var(--green); }
.tc-did svg { width: 15px; height: 15px; }
.tc.urg { background: color-mix(in srgb, var(--red) 9%, var(--card)); box-shadow: inset 4px 0 var(--red); }
.tc.urg .tc-ic { background: var(--red-bg); color: #fff; }
.tc.done .tc-text { color: var(--sec); font-weight: 500; }
.tc.done .tc-ic { color: var(--sec); }
.tc-track { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: calc(13.5px * var(--ts)); color: var(--sec); font-weight: 600; }
.tc-dots { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.tc-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: calc(10.5px * var(--ts)); font-weight: 800; color: var(--pc); background: transparent; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--pc) 55%, transparent); }
.tc-dot.seen { box-shadow: inset 0 0 0 2px var(--pc); }
.tc-dot.mid { background: color-mix(in srgb, var(--pc) 22%, transparent); box-shadow: inset 0 0 0 2px var(--pc); }
.tc-dot.ok { background: var(--pc); color: #fff; box-shadow: none; }
.tc-dot svg { width: 14px; height: 14px; }
.tc-closed { display: inline-flex; align-items: center; gap: 6px; font-size: calc(13.5px * var(--ts)); font-weight: 600; color: var(--green); }
.tc-closed svg { width: 15px; height: 15px; }
.tc-manage { display: flex; flex-wrap: wrap; gap: 8px; }
.tc-manage .red { color: var(--red); }
.tc-manage svg { width: 15px; height: 15px; }
.tc-ph img { max-width: 100%; border-radius: 12px; }
.tc-title { display: flex; align-items: center; gap: 8px; padding-bottom: 10px; }
.tc-title.red { color: var(--red); }
.tc-count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--accent); color: var(--on-accent); font-size: calc(13px * var(--ts)); font-weight: 800; display: inline-grid; place-items: center; }
.tc-link { margin-inline-start: auto; font-size: calc(14px * var(--ts)); font-weight: 600; color: var(--accent); min-height: 44px; padding: 0 10px; margin-block: -4px; margin-inline-end: -6px; text-transform: none; letter-spacing: 0; }   /* zone de toucher de 44 px (Apple), sans rien déplacer à l'écran (28 nov. 2026) */
.big-head .small-pill { min-height: 40px; }
.refus-ph { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; min-height: 36px; padding: 0 12px; border-radius: 18px; background: var(--fill); font-size: calc(14px * var(--ts)); font-weight: 600; color: var(--refus); }
.refus-ph svg { width: 17px; height: 17px; }
@media (max-width: 420px) {
  .tc { gap: 10px; padding: 12px 10px 12px 12px; }
  .tc-ic { width: 30px; height: 30px; }
  .tc-b { min-width: 64px; padding: 0 12px; }
}

/* ═══ Mouvement : sobre, court, et jamais rejoué à chaque clic ═══
   L'écran est mis à jour en douceur (les éléments restent en place) : une animation d'entrée ne joue donc qu'à l'apparition
   d'un élément, et les transitions (fond, largeur, rotation) se voient pour de vrai. */
:root { --ease: cubic-bezier(.22, .8, .24, 1); --spring: cubic-bezier(.3, 1.2, .5, 1); }

/* Changement d'onglet : fondu, puis les blocs montent l'un après l'autre */
@keyframes enter { from { opacity: 0; } }
@keyframes lift { from { opacity: 0; transform: translateY(10px); } }
.screen { animation: enter .2s ease-out; }
.screen > *, .screen .duo > .col > * { animation: lift .3s var(--ease) backwards; }
.screen > :nth-child(2), .duo > .col > :nth-child(2) { animation-delay: 30ms; }
.screen > :nth-child(3), .duo > .col > :nth-child(3) { animation-delay: 60ms; }
.screen > :nth-child(4), .duo > .col > :nth-child(4) { animation-delay: 90ms; }
.screen > :nth-child(5), .duo > .col > :nth-child(5) { animation-delay: 120ms; }
.screen > :nth-child(6), .duo > .col > :nth-child(6) { animation-delay: 150ms; }
.screen > :nth-child(n+7), .duo > .col > :nth-child(n+7) { animation-delay: 180ms; }
.screen.chat-open > * { animation: none; }

/* Touches : retour immédiat, retour au repos doux */
.press { transition: transform .16s var(--ease), opacity .16s, background-color .2s, color .2s; }
.press:active { transform: scale(.96); opacity: .8; transition-duration: .06s; }
.room-row, .notice, .chat-row, .row-btn, .toggle-row { transition: background-color .18s; }
.room-row:active, .notice:active, .chat-row:active, .row-btn:active, .toggle-row:active { background: var(--fill); transition-duration: .04s; }
.pill, .chip, .step, .glass-btn, .seg button, .tabbar button, .ack { transition: transform .16s var(--ease), opacity .16s, background-color .22s, color .22s, box-shadow .22s, filter .2s; }
.badge { transition: background-color .25s, width .25s var(--ease); }
.tile { transition: transform .14s var(--ease), box-shadow .22s, background-color .22s, color .22s; }
.tile:active { transform: scale(.93); }
.tile.sel { transform: scale(1.12); transition: transform .22s var(--spring); }
.switch, .switch::after { transition-duration: .22s; }
.switch::after { transition-timing-function: var(--spring); }
.seg button.on, .chip.on, .step.on { transition-duration: .22s; }
.pin-dots i { transition: background-color .12s, transform .18s var(--spring); }
.pin-dots i.on { transform: scale(1.18); }
.pad button { transition: transform .12s var(--ease), background-color .15s; }
.pad button:active { transform: scale(.9); background: color-mix(in srgb, var(--fg) 14%, transparent); }
.progress .bar i { transition: width .6s var(--ease), background-color .3s; }

/* Clavier : un contour net, seulement quand on navigue au clavier */
:focus { outline: none; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.field:focus-within { background: var(--fill); transition: background-color .18s; }
.input:focus-visible, .field input:focus-visible, textarea:focus-visible { outline-offset: 0; }
.input, textarea.input { transition: box-shadow .18s, background-color .18s; }
.input:focus, textarea.input:focus { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 55%, transparent); }

/* Souris : un léger souligné de survol, jamais sur téléphone */
@media (hover: hover) {
  .pill:hover:not([disabled]) { filter: brightness(1.07); }
  .pill.soft:hover:not([disabled]) { filter: none; background: color-mix(in srgb, var(--accent) 22%, transparent); }
  .glass-btn:hover, .seg button:not(.on):hover, .chip:not(.on):hover, .step:not(.on):hover { background-color: color-mix(in srgb, var(--fill) 120%, transparent); }
  .glass-btn:hover { transform: translateY(-1px); }
  .glass-btn:active { transform: scale(.96); }
  .tile:hover:not(.sel) { transform: translateY(-1px); }
  .room-row:hover, .notice:hover, .chat-row:hover, .row-btn:hover { background: color-mix(in srgb, var(--fill) 45%, transparent); }
}

/* Entrées : bulle, feuille, messages courts */
@keyframes sheetIn { from { opacity: 0; transform: translateY(18px) scale(.985); } }
@keyframes sheetOut { to { transform: translateY(100%); } }
@keyframes sheetFadeOut { to { opacity: 0; transform: translateY(14px) scale(.985); } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes popOut { to { opacity: 0; transform: scale(.92); } }
@keyframes drop { from { opacity: 0; transform: translate(-50%, -14px); } }
@keyframes fall { to { opacity: 0; transform: translate(-50%, 14px); } }
.sheet.out { animation: sheetOut .24s var(--ease) forwards; pointer-events: none; }
.sheet.full.out { animation: sheetFadeOut .2s ease-in forwards; }
.sheet-scrim.out, .scrim.out { pointer-events: none; }
.sheet-scrim.out { animation: fadeOut .24s ease-in forwards; }
.bubble.out { animation: popOut .12s ease-in forwards; pointer-events: none; }
@media (min-width: 760px) and (min-height: 600px) {
  .sheet.anim { animation: sheetIn .26s var(--ease); }
  .sheet.out { animation: sheetFadeOut .2s ease-in forwards; }
}
.toast.anim { animation: drop .26s var(--ease); }
@keyframes confirmIn { from { opacity: 0; transform: translate(-50%, -47%) scale(.94); } }
.confirm { animation: confirmIn .22s var(--ease); }
.viewer { animation: fade .2s; }
.viewer img { animation: pop .26s var(--ease); }

/* Pastilles de nouveautés : elles apparaissent avec un petit rebond */
@keyframes badgePop { from { transform: scale(.3); opacity: 0; } }
.tabbar .count, .seg-n, .glass-btn .dot { animation: badgePop .32s var(--spring); }
.tabbar .count.blink { animation: blink 1.1s ease-in-out infinite; }

/* Menu déroulant */
@keyframes subIn { from { opacity: 0; transform: translateX(-50%) translateY(8px); } }
@keyframes subInSide { from { opacity: 0; transform: translateY(-6px); } }
.tabbar .subtabs { animation: subIn .2s var(--ease); }
@media (min-width: 1024px) { .tabbar .subtabs { animation: subInSide .2s var(--ease); } }

/* Étapes cochées : la coche se dessine */
@keyframes tickIn { from { transform: scale(.4); opacity: 0; } }
.step.on svg, .notice .acked svg, .tagline.done svg { animation: tickIn .28s var(--spring); }

/* Discussions : les bulles arrivent doucement, les nouvelles réactions rebondissent */
@keyframes bubIn { from { opacity: 0; transform: translateY(6px) scale(.97); } }
.chat-scroll .cbw { animation: bubIn .2s var(--ease) backwards; }
.cbw.me { transform-origin: 100% 100%; } .cbw:not(.me) { transform-origin: 0 100%; }
@keyframes rxIn { from { transform: scale(.5); opacity: 0; } }
.reacts .rx { animation: rxIn .24s var(--spring); }
.rx-row button { transition: transform .15s var(--spring); }
.rx-row button:active { transform: scale(1.35); }

/* Plan : les cases apparaissent légèrement échelonnées au premier affichage */
@keyframes tileIn { from { opacity: 0; transform: scale(.88); } }
.tile { animation: tileIn .26s var(--ease) backwards; }

/* Discussions : bouton « Urgent » à côté de la saisie */
.reply-line .send.urg.on { background: var(--red-bg); color: #fff; }
.reply-line .send.red { background: var(--red-bg); }
.urg-hint { color: var(--red); font-weight: 600; }
.urg-kind { display: flex; gap: 8px; margin-top: 8px; }

/* ─── Écran Jour : aperçu calme des nouveaux messages (pas d'urgence : rien ne clignote) ─── */
.chat-peek { padding: 6px 0; margin-bottom: 14px; }
.pk-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px 4px; font-size: calc(13px * var(--ts)); text-transform: uppercase; letter-spacing: .05em; color: var(--sec); }
.pk-head b { font-weight: 700; }
.pk-head span { font-weight: 700; color: var(--accent); }
.peek-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 16px; text-align: start; }
.peek-row + .peek-row { border-top: .5px solid var(--sep); }
.peek-row .pk-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.peek-row .pk-top { display: flex; align-items: baseline; gap: 8px; }
.peek-row .pk-top b { flex: 1; min-width: 0; font-size: calc(15px * var(--ts)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.peek-row .pk-t { font-size: calc(12px * var(--ts)); color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.peek-row .pk-last { font-size: calc(14px * var(--ts)); color: var(--sec); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.peek-row .count { flex: none; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.peek-more { display: block; width: 100%; min-height: 44px; padding: 0 16px; border-top: .5px solid var(--sep); text-align: start; font-size: calc(14px * var(--ts)); font-weight: 600; color: var(--accent); }

/* ─── Bandeau rouge des urgences : mêmes lignes que l'aperçu normal, le rouge clignote ─── */
.urgent-peek { color: #fff; border-radius: 24px; background: var(--red-bg); }   /* fond rouge fixe : sans clignotement (seulement des « à faire »), le texte blanc restait sur fond clair */
.urgent-peek .pk-head { color: #fff; text-transform: none; letter-spacing: 0; font-size: calc(15px * var(--ts)); padding: 10px 16px 6px; }
.urgent-peek .peek-row { color: #fff; }
.urgent-peek .todo-row { display: flex; align-items: center; gap: 10px; padding: 0 12px 0 0; }
.urgent-peek .todo-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 0 10px 16px; text-align: start; color: #fff; }
.urgent-peek .todo-done { flex: none; min-width: 74px; height: 40px; padding: 0 16px; border-radius: 20px; background: #fff; color: #8f3a2d; font-weight: 800; font-size: calc(16px * var(--ts)); }
.peek-row .pk-ctx { display: block; font-size: calc(13px * var(--ts)); opacity: .8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.urgent-peek .todo-take { min-width: 0; max-width: 104px; height: 44px; padding: 0 12px; font-size: calc(14px * var(--ts)); line-height: 1.15; text-align: center; }
.urgent-peek .up-x { flex: none; width: 34px; height: 34px; margin: -4px -6px -4px 8px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, .18); }
.urgent-peek .up-x svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; }
.urgent-peek .up-x:hover { background: rgba(255, 255, 255, .3); }
.urgent-peek .peek-row + .peek-row { border-top-color: rgba(255, 255, 255, .28); }
.urgent-peek .pk-t, .urgent-peek .pk-last { color: rgba(255, 255, 255, .92); }
.urgent-peek .avatar { box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); }
.urgent-peek .up-more { padding: 10px 16px; color: #fff; font-size: calc(14px * var(--ts)); font-weight: 600; border-top: .5px solid rgba(255, 255, 255, .28); }

/* ─── Feuilles : fenêtre « Qui imprimer ? » et options d'impression repliées en bas ─── */
.pp-name { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 600; }
.pp-name .cnt { font-size: 13px; font-weight: 600; color: var(--sec); }
.pp-list .toggle-row { min-height: 52px; }
.pp-list .check { flex: none; width: 26px; height: 26px; border-radius: 8px; box-shadow: inset 0 0 0 2px var(--sep); display: inline-flex; align-items: center; justify-content: center; transition: background .15s; }
.pp-list .check.on { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.pp-list .check svg { width: 16px; height: 16px; }
.pill[disabled] { opacity: .45; pointer-events: none; }
.sv-opts { margin-top: 14px; }
.sv-opts-btn { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 6px; font-size: calc(14px * var(--ts)); font-weight: 600; color: var(--sec); }
.sv-opts-btn .chev { display: inline-flex; width: 18px; height: 18px; transition: transform .2s; }
.sv-opts-btn .chev.open { transform: rotate(180deg); }
.sv-opts-btn .chev svg { width: 100%; height: 100%; }

/* Discussion : rien ne se tasse dans la colonne qui défile (la carte urgente était coupée) */
.chat-scroll > * { flex-shrink: 0; }

/* ─── Carte d'un message-ordre : calme (en-tête discret, suivi en une ligne, champ de réponse à la demande) ─── */
.mc { gap: 6px; }
.mc-top { display: flex; align-items: center; gap: 8px; font-size: calc(13px * var(--ts)); color: var(--sec); }
.mc-top b { color: var(--fg); font-weight: 700; }
.mc-top .t { margin-inline-start: auto; font-variant-numeric: tabular-nums; }
.mc-urg { font-size: calc(11px * var(--ts)); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--red); }
.mc.urg { box-shadow: inset 4px 0 var(--red); }
.mc .txt { font-size: calc(16px * var(--ts)); }
.mc-tag { align-self: flex-start; font-size: calc(12px * var(--ts)); font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--fill); color: var(--sec); }
.mc-tag.change { background: color-mix(in srgb, var(--orange) 16%, transparent); color: var(--orange); }
.mc-closed { display: flex; align-items: center; gap: 6px; font-size: calc(13px * var(--ts)); font-weight: 600; color: var(--green); }
.mc-closed svg { width: 14px; height: 14px; }
.mc-track { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.mc-sum { font-size: calc(14px * var(--ts)); color: var(--fg); }
.mc-bar { height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.mc-bar i { display: block; height: 100%; border-radius: 3px; background: var(--green); transition: width .4s var(--ease); }
.mc-line { display: flex; align-items: baseline; gap: 8px; font-size: calc(14px * var(--ts)); line-height: 1.35; }
.mc-dot { flex: none; width: 16px; height: 16px; align-self: center; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--sep); }
.mc-dot svg { width: 10px; height: 10px; stroke-width: 3; }
.mc-lab { flex: none; font-weight: 700; }
.mc-names { color: var(--sec); min-width: 0; overflow-wrap: anywhere; }
.mc-line.done .mc-dot { background: var(--green); box-shadow: none; color: #fff; }
.mc-line.done .mc-lab { color: var(--green); }
.mc-line.taken .mc-dot { background: color-mix(in srgb, var(--green) 22%, transparent); box-shadow: none; color: var(--green); }
.mc-line.taken .mc-lab { color: var(--green); }
.mc-line.wait .mc-lab { color: var(--sec); font-weight: 600; }
/* Événement du fil (« Nathan a pris en compte · 00:31 ») : une ligne grise centrée, pas une bulle */
.ev { align-self: center; text-align: center; margin: 2px 0; }
.ev span { display: inline-flex; align-items: center; gap: 5px; font-size: calc(13px * var(--ts)); color: var(--sec); }
.ev svg { width: 13px; height: 13px; color: var(--green); stroke-width: 3; }
.mc .inline-thread { margin-top: 4px; padding-top: 6px; gap: 4px; }
.th-actions { display: flex; gap: 4px; }
.th-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px 0 0; font-size: calc(14px * var(--ts)); font-weight: 600; color: var(--accent); }
.th-btn + .th-btn { color: var(--sec); }
.th-btn svg { width: 14px; height: 14px; }
.chat-scroll .legacy-block { max-width: 640px; width: 100%; margin: 6px 0; align-self: stretch; display: flex; flex-direction: column; gap: 4px; }
.chat-scroll .legacy-block.mine { align-self: flex-end; margin-inline-start: auto; margin-inline-end: 0; }      /* mes messages à droite, comme mes bulles */
.chat-scroll .legacy-block.theirs { align-self: flex-start; margin-inline-start: 0; margin-inline-end: auto; }
/* La conversation continue sous la carte, collée à elle mais en dehors */
.thread-out { display: flex; flex-direction: column; gap: 6px; padding: 0 4px; }
.thread-out:empty { display: none; }
.thread-out .chat { padding: 0; }
.thread-out .chat:empty { display: none; }
.thread-out .reply-line textarea { min-height: 42px; }
.thread-out .th-actions { padding-inline-start: 6px; }
.th-fold { display: flex; align-items: center; gap: 8px; min-height: 40px; font-size: calc(14px * var(--ts)); font-weight: 600; color: var(--sec); }
.th-fold .chev { width: 16px; height: 16px; display: inline-flex; transition: transform .2s; }
.th-fold .chev svg { width: 100%; height: 100%; }
.th-new { font-size: calc(11px * var(--ts)); font-weight: 800; color: #fff; background: var(--red-bg); padding: 2px 8px; border-radius: 999px; }
.th-btn[data-act="threadClose"] { color: var(--sec); }

/* ─── Bulle d'une chambre, section Modifier : sections nommées, boutons à bascule en grille ─── */
.bubble .cap { font-size: calc(11px * var(--ts)); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sec); padding: 0 4px 6px; }
.tg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tg { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: 14px; background: var(--fill); color: var(--tint); font-size: calc(14px * var(--ts)); font-weight: 600; text-align: start; transition: background .15s, box-shadow .15s; }
.tg .gi { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.tg .gi svg { width: 18px; height: 18px; }
.tg .gi img { width: 22px; height: 22px; border-radius: 6px; display: block; }
.tg .gl { color: var(--fg); line-height: 1.15; }
.tg.armed { background: var(--green); box-shadow: 0 2px 8px color-mix(in srgb, var(--green) 45%, transparent); }
.tg.armed .gl, .tg.armed .gi { color: #fff; }
.tg.on { background: color-mix(in srgb, var(--tint) 16%, transparent); box-shadow: inset 0 0 0 2px var(--tint); }
.del-row { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border-radius: 14px; color: var(--red); font-size: calc(14px * var(--ts)); font-weight: 700; }
.del-row svg { width: 16px; height: 16px; }
.del-row.armed { background: var(--red-bg); color: #fff; }

/* ─── Type de chambre changé : repère visible d'un coup d'œil (liste et plan) jusqu'à « Pris en compte » ─── */
.kchange { display: inline-flex; align-self: flex-start; align-items: center; margin: 2px 0 3px; padding: 2px 9px; border-radius: 999px; font-size: calc(13px * var(--ts)); font-weight: 800; color: #fff; background: var(--red-bg); animation: blink 1.1s ease-in-out infinite; }
.room-row.kchg { box-shadow: inset 4px 0 var(--red); }
.tile.kchg .k { background: var(--red-bg); color: #fff; border-radius: 4px; padding: 0 3px; }

/* Bandeau rouge : changement de chambre lisible en entier */
.peek-row .pk-lines { display: flex; flex-direction: column; gap: 1px; font-size: calc(14px * var(--ts)); color: var(--sec); }
.urgent-peek .pk-lines { color: rgba(255, 255, 255, .92); }
.peek-row .pk-lines .chg { font-weight: 800; font-size: calc(15px * var(--ts)); color: inherit; }
.urgent-peek .pk-lines .chg { color: #fff; }

/* Housekeepers : chambre pas encore disponible = grisée, en bas de la liste */
.room-row.dim { opacity: .5; }

/* Bulle, « Pour » : une couleur par personne (comme l'éditeur), « Personne » en dernier en gris */
.chip.who { --pc: var(--sec); background: color-mix(in srgb, var(--pc) 16%, transparent); color: var(--pc); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--pc) 35%, transparent); transition: background .15s, color .15s; }
.chip.who.on { background: var(--pc); color: #fff; box-shadow: none; }

/* ─── Connexion : propre, une seule grille de personnes, le logo Alfred Hotels en pied de page ─── */
.login { padding-top: calc(var(--safe-top) + 36px); }
.login .brand { gap: 6px; padding-bottom: 26px; }
.login .brand h1 { font-size: calc(30px * var(--ts)); letter-spacing: -.01em; }
.who-title { text-align: center; font-size: calc(13px * var(--ts)); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--sec); padding-bottom: 12px; }
.who-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.who-grid > .who-card { grid-column: span 2; }
/* Dernière carte seule sur sa ligne : centrée, même largeur que les autres */
.who-grid > .who-card:last-child:nth-child(odd):not(.wide) { grid-column: 2 / span 2; }
.who-grid + .who-grid { margin-top: 10px; }
.who-card { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 8px 12px; border-radius: 20px; background: var(--card); box-shadow: inset 0 0 0 .5px var(--sep), 0 1px 3px rgba(0, 0, 0, .05); text-align: center; }
.who-card .avatar { width: 56px; height: 56px; font-size: 20px; margin-bottom: 6px; }
.who-card b { font-size: calc(17px * var(--ts)); font-weight: 700; }
.login-foot { padding-top: 28px; display: flex; justify-content: center; }   /* juste sous la liste, pas collé en bas de l'écran */
.login-foot .wordmark { width: 130px; height: auto; opacity: .75; touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.who-cat { font-size: calc(13px * var(--ts)); font-weight: 700; color: var(--sec); padding: 18px 6px 8px; }
.who-cat:first-of-type { padding-top: 0; }
/* Grande carte sur toute la ligne : seulement le compte commun « Réception » */
.who-grid > .who-card.wide { grid-column: 1 / -1; padding: 18px 8px 14px; }
/* Écran d'accueil : Renfort et extras repliés en bas (une ligne discrète, dépliée = mêmes cartes) */
.who-more { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 18px; padding: 12px 16px; border-radius: 14px; background: none; box-shadow: inset 0 0 0 .5px var(--sep); color: var(--sec); font-size: calc(15px * var(--ts)); font-weight: 600; text-align: start; }
.who-more > span:first-child { flex: 1; }
.who-more .who-n { min-width: 22px; padding: 1px 7px; border-radius: 11px; background: var(--fill, rgba(120, 120, 128, .14)); font-size: calc(13px * var(--ts)); text-align: center; }
.who-more .chev { display: inline-flex; transition: transform .2s; }
.who-fold .who-cat:first-child { padding-top: 14px; }

/* Choix de l'hôtel sur l'écran d'accueil */
.login .hotel-pick { width: min(320px, 100%); margin: 2px auto 0; }
.login .hotel-pick .seg button { min-height: 38px; }

/* Glisser vers la droite pour répondre : la bulle suit le doigt, une flèche apparaît à gauche, elle se colore quand c'est assez loin */
.cb, .bub { touch-action: pan-y; transition: transform .22s var(--ease); }
.cb.swiping, .bub.swiping { transition: none; }
.cb.swiping::before, .bub.swiping::before { content: ""; position: absolute; left: -44px; top: 50%; width: 32px; height: 32px; margin-top: -16px; border-radius: 50%; opacity: var(--p, 0); transform: scale(calc(.5 + var(--p, 0) * .5));
  background: var(--fill) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M9 14 4 9l5-5'/><path d='M4 9h10.5a5.5 5.5 0 0 1 0 11H11'/></svg>") center / 18px no-repeat; }
.cb.swiping.ready::before, .bub.swiping.ready::before { background-color: var(--accent); background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M9 14 4 9l5-5'/><path d='M4 9h10.5a5.5 5.5 0 0 1 0 11H11'/></svg>"); }
.bub .quote { display: flex; flex-direction: column; margin: 2px 0 5px; padding: 4px 8px; border-radius: 8px; border-inline-start: 3px solid var(--accent); background: var(--fill); font-size: calc(13px * var(--ts)); gap: 1px; text-align: start; }
.bub .quote span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; opacity: .85; }
.bub.me .quote { background: rgba(255, 255, 255, .2); border-inline-start-color: #fff; }
.bub.me .quote b { color: inherit !important; }
.reply-quote { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 12px; border-inline-start: 3px solid var(--accent); background: var(--fill); font-size: calc(13px * var(--ts)); }
.reply-quote .rq-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.reply-quote .rq-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .85; }
.reply-quote .rq-x { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; }
.reply-quote .rq-x svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; }

/* ─── Retouches (24 nov. 2026) ─── */
/* Alerte plein écran : un long message défile au lieu de pousser le bouton hors de l'écran ; plusieurs messages = compteur */
.alarm { overflow-y: auto; justify-content: safe center; }
.alarm .txt { overflow-wrap: anywhere; }
.alarm .alarm-n { font-size: calc(15px * var(--ts)); font-weight: 700; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .2); }
/* Fenêtre et bulle reçoivent le focus à l'ouverture (clavier, lecteur d'écran) : pas de contour autour de toute la fenêtre */
.sheet:focus, .bubble:focus { outline: none; }
/* Boutons : pas de sélection de texte ni de menu « Copier » sur un appui long (iPhone) */
button { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.confirm:focus { outline: none; }
/* Plan vide d'un housekeeper : une phrase dit pourquoi (tout est fait, ou masqué par les interrupteurs) */
.plan-empty { margin: 0 4px 12px; padding: 12px 16px; border-radius: 18px; background: var(--fill); color: var(--sec); font-size: 15px; line-height: 1.35; }
.bubble.more-below { -webkit-mask-image: linear-gradient(#000 calc(100% - 34px), transparent); mask-image: linear-gradient(#000 calc(100% - 34px), transparent); }

/* Signalements : sur téléphone et tablette, le bouton « Signaler un problème » flotte en bas, juste au-dessus de la barre du bas */
.fab-report { position: fixed; z-index: 40; left: 50%; transform: translate(-50%, var(--tb-dy, 0px)); bottom: calc(var(--safe-bottom) + 104px); width: auto; min-width: 240px; box-shadow: 0 6px 20px rgba(0,0,0,.22); }
@media (min-width: 1024px) { .fab-report { display: none; } }
@media (max-width: 1023px) { .only-wide { display: none !important; } .tab-signalements { padding-bottom: calc(var(--safe-bottom) + 160px); } }

/* Bandeau Signalements de l'écran Jour : petite croix pour masquer (la ligne elle-même ne se touche plus, 26 nov. 2026) */
.tc-x { flex: none; align-self: center; width: 30px; height: 30px; margin-inline-start: -4px; border-radius: 50%; display: grid; place-items: center; color: var(--sec); background: var(--fill); }
.tc-x svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; }

/* ─── Barre du bas refaite pour téléphone et tablette (24 nov. 2026, demande de Nathan : « essaie d'améliorer encore, voire la refaire ») ───
   Pleine largeur de l'écran (marges de 10 px), onglets de largeur égale : toute la barre se touche, pas de largeur fixe qui déborde.
   Grosses icônes ; l'onglet ouvert a une pastille couleur de l'app. Réception (6 onglets) : icônes seules, l'onglet ouvert s'élargit avec son nom. */
@media (max-width: 1023px) {
  .tabbar { inset-inline-start: 10px; inset-inline-end: 10px; width: auto; max-width: 560px; margin: 0 auto; transform: translate(0, var(--tb-dy, 0px)); padding: 6px; gap: 2px;
    bottom: calc(var(--safe-bottom) + 12px); border-radius: 32px; }
  .tabbar button, .tabbar.many button { flex: 1 1 0; min-width: 0; height: 64px; padding: 0 2px; gap: 3px; border-radius: 26px; font-size: 11px; letter-spacing: -.1px; white-space: nowrap; }
  .tabbar button svg { width: 28px; height: 28px; flex: none; }
  .tabbar button.on { background: color-mix(in srgb, var(--accent) 15%, transparent); }
  .tabbar button:active { transform: scale(.94); }
  .tabbar .count { top: 5px; inset-inline-end: calc(50% - 22px); }
  .tabbar.many button.on { flex: 2.4 1 0; padding: 0 10px; }
  .tabbar.many .count { inset-inline-end: calc(50% - 20px); }
  .tabbar.many button.on .count { inset-inline-end: 8px; }
  .undo { bottom: calc(var(--safe-bottom) + 104px); }
  .screen { padding-bottom: calc(var(--safe-bottom) + 134px); }
}
@media (max-width: 400px) { .tabbar button, .tabbar.many button { font-size: 10px; letter-spacing: -.2px; } }
@media (max-width: 340px) { .tabbar:not(.many) button:not(.on) .lbl { display: none; } .tabbar:not(.many) button.on { flex: 2 1 0; } }

/* Barre du bas STABLE (24 nov. 2026, Nathan : « elle monte, redescend selon la catégorie » ; Plan et discussion étaient bien : la page n'y défile pas).
   Sur téléphone et tablette, c'est maintenant l'ÉCRAN qui défile (main.screen, plein écran fixe), jamais la page : la barre de Safari ne se replie plus,
   la zone visible ne change plus d'un onglet à l'autre, et la barre du bas (posée par le bas, comme avant) reste exactement à la même hauteur. */
@media (max-width: 1023px) {
  main.screen { position: fixed; inset: 0; max-width: none; margin: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior-y: none; -webkit-overflow-scrolling: touch;
    padding-inline-start: max(16px, calc((100vw - 640px) / 2)); padding-inline-end: max(16px, calc((100vw - 640px) / 2)); }
  main.screen.chat-open { padding: 0; overflow: hidden; }
  /* Page figée derrière l'écran (24 nov. 2026, Nathan : « elle bouge encore un petit peu selon le défilement ») : sur iPhone installé, la fenêtre
     change de hauteur (~60 pt) quand la page rebondit ou défile, et la barre suit. Corps de page fixe = plus rien à faire défiler côté page.
     PAS d'overflow:hidden (il raccourcit la fenêtre de façon permanente). Seulement une fois connecté : la connexion garde son défilement. */
  html:has(main.screen), body:has(main.screen) { height: 100%; }
  body:has(main.screen) { position: fixed; inset: 0; width: 100%; }
}

/* Fenêtre « Mode dev » (5 appuis sur le logo Alfred Hotels) */
.confirm.dev { text-align: start; }
.confirm.dev > p:first-child { text-align: center; }
.confirm.dev .toggle-row { width: 100%; padding: 12px 4px; }
.confirm.dev .dev-wipe { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 4px; font-size: calc(17px * var(--ts)); color: var(--red); text-align: start; border-top: .5px solid var(--sep); }
.confirm.dev .dev-wipe .ic { display: inline-flex; width: 28px; }
.confirm.dev .dev-help { font-size: calc(12.5px * var(--ts)); font-weight: 500; margin: 8px 0 16px; line-height: 1.4; }

/* ─── Écran Jour, allégé (25 nov. 2026) ─── */
/* Housekeeper : « Prochaine chambre » en tête de la carte du compteur */
/* Tâches repliées en une ligne, sous le compteur */
.fold[data-kind="dayTasks"] { color: var(--fg); margin-top: 14px; }
/* Un seul bloc « Urgent » : tâches et signalements urgents, puis les demandes urgentes de chambre */
.urg-stack { display: flex; flex-direction: column; gap: 10px; }
/* Réception : Check-out / Check-in toujours visibles, le reste derrière « Filtrer » */
.filt-row { display: flex; gap: 8px; align-items: stretch; }
.filt-row .seg { flex: 1; min-width: 0; }
.filt-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 14px; border-radius: 999px; background: var(--fill); font-size: calc(15px * var(--ts)); font-weight: 600; color: var(--fg); }
.filt-btn svg { width: 18px; height: 18px; }
.filt-btn .seg-n { margin-inline-start: 0; }
.filt-btn[aria-expanded="true"] { background: var(--seg-on); box-shadow: 0 2px 4px rgba(0, 0, 0, .12); }
.filt-row .seg button { padding: 0 8px; }
.filt-row .seg-n { margin-inline-start: 5px; }
@media (max-width: 400px) {
  .filt-btn { padding: 0 11px; gap: 5px; font-size: 14px; }
  .filt-row .seg button { padding: 0 6px; font-size: 14px; }
}
@media (max-width: 359px) { .filt-btn > span:not(.seg-n) { display: none; } }

/* ─── Retouches du 25 nov. 2026 (2) ─── */
/* Housekeeper : « Faite » sur la ligne, en deux appuis */
.rr-wrap { position: relative; }
.rr-wrap > .room-row { padding-inline-end: 132px; }
.qd { position: absolute; inset-inline-end: 12px; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 104px; justify-content: center;
  padding: 0 14px; border-radius: 999px; font-size: 15px; font-weight: 700; color: var(--green); background: color-mix(in srgb, var(--green) 14%, var(--card));
  transition: background-color .18s, color .18s; }
.qd svg { width: 18px; height: 18px; }
.rr-wrap.wide > .room-row { padding-inline-end: 150px; }
.rr-wrap.wide .qd { min-width: 128px; }
.qd.press:active { transform: translateY(-50%) scale(.96); }   /* sans ça, l'appui faisait sauter le bouton de la moitié de sa hauteur sous le doigt : l'appui dans sa moitié haute était perdu */
.qd.armed { background: var(--green); color: #fff; box-shadow: 0 2px 8px color-mix(in srgb, var(--green) 45%, transparent); }
/* Chambre urgente sur le plan : rouge, visible d'un coup d'œil */
.tile.tile.urg { box-shadow: 0 0 0 3px var(--red); background: color-mix(in srgb, var(--red) 16%, var(--bright)); }
.tile.tile.urg .n { color: var(--red); }
/* Noms des bâtiments en haut du plan */
.plan .names.top { padding: 0 0 10px; }
/* Tâches (réception, expéditeur) : où en est chaque tâche, sans l'ouvrir */
.tc-st { flex: none; align-self: center; padding: 5px 10px; border-radius: 999px; font-size: calc(13px * var(--ts)); font-weight: 700; white-space: nowrap; color: var(--sec); background: var(--fill); }
.tc-st.seen { color: var(--blue); background: color-mix(in srgb, var(--blue) 12%, var(--card)); }
.tc-st.mid { color: var(--orange); background: color-mix(in srgb, var(--orange) 14%, var(--card)); }
.tc-st.ok { color: var(--green); background: color-mix(in srgb, var(--green) 14%, var(--card)); }
/* Ordinateur : « Préparer la journée » écrit */
.prep-btn { width: auto; flex: none; min-height: 40px; padding: 0 16px; font-size: calc(15px * var(--ts)); gap: 8px; }
.prep-btn svg { width: 18px; height: 18px; }
/* Petit ordinateur (liste et plan côte à côte, colonne étroite) : crayon seul, sinon la date du jour est coupée */
@media (min-width: 1024px) and (max-width: 1179px) {
  .duo .prep-btn { width: 40px; padding: 0; justify-content: center; }
  .duo .prep-btn span { display: none; }
}

/* ─── Retouches du 25 nov. 2026 (3) ─── */
/* Fenêtres : « Fermer » écrit (la coche faisait croire qu'on validait quelque chose) */
.nav-close { flex: none; min-height: 44px; padding: 0 6px; font-size: calc(16px * var(--ts)); font-weight: 600; color: var(--accent); }
/* En-tête : la date tient sur une ligne ; rien pour le réseau quand tout va bien */
.header .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header h1 { white-space: nowrap; }
.conn-sr { display: none; }
/* Bulle : le type (Départ / Recouche / Blanc recouche) tient dans la largeur, sans être coupé */
.mini-seg .seg { overflow: visible; }
.mini-seg .seg button { flex: 1 1 auto; min-width: 0; padding: 0 6px; font-size: calc(13px * var(--ts)); }
/* Filtres : quatre choix tiennent sur 375 px */
@media (max-width: 400px) { .filters .seg button { padding: 0 9px; font-size: 14px; } }
/* Éditeur : « 5D 2R » */
.ewho .cnt { white-space: nowrap; }
/* Éditeur, téléphone : le sous-titre court ne se coupe pas */
.ed-nav small { white-space: nowrap; }

/* Éditeur, téléphone : une seule rangée d'outils (6 boutons) */
@media (max-width: 599px) {
  .tools .ed-tools.six { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
  .tools .ed-tools.six .etool { font-size: 11px; padding: 4px 0; }
  .tools .ed-tools.six .etool .lb { flex: none; }
}
@media (max-width: 359px) { .tools .ed-tools.six .etool { font-size: 10px; } }

/* Tâches : second appui pour confirmer (Fait, Pris en compte) */
.tc-b.armed { background: var(--green); color: #fff; box-shadow: 0 2px 8px color-mix(in srgb, var(--green) 45%, transparent); animation: none; }
.tc-main.static { cursor: default; }

/* Signalement du housekeeper : un écran plein, quelques mots + photo (25 nov. 2026) */
.rp-page textarea.input { min-height: 140px; font-size: calc(18px * var(--ts)); }
.rp-photo { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 130px; border-radius: 22px; border: 2px dashed color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 7%, transparent); color: var(--accent); cursor: pointer; }
.rp-photo svg { width: 40px; height: 40px; }
.rp-photo b { font-size: calc(19px * var(--ts)); }
.rp-page .pill, .rp-done .pill { min-height: 56px; font-size: calc(18px * var(--ts)); }
.rp-q { font-size: calc(24px * var(--ts)); font-weight: 800; letter-spacing: -.01em; }
.rp-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 30px 8px 8px; }
.rp-done .rp-q { margin-top: 10px; }
.rp-done .rp-sub { color: var(--sec); font-size: calc(17px * var(--ts)); margin-bottom: 26px; }
.rp-done .pill { width: 100%; }
.rp-ok { width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; }
.rp-ok svg { width: 48px; height: 48px; stroke-width: 3; }
.rp-all { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 18px auto 4px; min-height: 44px; padding: 0 14px; border-radius: 22px; color: var(--sec); font-size: calc(15px * var(--ts)); font-weight: 600; }

/* Aperçu des tâches sur l'écran Jour (25 nov. 2026, Nathan : « réduire et corriger l'aperçu ») : plus petit, sans pictogramme, texte sur 2 lignes,
   boutons plus fins, sans « Vu » ni nombre de réponses. La vraie tâche est dans l'onglet Tâches. */
.tc.pv { padding: 8px 10px 8px 14px; gap: 10px; align-items: center; }
.tc.pv .tc-main { min-height: 0; gap: 2px; }
.tc.pv .tc-text { font-size: calc(15.5px * var(--ts)); line-height: 1.25; }
.tc.pv:not(.open) .tc-text { -webkit-line-clamp: 2; }
.tc.pv .tc-meta { font-size: calc(12.5px * var(--ts)); line-height: 1.25; }
.tc.pv .tc-meta:empty { display: none; }
.tc.pv .tc-b { min-height: 38px; min-width: 0; padding: 0 12px; font-size: calc(14px * var(--ts)); white-space: nowrap; }
.tc.pv .tc-b.red { max-width: none; }

/* ─── Écran Jour, retouches du 25 nov. 2026 (4), Nathan (maquette « jour-retouche ») ─── */
/* Bloc « Urgent » du housekeeper et du polyvalent : chambres et tâches sur la même ligne, texte entier */
/* Tâches du housekeeper et du polyvalent sur l'écran Jour : texte entier (remplace les 2 lignes de l'aperçu) */
.urg-list .tc.pv:not(.open) .tc-text, .tc-list.full .tc.pv:not(.open) .tc-text { -webkit-line-clamp: unset; display: block; overflow: visible; }
.urg-list .tc-kind { font-size: calc(16px * var(--ts)); font-weight: 800; }
.urg-list .tc-text b { font-weight: 800; }
/* Bloc Urgent : la carte entière est rouge (fond rosé, contour), plus de liseré coupé par les coins sur chaque ligne (26 nov. 2026, Nathan : « pas beau ») */
.urg-list { background: color-mix(in srgb, var(--red) 8%, var(--card)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--red) 55%, transparent); }
.urg-list .tc.urg { background: none; box-shadow: none; }
.urg-list .tc { align-items: center; }
.urg-list .tc-ic { margin-top: 0; }
.urg-list .divider { background: color-mix(in srgb, var(--red) 18%, transparent); }
.tc-b.blue { background: var(--blue); color: var(--on-accent); }
.tc-count.green { background: var(--green); }
/* Liste rangée par état : numéro plus gros, « Faite » / « Débarrassée » en bouton plein */
.by-state .room-row .code.num, .big-rows .code.num { font-size: calc(24px * var(--ts)); letter-spacing: -.3px; }
.by-state .rr-wrap > .room-row { min-height: 74px; }
.by-state .qd { background: var(--green); color: var(--on-accent); }
.by-state .rr-wrap.wide .qd { background: var(--blue); }
.by-state .qd.armed, .urg-list .tc-b.armed { outline: 3px solid color-mix(in srgb, var(--green) 40%, transparent); outline-offset: 2px; }
.by-state .filters { margin: -2px 0 12px; }

/* ─── Retouches du 26 nov. 2026 ─── */
/* Pas disponible = cercle vide (rien encore) : plus de ✕ gris qui ressemblait à « supprimer » */
.b-unavailable { background: transparent; box-shadow: inset 0 0 0 2px var(--ko); }
.tile .s .b-unavailable { background: var(--card); }
/* Bulle qui défile : le fondu du bas est peint par-dessus (couleur de la bulle), la bulle elle-même ne devient plus transparente */
.bubble.more-below { -webkit-mask-image: none; mask-image: none; }
.bubble.more-below::after { content: ''; display: block; position: sticky; bottom: -16px; height: 34px; margin: -34px -16px -16px; background: linear-gradient(color-mix(in srgb, var(--card) 0%, transparent), var(--card)); pointer-events: none; }
/* Téléphone : Modifier, Urgent ou Notes ouverts, la bulle se pose en bas sur toute la largeur */
.bubble.dock { left: 0; right: 0; bottom: 0; top: auto; width: auto; max-width: none; max-height: 86vh; max-height: 86dvh; border-radius: 26px 26px 0 0;
  padding-bottom: calc(16px + var(--safe-bottom, 0px)); --oy: 100%; }
.bubble.dock.more-below::after { bottom: calc(-16px - var(--safe-bottom, 0px)); margin-bottom: calc(-16px - var(--safe-bottom, 0px)); }
.scrim.dim { background: rgba(0, 0, 0, .28); }
/* Plan de la réception : chambre sans personne, même disposition que les autres (sans bandeau, le numéro reste au centre) */
.tile.own.nobody .n { margin-top: 0; }
/* « Vider la liste du jour » : geste rare et dangereux (confirmation), un simple lien discret sous le plan */
.ed-danger { display: flex; justify-content: center; }
.ed-clear { background: none; border: 0; padding: 10px 14px; font: 500 14px -apple-system, BlinkMacSystemFont, sans-serif; color: var(--sec); cursor: pointer; }
.ed-clear:hover { color: var(--red); }
/* Tâche ouverte (26 nov. 2026) : le mot d'état reste en haut à droite, à côté du titre ; sur ordinateur, la liste ne s'étire pas sur tout l'écran */
.tc.open .tc-btns { align-self: flex-start; margin-top: 2px; }
.tc.open .inline-thread { margin-top: 4px; }
.tk-col { max-width: 820px; margin: 0 auto; }
.tk-col .big-head .small-pill { width: auto; flex: none; margin-inline-start: auto; }
/* Le détail d'une tâche ouverte (photo, suivi, réponses, champ, gestion) prend toute la largeur sous le titre et le mot d'état */
.tc.open { flex-wrap: wrap; }
.tc-more { flex: 0 0 100%; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.tc-more .inline-thread { margin-top: 0; }

/* ═══ Onglets Tâches et Signalements, refaits le 26 nov. 2026 : lignes calmes, la tâche s'ouvre dans sa fenêtre ═══ */
.tr-list { padding: 2px 0; }
.tr { display: flex; align-items: center; gap: 10px; padding: 4px 12px 4px 0; position: relative; }
.tr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; text-align: start; padding: 10px 0 10px 16px; min-height: 56px; justify-content: center; }
.tr-text { font-size: calc(16px * var(--ts)); font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tr-sub { font-size: calc(13.5px * var(--ts)); color: var(--sec); line-height: 1.3; }
.tr-urg { color: var(--red); font-weight: 700; }
.tr.urg { box-shadow: inset 4px 0 var(--red); }
.tr.done .tr-text { color: var(--sec); font-weight: 500; }
.tr-new { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.tr-chev { flex: none; color: var(--ko); display: inline-flex; }
.tr-chev svg { width: 16px; height: 16px; }
.tr-btns { flex: none; display: flex; align-items: center; gap: 6px; }
.tc-count.green { background: var(--green); }
/* La fenêtre d'une tâche */
.tv-head { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.tv-head.urg { box-shadow: inset 4px 0 var(--red); }
.tv-urg { font-size: calc(12px * var(--ts)); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--red); }
.tv-text { font-size: calc(19px * var(--ts)); font-weight: 600; line-height: 1.35; white-space: pre-line; overflow-wrap: anywhere; }
.tv-meta { font-size: calc(14px * var(--ts)); color: var(--sec); }
.tv-act { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; flex-wrap: wrap; }
.tv-act .tc-b { min-width: 120px; }
.tv-track { padding: 2px 16px; }
.tv-who { display: flex; align-items: center; gap: 10px; min-height: 48px; font-size: calc(15px * var(--ts)); }
.tv-who .person-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.tv-st { margin-inline-start: auto; color: var(--sec); font-size: calc(14px * var(--ts)); }
.tv-st.ok { color: var(--green); font-weight: 600; }
.tv-head + .section-title, .tv-act + .section-title { margin-top: 6px; }
.card .inline-thread { margin-top: 0; padding-top: 0; border-top: 0; }
.tv-manage { display: flex; justify-content: center; gap: 18px; padding: 18px 0 4px; }
.tv-manage .th-btn { color: var(--sec); }
.tv-manage .th-btn.red { color: var(--red); }
.tv-manage svg { width: 15px; height: 15px; }

/* ── Répartir les chambres (éditeur, réception) : bouton en tête des personnes, fenêtre, réglages ── */
.ewho.split { color: var(--accent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 45%, transparent); justify-content: center; }
.ewho.split .wt { background: none; min-width: 0; width: 20px; height: 20px; padding: 0; color: var(--accent); }
.ewho.split .wt svg { width: 20px; height: 20px; }
.ewho.split .lb { flex: none; }
.sp-row { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 4px 12px 4px 18px; }
.sp-row .lb { flex: 1; min-width: 0; font-size: calc(16px * var(--ts)); }
.sp-row .lb small { display: block; font-size: calc(12.5px * var(--ts)); color: var(--sec); margin-top: 1px; }
.sp-row .lb.num { font-weight: 600; font-variant-numeric: tabular-nums; }
.sp-row .chips { justify-content: flex-end; }
.sp-step { flex: none; display: inline-flex; align-items: center; gap: 2px; background: var(--fill); border-radius: 12px; padding: 3px; }
.sp-step button { width: 38px; height: 38px; border-radius: 9px; font-size: calc(22px * var(--ts)); font-weight: 500; line-height: 1; color: var(--accent); display: flex; align-items: center; justify-content: center; }
.sp-step button:active { background: var(--card); }
.sp-step .v { min-width: 62px; text-align: center; font-weight: 700; font-size: calc(15px * var(--ts)); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sp-who { padding-inline-start: 8px; }
.sp-check { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 10px; border-radius: 12px; text-align: start; font-size: calc(16px * var(--ts)); font-weight: 600; }
.sp-check span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-check .box { flex: none; width: 24px; height: 24px; border-radius: 7px; box-shadow: inset 0 0 0 2px var(--sep); display: flex; align-items: center; justify-content: center; color: var(--on-accent); }
.sp-check .box svg { width: 16px; height: 16px; }
.sp-who.on .box { background: var(--accent); box-shadow: none; }
.sp-who:not(.on) .sp-check { color: var(--sec); }
.sp-mode { padding: 0 16px; }
.sp-hint { color: var(--red); }
.sp-del { flex: none; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; color: var(--red); }
.sp-del svg { width: 22px; height: 22px; }
.sp-link select { flex: 1; min-width: 0; }
.sp-link span { color: var(--sec); }
@media (max-width: 599px) {
  .tools .ewho.split { padding: 0 12px; }
  .sp-step button { width: 36px; height: 36px; }
  .sp-step .v { min-width: 56px; }
}
/* Ordinateur : « Répartir » dans le titre « Attribuer à » */
.ed-lab:has(.ed-split) { display: flex; align-items: center; justify-content: space-between; }
.ed-split { display: inline-flex; align-items: center; gap: 6px; height: 24px; margin: -6px 0 -4px; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 700; text-transform: none; letter-spacing: 0;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.ed-split svg { width: 16px; height: 16px; }
.ed-links { display: inline-flex; gap: 6px; }
/* Équipe du jour vide : « Qui travaille aujourd'hui ? » à la place de « Attribuer à », on coche puis « Valider » */
.ewho .ck { flex: none; width: 20px; height: 20px; display: flex; }
.ewho .ck svg { width: 20px; height: 20px; }
.ed-pick .ewho.wide { grid-column: 1 / -1; }
.ed-go { grid-column: 1 / -1; min-height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: var(--on-accent); font-size: 16px; font-weight: 700; }
.ed-go svg { width: 20px; height: 20px; }
.ed-go[disabled], .ed-go-s[disabled] { opacity: .4; }
.ed-go-s { background: var(--accent); color: var(--on-accent); }
@media (max-width: 899px) {
  .tools .ed-pick .ed-lab { display: flex; padding-bottom: 2px; }
  .tools .ed-pick .ed-lab .ed-split { height: 30px; margin: -4px 0; padding: 0 14px; font-size: 14px; }
  /* le choix tient sur quelques lignes au lieu de défiler : on voit tout le monde d'un coup */
  .tools .ed-pick .ed-who { flex-wrap: wrap; overflow: visible; -webkit-mask-image: none; mask-image: none; }
  .tools .ed-pick .ewho:last-child { margin-inline-end: 0; }
  .tools .ed-pick .ewho.wide { flex: 1 1 100%; }
}

/* ── Fenêtre « contrôlée » (réception) et Retours de contrôle (Réglages) */
.ctrl-form { display: flex; flex-direction: column; gap: 14px; max-width: 520px; margin: 0 auto; padding-bottom: 8px; }
.ctrl-hero { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 2px 0 6px; }
.ctrl-ok { width: 52px; height: 52px; border-radius: 50%; background: var(--green); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.ctrl-ok svg { width: 26px; height: 26px; }
.ctrl-code { font-size: calc(30px * var(--ts)); font-weight: 800; letter-spacing: -.01em; line-height: 1.1; }
.ctrl-meta { font-size: calc(15px * var(--ts)); font-weight: 600; color: var(--sec); }
.ctrl-form .pill.big { min-height: 54px; font-size: calc(17px * var(--ts)); border-radius: 27px; }
.ctrl-or { display: flex; align-items: center; gap: 12px; font-size: calc(13px * var(--ts)); font-weight: 600; color: var(--sec); margin: 2px 0; }
.ctrl-or::before, .ctrl-or::after { content: ''; flex: 1; height: 1px; background: var(--sep); }
.ctrl-card { padding: 14px; display: flex; flex-direction: column; gap: 10px; border-radius: 22px; overflow: visible; }
.ctrl-lbl { font-size: calc(15px * var(--ts)); font-weight: 700; padding: 0 2px; }
.ctrl-card textarea { resize: none; min-height: 84px; font: inherit; line-height: 1.4; }
.ctrl-cam { align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px; border-radius: 20px; background: var(--fill); color: var(--accent); font-size: calc(15px * var(--ts)); font-weight: 600; cursor: pointer; }
.ctrl-cam svg { width: 19px; height: 19px; }
.ctrl-ph { position: relative; align-self: flex-start; }
.ctrl-ph img { display: block; width: 132px; height: 132px; object-fit: cover; border-radius: 14px; }
.ctrl-ph-x { position: absolute; top: -8px; inset-inline-end: -8px; width: 30px; height: 30px; border-radius: 50%; background: var(--fg); color: var(--bg); display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--card); }
.ctrl-ph-x svg { width: 14px; height: 14px; }
.ctrl-who { display: flex; flex-direction: column; gap: 8px; padding-top: 2px; }
.ctrl-sub { font-size: calc(11px * var(--ts)); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sec); padding: 0 2px; }
.ctrl-err { color: var(--red); font-size: calc(14px * var(--ts)); font-weight: 600; text-align: center; }
.ctrl-form [data-live]:empty { display: none; }
.dot-person { width: 12px; height: 12px; border-radius: 50%; flex: none; margin: 0 14px 0 4px; }
.ctrl-row { padding: 12px 16px; }
.ctrl-row .cr-h { display: flex; align-items: baseline; gap: 10px; }
.ctrl-row .cr-h .small { margin-inline-start: auto; }
.ctrl-row .cr-t { margin-top: 3px; font-size: calc(15px * var(--ts)); line-height: 1.35; overflow-wrap: anywhere; }

/* ─── Onglet Feuilles (HK, Gouvernante) : un écran de l'app, même principe que le papier (bâtiment, étage, une ligne par chambre).
   L'impression ne passe pas par ici : elle garde la page A4 de sheets.css. ─── */
.fs { margin-top: 12px; }
.fs-who-pick { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.fs-who-pick::-webkit-scrollbar { display: none; }
.fs-who-pick .chip { flex: none; min-height: 40px; font-size: calc(15px * var(--ts)); padding: 0 14px; }
.fs-bar { display: flex; align-items: center; gap: 10px; margin: 10px 0 0; }
.fs-sum { flex: 1; min-width: 0; font-size: calc(15px * var(--ts)); font-weight: 600; color: var(--sec); }
.fs-print { flex: none; min-height: 44px; font-size: calc(15px * var(--ts)); }
.fs-print svg { width: 18px; height: 18px; }
.fs-bld { font-size: calc(20px * var(--ts)); font-weight: 700; padding: 20px 4px 0; }
.fs-fl { font-size: calc(13px * var(--ts)); font-weight: 600; color: var(--sec); padding: 12px 4px 6px; }
.fs-bld + .fs-fl { padding-top: 6px; }
.fs-bld small { font-size: calc(13px * var(--ts)); font-weight: 500; color: var(--sec); margin-inline-start: 4px; }
@media (max-width: 1023px) { .fs-bld.cont { display: none; } }
.fs-card { padding: 2px 0; }
.fs-row { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 5px 10px 5px 14px; }
.fs-row + .fs-row { border-top: .5px solid var(--sep); }
.fs-id { width: 62px; flex: none; display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.fs-code { font: 700 calc(17px * var(--ts)) ui-rounded, -apple-system, sans-serif; font-variant-numeric: tabular-nums; color: var(--fg); padding: 0; text-align: start; }
.fs-row:is(.kD, .kR, .kBR) .fs-code { color: var(--kc); }
.fs-ty { font-size: calc(11px * var(--ts)); color: var(--sec); }
.fs-ks { display: flex; gap: 6px; flex: none; }
.fs-k { width: 40px; height: 40px; border-radius: 10px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1.5px var(--sep); color: color-mix(in srgb, var(--kc, var(--sec)) 55%, var(--sec)); font: 800 14px ui-rounded, -apple-system, sans-serif; transition: background-color .15s; }
.fs-k svg { width: 18px; height: 18px; }
.fs-k.pr:not(.on) { color: var(--sec); opacity: .5; }
.fs-k.pr.off { opacity: .2; }
.fs-k.on { background: var(--kc); color: var(--card); box-shadow: none; }
.fs-k.pr.on { background: var(--orange); color: var(--card); }
.fs-k.off { opacity: .35; }
.fs-note { flex: 1; min-width: 0; min-height: 40px; display: flex; align-items: center; text-align: start; font-size: calc(14px * var(--ts)); font-weight: 600; line-height: 1.25; color: var(--orange); overflow-wrap: anywhere; }
.fs-note.empty { color: var(--sec); font-weight: 500; opacity: .55; }
.fs-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; font-size: calc(15px * var(--ts)); font-weight: 600; color: var(--sec); }
/* Gouvernante */
.fs-gouv .fs-row { gap: 6px; }
.fs-kd { width: 32px; flex: none; display: inline-flex; }
.fs-kd .kind-tile { width: 30px; height: 30px; border-radius: 8px; font-size: 12px; }
.fs-t { width: 44px; flex: none; text-align: center; font-size: calc(11px * var(--ts)); font-weight: 600; color: var(--sec); }
.fs-box { width: 44px; height: 40px; flex: none; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1.5px var(--sep); color: var(--bg); transition: background-color .15s; }
.fs-box.on { background: var(--fg); box-shadow: none; }
.fs-gouv .fs-box, .fs-gouv .fs-t { width: 36px; }
.fs-gouv .fs-t { font-size: calc(10px * var(--ts)); }
@media (max-width: 599px) {
  .fs-gouv .fs-row { flex-wrap: wrap; }
  .fs-gouv .fs-id { flex: 1 1 0; min-width: 54px; }
  .fs-gouv input.fs-obs { flex: 1 0 100%; height: 34px; font-size: 15px; margin-bottom: 6px; }
  .fs-gouv span.fs-obs { display: none; }
}
.fs-box.auto.on { background: var(--kc); color: #fff; }
.fs-box svg { width: 20px; height: 20px; stroke-width: 3; }
input.fs-obs { flex: 1; min-width: 0; height: 40px; border: 0; border-radius: 0; border-bottom: 1px solid var(--sep); background: none; padding: 0 4px; font: calc(16px * var(--ts)) -apple-system, BlinkMacSystemFont, sans-serif; color: var(--fg); outline: none; }
input.fs-obs:focus { border-bottom: 2px solid var(--accent); }
.fs-hd { min-height: 26px; padding-top: 6px; padding-bottom: 0; }
span.fs-obs { flex: 1; min-width: 0; padding: 0 4px; font-size: calc(11px * var(--ts)); font-weight: 600; color: var(--sec); }
.fs-hd + .fs-row { border-top: 0; }
/* Noms écrits en haut de la feuille gouvernante (Options d'impression) */
.fs-field { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 16px; }
.fs-field > span { width: 84px; flex: none; font-size: calc(16px * var(--ts)); }
.fs-field input { flex: 1; min-width: 0; border: 0; background: none; font: calc(16px * var(--ts)) -apple-system, BlinkMacSystemFont, sans-serif; color: var(--fg); outline: none; }
@media (max-width: 359px) {
  .fs-row { gap: 6px; padding-inline-start: 10px; padding-inline-end: 8px; }
  .fs-id { width: 54px; } .fs-code { font-size: 15px; }
  .fs-k { width: 36px; } .fs-box, .fs-t { width: 38px; } .fs-gouv .fs-box, .fs-gouv .fs-t { width: 30px; }
}
/* Ordinateur : les colonnes du papier côte à côte */
@media (min-width: 1024px) {
  .fs-cols { display: grid; gap: 0 18px; align-items: start; }
  .fs-cols.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fs-cols.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fs-cols.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ─── Lits twin et canapés (26 nov. 2026) ─── */
/* Housekeeper et polyvalent : seulement quand il y a quelque chose à changer dans la chambre */
.room-row .bedtodo { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; font-size: calc(15px * var(--ts)); font-weight: 700; color: var(--accent); }
.room-row .bedtodo svg, .bubble .bnote.bed svg { width: 17px; height: 17px; flex: none; }
.bubble .bnote.bed { display: flex; align-items: center; gap: 6px; }
/* Éditeur : sous le plan, une ligne par chambre concernée */
.ed-beds-t { display: flex; align-items: center; gap: 7px; }
.ed-beds-t svg { width: 18px; height: 18px; }
.ed-beds { padding: 2px 0; }
.eb-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; min-height: 48px; }
.eb-code { font-weight: 700; font-size: 16px; min-width: 58px; }
.eb-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; flex: 1; }
/* Deux colonnes fixes (Twin / Grand lit, puis Canapé / Lit) : une chambre sans canapé garde sa place vide, tout reste aligné */
.eb-slot { display: flex; min-height: 38px; }
.eb-slot.tw { flex: 0 0 142px; }
.eb-slot.so { flex: 0 0 120px; }
.eb-seg { display: flex; flex: 1; background: var(--fill); border-radius: 10px; padding: 2px; }
.eb-opt { flex: 1 1 auto; min-height: 34px; padding: 0 9px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--sec); white-space: nowrap; }
@media (max-width: 360px) { .eb-slot.tw { flex-basis: 128px; } .eb-slot.so { flex-basis: 108px; } .eb-opt { padding: 0 6px; font-size: 13px; } .eb-row { gap: 8px; padding: 8px 8px; } .eb-code { min-width: 48px; } }
.eb-opt.on { background: var(--seg-on); color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.eb-todo { flex-basis: 100%; font-size: 13px; font-weight: 700; color: var(--accent); }
/* Réglages : chambres à toucher */
.bed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; }
.bed-chip { min-height: 40px; padding: 0 4px; border-radius: 10px; font-size: calc(14px * var(--ts)); font-weight: 600; border: 1.5px solid var(--sep); color: var(--sec); }
.bed-chip.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.bed-chip.fixed { opacity: .35; border-style: dashed; text-decoration: line-through; cursor: not-allowed; }

/* ───────── Langues écrites de droite à gauche (arabe ; 26 nov. 2026) ─────────
   `html[dir=rtl]` est posé par core.js (`applyLang`). Les propriétés du reste du fichier sont « logiques » (début / fin) et se retournent seules ;
   ici : ce qui doit rester dans le même sens (plan des bâtiments, feuilles imprimées, chiffres) et ce qui doit se retourner à la main (flèches, interrupteurs). */
.plan, .ed-plan .plan, .ps, .sheet-paper, .page, [translate="no"].keep-ltr { direction: ltr; }   /* le plan est une carte : il ne se retourne pas */
html[dir="rtl"] .chev svg, html[dir="rtl"] [data-act$="Back"] svg, html[dir="rtl"] .tr-chev svg, html[dir="rtl"] .nav-close svg { transform: scaleX(-1); }
html[dir="rtl"] .switch.on::after { transform: translateX(-20px); }
html[dir="rtl"] .undo, html[dir="rtl"] .toast, html[dir="rtl"] .live { left: calc(50% - 116px); }
@media (max-width: 1023px) { html[dir="rtl"] .undo, html[dir="rtl"] .toast, html[dir="rtl"] .live { left: 50%; } }
html[dir="rtl"] input[type="tel"], html[dir="rtl"] input[inputmode="numeric"] { direction: ltr; text-align: end; }
html[dir="rtl"] .num, html[dir="rtl"] .room-row .num, html[dir="rtl"] .fs-code { unicode-bidi: isolate; }
/* Texte écrit par l'équipe (en français) dans une page arabe : chaque morceau garde son propre sens de lecture (la ponctuation reste à sa place) */
html[dir="rtl"] :is(.tc-text, .tr-t, .tr-text, .tv-text, .bub, .cb, .quote, .kv, .mc-text, .urgent-text) { unicode-bidi: plaintext; }

/* Impression : le corps figé du téléphone (position: fixed, hauteur d'écran) coupait ou vidait la feuille */
@media print {
  html, body, html:has(main.screen), body:has(main.screen) { position: static !important; inset: auto !important; height: auto !important; width: auto !important; overflow: visible !important; }
}

/* ─── Bulle d'une chambre, bas refait (26 nov. 2026) : notes écrites dans la bulle, rangée Prioritaire / Booking / Urgent, lien des corrections ─── */
.bn { display: flex; flex-direction: column; gap: 6px; }
.bn-item { display: flex; align-items: center; gap: 4px; min-height: 42px; padding-inline-start: 12px; border-radius: 12px; background: var(--fill);
  font-size: calc(15px * var(--ts)); font-weight: 600; color: var(--accent); line-height: 1.25; }
.bn-item span { flex: 1; min-width: 0; padding-block: 8px; overflow-wrap: anywhere; }
.bn-x { width: 42px; height: 42px; flex: none; display: flex; align-items: center; justify-content: center; color: var(--sec); border-radius: 12px; }
.bn-x svg { width: 15px; height: 15px; }
.bn-add { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1.5px dashed var(--sep);
  color: var(--accent); font-size: calc(15px * var(--ts)); font-weight: 600; text-align: start; }
.bn-add svg { width: 17px; height: 17px; flex: none; }
.bn .chips { margin-top: 2px; }
.tg-grid.marks { grid-template-columns: repeat(var(--n, 3), 1fr); }
.tg-grid.marks .tg { flex-direction: column; justify-content: center; gap: 3px; min-height: 60px; padding: 6px 4px; text-align: center; font-size: calc(13px * var(--ts)); }
.tg-grid.marks .tg .gl { line-height: 1.1; }
.fix-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; padding: 0 4px;
  color: var(--sec); font-size: calc(14px * var(--ts)); font-weight: 600; text-align: start; border-top: 1px solid var(--sep); padding-top: 10px; }
.fix-link .chev { width: 16px; height: 16px; display: inline-flex; transition: transform .2s var(--ease); }
.fix-link .chev svg { width: 100%; height: 100%; }
.fix-link.open .chev { transform: rotate(90deg); }
html[dir="rtl"] .fix-link .chev { transform: scaleX(-1); }
html[dir="rtl"] .fix-link.open .chev { transform: rotate(90deg); }
.tg-grid.marks[style*="--n:1"] .tg { flex-direction: row; gap: 8px; min-height: 48px; font-size: calc(14px * var(--ts)); }

/* Aide-mémoire direct (onglet Tâches, réception) */
.memo-add { width: 100%; margin-top: 14px; }
.bn-add.memo-add { background: var(--card); }

.notice .ack.armed { background: var(--green); color: #fff; box-shadow: 0 2px 8px color-mix(in srgb, var(--green) 45%, transparent); }

/* ─── Refus de service (26 nov. 2026) ─── */
/* Recouche à faire maintenant : « Refus » (contour orange) à gauche de « Faite » ; il s'efface pendant « Confirmer » */
.rr-wrap.two > .room-row { padding-inline-end: 206px; }
.qd.rf, .by-state .qd.rf { inset-inline-end: 124px; min-width: 74px; padding: 0 12px; color: var(--refus); background: transparent; box-shadow: inset 0 0 0 1.5px var(--refus); }
.tc-b.rf { color: var(--refus); background: transparent; box-shadow: inset 0 0 0 1.5px var(--refus); }
.tc-btns:has(.tc-b.rf) { display: flex; gap: 8px; }
/* Onglet « Refus » (réception, ordinateur) : une ligne par refus, photo à droite */
.rf-list { padding: 0; overflow: hidden; }
.rf-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 8px 12px 8px 16px; text-align: start; color: inherit; background: none; font: inherit; }
button.rf-row:hover { background: color-mix(in srgb, var(--text) 4%, transparent); }
.rf-num { font-size: calc(19px * var(--ts)); font-weight: 700; min-width: 72px; }
.rf-who { display: inline-flex; align-items: center; gap: 8px; flex: 1; font-weight: 600; min-width: 0; }
.rf-at { color: var(--sec); font-variant-numeric: tabular-nums; }
.rf-ph { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; flex: none; }
.rf-ph.none { visibility: hidden; }
.rf-more { margin: 18px auto 0; display: flex; }
/* Petit téléphone : les deux boutons se resserrent (Faite sans coche) pour laisser la place au numéro */
@media (max-width: 380px) {
  .rr-wrap.two > .room-row { padding-inline-end: 166px; }
  .rr-wrap.two .qd { inset-inline-end: 10px; min-width: 76px; padding: 0 12px; }
  .rr-wrap.two .qd:not(.armed):not(.rf) svg { display: none; }
  .rr-wrap.two .qd.rf { inset-inline-end: 92px; min-width: 64px; padding: 0 10px; }
}

/* Éditeur : outil Note (toucher une chambre ouvre sa bulle de notes, au-dessus de l'éditeur ; icône dorée sur les cases qui ont une note) */
.scrim.on-sheet { z-index: 98; }
.bubble.on-sheet { z-index: 99; }
.ti.nt { color: var(--orange); }
.ti.nt svg { width: 20px; height: 20px; }
.etool.on .ti.nt { color: var(--on-accent); }
.tile .mk .nt { background: none; padding: 0; display: inline-flex; color: var(--orange); }
.tile .mk .nt svg { width: calc(var(--t) * .22); height: calc(var(--t) * .22); min-width: 11px; min-height: 11px; stroke-width: 2.4; }
.ed-tools.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 899px) { .tools .ed-tools.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 599px) {
  .tools .ed-tools.seven { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
  .tools .ed-tools.seven .etool { font-size: 10.5px; padding: 4px 0; }
  .tools .ed-tools.seven .etool .lb { flex: none; }
}
@media (max-width: 359px) { .tools .ed-tools.seven .etool { font-size: 9.5px; } }

/* ── Jour suivant (28 nov. 2026) : bouton bien visible dans Préparer la journée, fenêtre de reprise ── */
.ed-next { width: auto; flex: none; gap: 7px; padding: 0 16px 0 13px; margin-inline-end: 8px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-weight: 650; }
.ed-next svg { width: 19px; height: 19px; }
.ed-tabs.with-next { display: flex; align-items: center; gap: 8px; }
.ed-tabs.with-next .seg { flex: 1; min-width: 0; }
.ed-tabs.with-next .ed-next { margin: 0; min-height: 44px; }
@media (max-width: 420px) { .ed-tabs.with-next .ed-next { padding: 0 12px; } .ed-tabs.with-next .ed-next span { font-size: 14px; } }
.nd-intro { margin: 4px 2px 4px; color: var(--sec); font-size: calc(14.5px * var(--ts)); line-height: 1.45; }
.nd-intro b { color: var(--fg); font-size: calc(17px * var(--ts)); }
.nd-h { display: flex; align-items: baseline; gap: 8px; margin: 18px 4px 8px; font-size: calc(13px * var(--ts)); font-weight: 650; text-transform: uppercase; letter-spacing: .04em; color: var(--sec); }
.nd-n { font-weight: 500; letter-spacing: 0; text-transform: none; }
.nd-all { margin-inline-start: auto; background: none; border: 0; padding: 4px 2px; font: 600 calc(14px * var(--ts)) -apple-system, BlinkMacSystemFont, sans-serif; text-transform: none; letter-spacing: 0; color: var(--accent); cursor: pointer; }
.nd-rooms { padding: 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 7px; }
.nd-room { position: relative; min-height: 44px; border-radius: 11px; border: 1.5px solid var(--sep); background: none; color: var(--sec); font-size: 15px; font-weight: 650; display: flex; align-items: center; justify-content: center; gap: 4px; cursor: pointer; }
.nd-room.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.nd-room .nd-tag { display: inline-flex; }
.nd-room.on .nd-tag svg path { stroke: currentColor; }
.nd-room .nd-note { position: absolute; top: 3px; inset-inline-end: 4px; width: 11px; height: 11px; display: block; color: var(--orange); }
.nd-room.on .nd-note { color: currentColor; }
.nd-room .nd-note svg { width: 11px; height: 11px; }
.nd-list .sp-check { align-items: center; }
.nd-t { display: flex; flex-direction: column; min-width: 0; text-align: start; }
.nd-tx { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.nd-t small { color: var(--sec); font-size: calc(12.5px * var(--ts)); }
.nd-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 34px 10px; color: var(--sec); text-align: center; }
.nd-go { flex-direction: row; min-height: 52px; font-size: calc(16.5px * var(--ts)); font-weight: 700; }
.nd-go svg { width: 20px; height: 20px; }
.nd-go small { font-weight: 500; opacity: .85; font-size: calc(13.5px * var(--ts)); }
.day-mode { display: flex; flex-direction: column; gap: 12px; }
.day-hour { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: calc(15px * var(--ts)); padding: 0 4px; }
.day-hour select { font: inherit; padding: 6px 10px; border-radius: 9px; border: 1px solid var(--sep); background: var(--card, transparent); color: inherit; }

/* ── « Commencer la journée » (housekeeper) et échange de chambres disponibles (28 nov. 2026) */
.startday { position: fixed; inset: 0; z-index: 190; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; }
.startday .sd-hi { font: 800 calc(34px * var(--ts))/1.1 ui-rounded, -apple-system, sans-serif; }
.startday .sd-sub { font-size: calc(18px * var(--ts)); color: var(--sec); }
.startday button { margin-block-start: 22px; min-height: 72px; width: min(340px, 100%); border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: calc(22px * var(--ts)); font-weight: 800; }
.alarm.swap-ask .small-txt { font-size: calc(16px * var(--ts)); font-weight: 500; opacity: .9; }
.swap-codes { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-block-start: 14px; max-width: 360px; }
.alarm .swap-codes button { margin: 0; width: auto; min-width: 104px; min-height: 64px; font-size: calc(24px * var(--ts)); }
.alarm button.swap-none { background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, .8); }
.swap-card { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; }
.swap-set { padding: 10px; }
.swap-card .swap-t { font-weight: 600; }
.swap-line { display: flex; align-items: baseline; gap: 12px; }
.swap-line .num { font-size: calc(22px * var(--ts)); min-width: 64px; }
.swap-btns { display: flex; gap: 10px; justify-content: flex-end; margin-block-start: 4px; }

/* ─── Messages vocaux (discussions, groupe, signalements ; voice.js) ─── */
/* Discussion : le micro prend la place de la flèche tant que rien n'est écrit ni choisi (comme une messagerie) */
.reply-line .send-mic { display: none; }
.reply-line.can-mic:not(.has-photo):has(textarea:placeholder-shown) .send-mic { display: inline-flex; }
.reply-line.can-mic:not(.has-photo):has(textarea:placeholder-shown) .send-txt { display: none; }
/* Pendant l'enregistrement : Annuler, point rouge et compteur, puis envoyer / arrêter */
.rec-line { display: flex; align-items: center; gap: 8px; min-height: 48px; }
.rec-x { min-height: 44px; padding: 0 12px; border-radius: 22px; color: var(--red); font-weight: 600; font-size: calc(15px * var(--ts)); flex: none; }
.rec-now { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; padding: 0 14px; min-height: 44px; border-radius: 22px; background: var(--fill); }
.rec-now b { font-variant-numeric: tabular-nums; font-size: calc(16px * var(--ts)); }
.rec-l { color: var(--sec); font-size: calc(14px * var(--ts)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); flex: none; animation: recPulse 1s ease-in-out infinite; }
@keyframes recPulse { 50% { opacity: .25; } }
.rec-go { width: 48px; height: 48px; flex: none; border-radius: 24px; background: var(--accent); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; }
.rec-go svg { width: 22px; height: 22px; }
@media (prefers-reduced-motion: reduce) { .rec-dot { animation: none; } }
/* Lecteur : lecture / pause, barre (touchée = on y va), durée */
.voice { display: flex; align-items: center; gap: 10px; min-width: min(230px, 60vw); padding: 2px 0; }
.vc-play { width: 40px; height: 40px; flex: none; border-radius: 20px; background: var(--accent); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; }
.vc-play svg { width: 18px; height: 18px; }
.voice.mine .vc-play { background: var(--on-accent); color: var(--accent); }
.vc-bar { flex: 1; position: relative; height: 28px; cursor: pointer; }
.vc-bar::before, .vc-bar i { content: ''; position: absolute; top: 11px; height: 6px; border-radius: 3px; }
.vc-bar::before { inset-inline: 0; background: color-mix(in srgb, currentColor 20%, transparent); }
.vc-bar i { inset-inline-start: 0; background: var(--accent); transition: width .2s linear; }
.voice.mine .vc-bar i { background: currentColor; }
.vc-t { font-size: calc(13px * var(--ts)); font-variant-numeric: tabular-nums; opacity: .75; min-width: 34px; text-align: end; }
.cb .voice { margin: 2px 0 2px; }
.tc:has(> .tc-voice) { flex-wrap: wrap; }
.tc > .tc-voice { flex: 0 0 100%; min-width: 0; order: 5; }
.tc:has(> .tc-voice) > .tc-more { order: 6; }
.tc-voice .voice { min-width: 0; }
.tv-head .tc-voice { margin-top: 8px; }
.tc-voice .voice, .rp-voice .voice { padding-block: 8px; padding-inline: 8px 12px; border-radius: 22px; background: var(--fill); max-width: 420px; }
.rp-voice { display: grid; gap: 4px; }
.rp-picks { display: grid; gap: 10px; }
.rp-picks.two { grid-template-columns: 1fr 1fr; }
.tr-mic svg { width: 15px; height: 15px; vertical-align: -2px; margin-inline-end: 4px; color: var(--accent); }
