/* Croissantgate — open space vu de dessus, meubles en pictogrammes, Post-it. Clair le jour, « bureau après 19 h » le soir.
   Couleurs identiques à l'app iOS (Palette.swift). */

@font-face { font-family: "Bricolage"; src: url("fonts/bricolage-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Bricolage"; src: url("fonts/bricolage-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("fonts/caveat-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("fonts/atkinson-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("fonts/atkinson-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: light dark;
  --bg: #F4F1E8; --surface: #FFFFFF; --ink: #1D2733; --ink-soft: #4E5B69; --rule: #D9D3C4;
  --accent: #A84B14; --accent-bg: #B4521A; --on-accent: #FFFFFF; --select: #FBE3D0;
  --alarm: #B3261E; --ok: #24704A; --focus: #1558B0;
  --postit: #FFE36B; --postit-2: #FFD84A; --postit-ink: #2E2700; --shadow: rgba(40, 30, 10, .18);
  --wall: #26303B; --window: #8EC9E8; --tag: rgba(255, 255, 255, .88); --seam: rgba(20, 30, 40, .10);
  --lane: rgba(255, 210, 60, .22); --marker: #C2362B;
  --veil: rgba(58, 67, 80, .34); --veil-line: rgba(29, 39, 51, .22); --zone: rgba(255, 196, 0, .18);
  /* Sols : une teinte unie par type de pièce */
  --fl-os: #CBD8E6; --fl-ki: #F5EBC6; --fl-me: #E7C9A0; --fl-bo: #BFD8C4; --fl-re: #F3E1E4;
  --fl-ph: #D6CCE8; --fl-co: #DDDDD6; --fl-lo: #F6DCC8; --fl-ar: #D8CBB5; --fl-se: #C7D3DA;
  /* Meubles */
  --line: #2A3440; --screen: #2B3440; --glow: #8EC9E8; --mug: #E8673C; --wood: #C98B4E; --wood2: #A4693A;
  --seat: #2F7A8C; --back: #1F4F5B; --base: #7A8593; --pot: #C7763E; --rim: #B0632F;
  --leaf: #2F8A57; --leaf2: #55B079; --vein: rgba(30, 107, 64, .6);
  --cab: #B9C6D3; --cab2: #8C9BAB; --rug: #C8553D; --rug-edge: #8E3324; --cream: #F3E3C3; --fringe: #D9C7A2;
  /* Couleurs des collègues */
  --c0: #3E63B5; --c1: #B23A5B; --c2: #2B7656; --c3: #8049AD; --c4: #B4521A; --c5: #1D6F80;
  --c6: #8A5E0E; --c7: #56652A; --c8: #B7366F; --c9: #4A5568; --c10: #7A3E2E; --c11: #2C5282;
  --box: #F4B6C2; --box-line: #9C4A5C; --ribbon: #FFFFFF; --croissant: #E3A043; --crust: #8A4B12;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151B23; --surface: #1F2731; --ink: #E9EDF2; --ink-soft: #A9B4C1; --rule: #2E3946;
    --accent: #F2A563; --accent-bg: #E08A45; --on-accent: #1A1208; --select: #3A2A1E;
    --alarm: #FF8A7E; --ok: #6FD39C; --focus: #8EC9FF;
    --postit: #EED158; --postit-2: #E2C244; --postit-ink: #241E00; --shadow: rgba(0, 0, 0, .45);
    --wall: #070A0E; --window: #4F86A6; --tag: rgba(21, 27, 35, .86); --seam: rgba(255, 255, 255, .06);
    --lane: rgba(255, 214, 90, .16); --marker: #FF7B6E;
    --veil: rgba(0, 0, 0, .5); --veil-line: rgba(154, 165, 178, .22); --zone: rgba(255, 196, 0, .1);
    --fl-os: #33404F; --fl-ki: #4A4430; --fl-me: #5A4631; --fl-bo: #2E4636; --fl-re: #4A3439;
    --fl-ph: #433B58; --fl-co: #3A3A38; --fl-lo: #4D3A2F; --fl-ar: #433D33; --fl-se: #2F3A42;
    --line: #0E1318; --screen: #1B222B; --glow: #6FA8CC; --mug: #F08A5D; --wood: #B27A45; --wood2: #8A5A30;
    --seat: #3F98AA; --back: #2A6A78; --base: #8C97A4; --pot: #B0683A; --rim: #96562C;
    --leaf: #3A9A64; --leaf2: #5DB883;
    --cab: #8796A6; --cab2: #5E6B79; --rug: #B24E3A; --rug-edge: #7A2E22; --cream: #EBD9B5; --fringe: #C9B792;
    --box: #D998A6; --box-line: #F2C3CD; --ribbon: #FFF4F6;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1rem/1.45 "Atkinson", system-ui, sans-serif;
  padding: 0 max(12px, env(safe-area-inset-left)) 24px max(12px, env(safe-area-inset-right));
}
h1, h2 { font-family: "Bricolage", system-ui, sans-serif; font-weight: 800; margin: 0; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }

/* En-tête compact : enseigne, numéro, horloge, aide */
.masthead { max-width: 1080px; margin: 0 auto; padding: 10px 0 8px; display: flex; gap: 10px; align-items: center; justify-content: space-between; border-bottom: 2px dashed var(--rule); }
.brand { display: flex; gap: 10px; align-items: center; min-width: 0; }
.logo { width: 40px; height: 40px; flex: none; transform: rotate(-6deg); }
h1 { font-size: 1.45rem; letter-spacing: -.02em; line-height: 1.05; }
.number { margin: 0; font: 600 .9rem "Bricolage", sans-serif; color: var(--ink-soft); }
.meta { display: flex; gap: 8px; align-items: center; flex: none; }
.clock { display: flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 999px; background: var(--wall); color: #F4F1E8; font: 600 1rem "Bricolage", sans-serif; font-variant-numeric: tabular-nums; }
.clock svg { width: 26px; height: 26px; }
.clock-face { fill: #F4F1E8; stroke: #9AA5B1; stroke-width: 2.5; }
.clock-hand { stroke: #1D2733; stroke-width: 3; stroke-linecap: round; }
.clock-sec { stroke: #C2362B; stroke-width: 1.4; stroke-linecap: round; }
.clock-pin { fill: #1D2733; }
.help-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--rule); background: var(--surface); color: var(--accent); font: 800 1.2rem "Bricolage", sans-serif; cursor: pointer; }

/* Choix de la difficulté : trois boutons d'un mot, un détail dessous. Le choix est mémorisé. */
.difficulties { max-width: 1080px; margin: 8px auto 0; }
.difficulty-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.difficulty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 44px; padding: 4px 6px; border: 1.5px solid var(--rule); border-radius: 10px; background: var(--surface); color: var(--ink); cursor: pointer; text-align: center; }
.difficulty-name { font: 800 .98rem "Bricolage", sans-serif; line-height: 1.1; }
.difficulty-detail { font-size: .74rem; color: var(--ink-soft); line-height: 1.15; }
.difficulty[aria-checked="true"] { background: var(--select); border-color: var(--accent-bg); box-shadow: inset 0 0 0 1px var(--accent-bg); }
.difficulty-demoniac[aria-checked="true"] { border-color: var(--marker); box-shadow: inset 0 0 0 1px var(--marker); }
.mode-note { margin: 6px 0 0; font-size: .85rem; color: var(--alarm); font-weight: 600; }
/* Démoniaque : le chrono passe au premier plan. */
.demoniac .clock { font-size: 1.3rem; padding: 4px 14px 4px 5px; background: var(--marker); color: var(--bg); }
.demoniac .clock svg { width: 32px; height: 32px; }

.notice { max-width: 1080px; margin: 8px auto 0; padding: 6px 12px; border-left: 5px solid var(--accent-bg); background: var(--surface); border-radius: 4px; font-size: .9rem; }

/* Jeu. Téléphone : tout tient dans l'écran (plan, légende, outils, présents) et les Post-it défilent dessous,
   toujours visibles. Large écran : plan à gauche, Post-it à droite. */
.game { max-width: 1080px; margin: 8px auto 0; display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
@media (max-width: 879px) and (min-height: 620px) {
  .app { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
  .game { flex: 1; min-height: 0; display: flex; flex-direction: column; width: 100%; }
  .board { flex: none; }
  .notes { flex: 1; min-height: 120px; display: flex; flex-direction: column; }
  .clues, .hint-note { flex: none; }
  .notes-scroll { flex: 1; min-height: 0; overflow-y: auto; }
  .game .plan { width: min(100%, max(270px, calc(100dvh - 560px))); }
}
@media (min-width: 880px) {
  .game { grid-template-columns: minmax(0, 520px) minmax(0, 1fr); align-items: start; gap: 28px; margin-top: 16px; }
  .notes { position: sticky; top: 12px; }
  .game .plan { width: min(100%, max(320px, calc(100vh - 330px))); }
}
.label { font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; margin: 0; color: var(--ink-soft); font-weight: 600; }

.plan { position: relative; width: 100%; max-width: 520px; margin: 0 auto; aspect-ratio: 1; }
.plan svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cells { position: absolute; display: grid; }
.cell { border: 0; padding: 0; margin: 0; background: transparent; cursor: pointer; border-radius: 4px; -webkit-tap-highlight-color: transparent; }
.cell[aria-disabled="true"] { cursor: not-allowed; }
.cell:focus-visible { outline-offset: -3px; }

/* Plan */
.fl-openspace { fill: var(--fl-os); } .fl-kitchen { fill: var(--fl-ki); } .fl-meeting { fill: var(--fl-me); }
.fl-boss { fill: var(--fl-bo); } .fl-reception { fill: var(--fl-re); } .fl-phonebox { fill: var(--fl-ph); }
.fl-copyroom { fill: var(--fl-co); } .fl-lounge { fill: var(--fl-lo); } .fl-archives { fill: var(--fl-ar); }
.fl-serverroom { fill: var(--fl-se); }
.grid-seam { fill: none; stroke: var(--seam); stroke-width: 2; stroke-dasharray: 6 6; }
.wall { fill: none; stroke: var(--wall); stroke-width: 8; stroke-linecap: square; }
.outer-wall { fill: none; stroke: var(--wall); stroke-width: 14; }
.window { fill: none; stroke: var(--window); stroke-width: 6; }
.room-tag { fill: var(--tag); }
.room-tag-text { font: 600 15px "Bricolage", sans-serif; letter-spacing: .6px; fill: var(--ink); }
.axis { font: 600 22px "Bricolage", sans-serif; fill: var(--ink-soft); }
.lane { fill: var(--lane); }
.veil { fill: var(--veil); } .veil-hatch { fill: none; stroke: var(--veil-line); stroke-width: 3; }
.zone { fill: var(--zone); stroke: var(--accent-bg); stroke-width: 3.5; }
.tk-cited { fill: none; stroke: var(--accent-bg); stroke-width: 6; }
.hint-ring { fill: none; stroke: var(--accent-bg); stroke-width: 5; stroke-dasharray: 10 7; }
.cross { fill: none; stroke: var(--marker); stroke-width: 8; stroke-linecap: round; opacity: .9; }

/* Meubles (pictogrammes de face, voir js/art.js) */
.fu-screen { fill: var(--screen); stroke: var(--line); stroke-width: 2.5; } .fu-glow { fill: var(--glow); } .fu-stand { fill: var(--screen); }
.fu-mug { fill: var(--mug); stroke: var(--line); stroke-width: 2; }
.fu-wood { fill: var(--wood); stroke: var(--line); stroke-width: 3; } .fu-wood2 { fill: var(--wood2); stroke: var(--line); stroke-width: 2.5; }
.fu-ln { fill: none; stroke: var(--line); stroke-width: 2.5; stroke-linecap: round; }
.fu-base { fill: none; stroke: var(--base); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; } .fu-stem { fill: var(--base); }
.fu-seat { fill: var(--seat); stroke: var(--line); stroke-width: 2.5; } .fu-back { fill: var(--back); }
.fu-leaf { fill: var(--leaf); } .fu-leaf2 { fill: var(--leaf2); } .fu-vein { fill: none; stroke: var(--vein); stroke-width: 1.5; }
.fu-pot { fill: var(--pot); stroke: var(--line); stroke-width: 2.5; } .fu-rim { fill: var(--rim); stroke: var(--line); stroke-width: 2.5; }
.fu-cab { fill: var(--cab); stroke: var(--line); stroke-width: 3; } .fu-cab2 { fill: var(--cab2); stroke: var(--line); stroke-width: 2.5; }
.fu-panel { fill: none; stroke: var(--cab2); stroke-width: 2.5; } .fu-dark { fill: var(--line); }
.fu-fringe { fill: none; stroke: var(--fringe); stroke-width: 2; stroke-linecap: round; }
.fu-rug { fill: var(--rug); stroke: var(--rug-edge); stroke-width: 2; } .fu-rug-in { fill: none; stroke: var(--cream); stroke-width: 3; }
.fu-cream { fill: var(--cream); } .fu-rug-c { fill: var(--rug); }
.fu-floor { fill: var(--fl-os); stroke: var(--ink-soft); stroke-width: 3; } .fu-floor-seam { fill: none; stroke: rgba(90, 60, 25, .3); stroke-width: 2; }

/* Jetons */
.tk-ring { fill: #FFFFFF; }
.tk-glow { fill: none; stroke: #FFC400; stroke-width: 7; }
.tk-conflict { fill: none; stroke: var(--marker); stroke-width: 5; stroke-dasharray: 8 6; }
.tk-box { fill: var(--box); stroke: var(--box-line); stroke-width: 3.5; }
.tk-ribbon { stroke: var(--ribbon); stroke-width: 6; }
.tk-croissant { fill: var(--croissant); stroke: var(--crust); stroke-width: 3; stroke-linejoin: round; }
.tk-crumb { stroke: var(--crust); stroke-width: 2.5; stroke-linecap: round; }
.token { transition: transform .25s ease; }
@media (prefers-reduced-motion: reduce) { .token { transition: none; } }
.tk-c0 { fill: var(--c0); } .tk-c1 { fill: var(--c1); } .tk-c2 { fill: var(--c2); } .tk-c3 { fill: var(--c3); }
.tk-c4 { fill: var(--c4); } .tk-c5 { fill: var(--c5); } .tk-c6 { fill: var(--c6); } .tk-c7 { fill: var(--c7); }
.tk-c8 { fill: var(--c8); } .tk-c9 { fill: var(--c9); } .tk-c10 { fill: var(--c10); } .tk-c11 { fill: var(--c11); }

/* Légende : on peut s'y tenir / ça bloque */
.legend { margin: 6px 0 0; display: grid; gap: 2px; }
.legend-row { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 7px; font-size: .82rem; }
.legend-row strong { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; }
.legend-ok::before, .legend-no::before { content: ""; width: 16px; height: 16px; border-radius: 50%; flex: none; }
.legend-ok::before { background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }
.legend-no::before { border: 2.5px solid var(--alarm); background: linear-gradient(45deg, transparent 43%, var(--alarm) 43% 57%, transparent 57%); width: 15px; height: 15px; }
.legend-item { display: inline-flex; align-items: center; gap: 3px; }
.tile-icon { flex: none; }

/* Outils, tous libellés */
.toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; justify-content: space-between; }
.mode { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; padding: 3px; background: var(--surface); }
.mode button { border: 0; background: transparent; padding: 6px 12px; border-radius: 999px; min-height: 38px; cursor: pointer; font-weight: 700; font-size: .95rem; }
.mode button[aria-checked="true"] { background: var(--ink); color: var(--bg); }
.tool { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; padding: 6px 12px; font-size: .95rem; border-radius: 999px; border: 1.5px solid var(--rule); background: var(--surface); cursor: pointer; font-weight: 700; }
.tool svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tools { display: inline-flex; gap: 6px; }
button[aria-disabled="true"] { opacity: .45; }
.status { margin: 6px 0 4px; font-size: .9rem; color: var(--ink-soft); min-height: 1.3em; }
.status.bad { color: var(--alarm); font-weight: 700; } .status.good { color: var(--ok); font-weight: 700; }

/* Présents : un portrait et un prénom chacun */
.cast { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; }
.chip { width: 100%; min-height: 62px; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 4px 2px; border: 2.5px solid transparent; border-radius: 12px; background: transparent; cursor: pointer; }
.chip .pic { position: relative; display: block; line-height: 0; }
.chip .who { font-size: clamp(.66rem, 3vw, .82rem); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.chip[aria-pressed="true"] { background: var(--select); border-color: var(--accent-bg); }
.chip[aria-pressed="true"] .who { color: var(--accent); }
.chip.is-placed .pic::after { content: "✓"; position: absolute; right: -4px; bottom: -2px; width: 18px; height: 18px; border-radius: 50%; background: var(--ok); color: #FFF; font: 700 12px/18px system-ui, sans-serif; text-align: center; border: 2px solid var(--bg); }
.chip.is-clash .pic::after { content: "!"; background: var(--alarm); }
.accuse { min-height: 46px; padding: 8px 20px; border-radius: 10px; border: 0; background: var(--accent-bg); color: var(--on-accent); cursor: pointer; font: 800 1.05rem "Bricolage", sans-serif; letter-spacing: .02em; }
.accuse-big { width: 100%; min-height: 54px; font-size: 1.2rem; }

/* Post-it : une ligne par indice, portraits et meuble cité, coche quand le plan les respecte */
.notes { margin-top: 4px; }
.notes-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.count { margin: 0; font-size: .85rem; color: var(--ink-soft); }
.notes-scroll { padding: 2px 2px 8px; }
.clues { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.clue { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 5px 10px; border-radius: 4px; background: var(--postit); color: var(--postit-ink); position: relative; }
.clue::after { content: ""; position: absolute; right: 0; top: 0; border-style: solid; border-width: 0 10px 10px 0; border-color: transparent var(--bg) var(--postit-2) transparent; }
.clue .faces { display: inline-flex; align-items: center; flex: none; }
.clue .faces .portrait + .portrait { margin-left: -7px; }
.clue .faces .tile-icon { margin-left: 4px; }
.clue .text { flex: 1; font-size: .95rem; line-height: 1.3; }
.clue .mark { flex: none; font: 800 1.1rem system-ui, sans-serif; min-width: 1em; text-align: center; }
.clue.is-ok .mark { color: #1E6B43; }
.clue.is-bad { outline: 2.5px solid #C2362B; outline-offset: -2.5px; }
.clue.is-bad .mark { color: #B3261E; }
.clue { cursor: pointer; transition: opacity .15s; }
.clue.is-about { box-shadow: inset 6px 0 0 var(--accent-bg); padding-left: 14px; }
.clue.is-dim { opacity: .55; }
.clue.is-focus { outline: 3px solid var(--accent-bg); outline-offset: 1px; }
.chip.is-cited { border-style: dashed; border-color: var(--accent-bg); }
@media (prefers-reduced-motion: reduce) { .clue { transition: none; } }
.clue.is-lit { outline: 3px dashed var(--accent-bg); outline-offset: 1px; }
.hint-note { margin: 0 0 6px; padding: 8px 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--rule); border-left: 5px solid var(--accent-bg); font-size: .92rem; }
.hint-note p { margin: 0; }
.hint-head { display: flex; align-items: center; gap: 8px; margin-bottom: 2px !important; }
.hint-head strong { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); }
.hint-dots { display: inline-flex; gap: 3px; }
.hint-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--rule); }
.hint-dots i.on { background: var(--accent-bg); }
.hint-deeper { margin-top: 6px; min-height: 40px; padding: 4px 14px; border-radius: 999px; border: 1.5px solid var(--accent-bg); background: var(--select); color: var(--ink); font: 700 .9rem inherit; font-family: inherit; cursor: pointer; }

/* Dialogues : accusation et note de service */
dialog { border: 0; border-radius: 12px; padding: 0; max-width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); background: var(--surface); color: var(--ink); box-shadow: 0 20px 50px var(--shadow); }
dialog::backdrop { background: rgba(10, 14, 20, .55); }
dialog form { padding: 20px; }
dialog h2 { font-size: 1.35rem; }
.memo { border-top: 7px solid var(--accent-bg); border-radius: 12px; }
.memo-kicker { margin: 0; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; font-size: .85rem; color: var(--ink-soft); }
.memo h2 { margin: 6px 0 10px; font-family: "Bricolage", sans-serif; font-weight: 800; }
.memo-art { display: flex; align-items: center; justify-content: center; gap: 2px; margin: 4px 0 8px; }
.memo-art .portrait:first-child { margin-right: 10px; transform: rotate(-6deg); }
.memo-art .portrait + .portrait { margin-left: -8px; }
.memo-list { padding-left: 1.3em; margin: 8px 0 8px; } .memo-list li { margin: 6px 0; }
.legend-memo { margin: 0 0 14px; padding: 10px 12px; background: var(--bg); border-radius: 10px; }
.memo-sign { font-size: .9rem; color: var(--ink-soft); margin: 0 0 16px; }
.memo .accuse { width: 100%; }
.suspects { list-style: none; padding: 0; margin: 14px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.badge {
  width: 100%; display: grid; grid-template-columns: 44px 1fr; gap: 2px 10px; align-items: center; text-align: left;
  padding: 10px; border-radius: 10px; border: 1px solid var(--rule); background: var(--surface); cursor: pointer; min-height: 64px;
}
.badge svg { grid-row: span 2; width: 44px; height: 44px; }
.badge .who { font: 600 1rem/1.1 "Bricolage", sans-serif; }
.badge .role { font-size: .8rem; line-height: 1.2; color: var(--ink-soft); }

/* Résultat : le mail de la Direction */
.result { max-width: 640px; margin: 28px auto 0; }
.result:focus { outline: none; }
.mail { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 20px; box-shadow: 0 10px 30px var(--shadow); border-top: 8px solid var(--accent-bg); }
.mail header p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.mail h2 { font-size: 1.3rem; margin: 6px 0 12px; }
.mail-body { white-space: pre-line; margin: 0 0 16px; }
.aside { text-align: center; color: var(--ink-soft); margin: 10px 0 0; }

.footer { max-width: 1080px; margin: 40px auto 0; padding-top: 12px; border-top: 2px dashed var(--rule); color: var(--ink-soft); font-size: .9rem; display: flex; flex-wrap: wrap; gap: 4px 24px; justify-content: space-between; }
.footer p { margin: 0; }
.footer a { color: inherit; }

.assist { display: flex; gap: 10px; align-items: center; min-height: 44px; margin: 10px 0 0; font-size: .95rem; cursor: pointer; }
.assist input { width: 22px; height: 22px; accent-color: var(--accent-bg); flex: none; }

.mail-streak { margin: 0 0 10px; font: 600 1.4rem "Caveat", cursive; }
.mail-streak:empty, .share-preview:empty { display: none; }
.share-preview { margin: 10px 0 0; padding: 12px; border-radius: 4px; background: var(--postit); color: var(--postit-ink); font: .95rem/1.5 "Atkinson", sans-serif; white-space: pre-wrap; }
