/* Monito Monita : la page est une feuille pliée en cocotte.
   Grand écran : la cocotte sert de menu, chaque face se déplie.
   Petit écran : la cocotte laisse la place à quatre onglets simples. */
:root {
  --washi: #f2eee5;
  --paper: #fbf9f4;
  --field: #ffffff;
  --crease: #d3c9b5;
  --line: #cfc6b4;
  --ink: #22252c;
  --muted: #615f59;
  --indigo: #2b3d68;  --indigo-d: #1e2d50;
  --coral: #df6a4e;   --coral-d: #bf5139;
  --sage: #7fa08b;    --sage-d: #5a7a66;
  --sand: #e8d6b4;    --sand-d: #d3bd94;
  --display: "Shippori Mincho", Georgia, serif;
  --body: "Zen Kaku Gothic New", system-ui, sans-serif;
  --S: 184px;
  --fold: .8s cubic-bezier(.62, .02, .22, 1);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--washi); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.55; min-height: 100vh; }
a { color: var(--indigo); }

/* ---------- Feuille de fond ---------- */
.sheet-bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.sheet-bg .f-top { fill: #f5f1e9; } .sheet-bg .f-right { fill: #ece6da; }
.sheet-bg .f-bottom { fill: #e8e1d3; } .sheet-bg .f-left { fill: #f1ece2; }
.root[data-pos="top"] .sheet-bg .f-top { fill: color-mix(in srgb, var(--indigo) 9%, #f5f1e9); }
.root[data-pos="right"] .sheet-bg .f-right { fill: color-mix(in srgb, var(--coral) 13%, #ece6da); }
.root[data-pos="bottom"] .sheet-bg .f-bottom { fill: color-mix(in srgb, var(--sage) 16%, #e8e1d3); }
.root[data-pos="left"] .sheet-bg .f-left { fill: color-mix(in srgb, var(--sand) 45%, #f1ece2); }
.sheet-bg line { stroke: var(--crease); stroke-width: 1; vector-effect: non-scaling-stroke; }
.sheet-bg line.mountain { stroke-dasharray: 10 4 2 4; opacity: .8; }

.page { position: relative; z-index: 1; max-width: 1160px; margin: 0 auto; padding-block: 18px 56px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* ---------- En-tête ---------- */
.top { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin-bottom: 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 20px; color: var(--indigo); text-decoration: none; }
.brand svg { width: 42px; height: auto; flex: none; }
.whoami { margin-left: auto; display: flex; align-items: center; gap: 8px 10px; font-size: 14px; color: var(--muted); flex-wrap: wrap; min-width: 0; }
.whoami b { color: var(--ink); }
.ribbon { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--paper); padding: 4px 16px 4px 10px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 7px) 50%, 100% 100%, 0 100%); background: var(--indigo); }
.ribbon.moi { background: var(--coral-d); }

/* ---------- Mise en page ---------- */
.layout { display: grid; grid-template-columns: calc(var(--S) * 2 + 8px) minmax(0, 1fr); gap: 40px; align-items: start; }
.nav { position: sticky; top: 16px; display: grid; justify-items: center; gap: 6px; }
.hint { font-size: 13px; color: var(--muted); text-align: center; max-width: 30ch; margin: 0; }
.tabs { display: none; }

/* ---------- Cocotte ---------- */
.cocotte { position: relative; width: calc(var(--S) * 2); height: calc(var(--S) * 2); perspective: 1100px; }
.base { position: absolute; left: calc(var(--S) / 2); top: calc(var(--S) / 2); width: var(--S); height: var(--S);
  background:
    linear-gradient(45deg, transparent calc(50% - .6px), var(--crease) calc(50% - .6px) calc(50% + .6px), transparent calc(50% + .6px)),
    linear-gradient(-45deg, transparent calc(50% - .6px), var(--crease) calc(50% - .6px) calc(50% + .6px), transparent calc(50% + .6px)),
    var(--paper);
  box-shadow: 0 1px 1px rgba(34,37,44,.08), 0 20px 34px -22px rgba(30,45,80,.55); }
.face { position: absolute; display: block; color: inherit; text-decoration: none; transform-style: preserve-3d; transition: transform var(--fold); pointer-events: none; }
.face:focus { outline: none; }
.face .front, .face .back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; pointer-events: auto; }
.face .lbl { position: absolute; font-size: calc(var(--S) * .066); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; line-height: 1.15; white-space: nowrap; }

.face.top    { left: calc(var(--S) / 2); top: calc(var(--S) / 2); width: var(--S); height: calc(var(--S) / 2); transform-origin: 50% 0; }
.face.bottom { left: calc(var(--S) / 2); top: var(--S); width: var(--S); height: calc(var(--S) / 2); transform-origin: 50% 100%; }
.face.left   { left: calc(var(--S) / 2); top: calc(var(--S) / 2); width: calc(var(--S) / 2); height: var(--S); transform-origin: 0 50%; }
.face.right  { left: var(--S); top: calc(var(--S) / 2); width: calc(var(--S) / 2); height: var(--S); transform-origin: 100% 50%; }
.face.top .front    { clip-path: polygon(0 0, 100% 0, 50% 100%); }
.face.top .back     { clip-path: polygon(0 100%, 100% 100%, 50% 0); transform: rotateX(180deg); }
.face.bottom .front { clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.face.bottom .back  { clip-path: polygon(0 0, 100% 0, 50% 100%); transform: rotateX(180deg); }
.face.left .front   { clip-path: polygon(0 0, 100% 50%, 0 100%); }
.face.left .back    { clip-path: polygon(100% 0, 100% 100%, 0 50%); transform: rotateY(180deg); }
.face.right .front  { clip-path: polygon(100% 0, 100% 100%, 0 50%); }
.face.right .back   { clip-path: polygon(0 0, 100% 50%, 0 100%); transform: rotateY(180deg); }

.face.top, .tab.top       { --c: var(--indigo); --cd: var(--indigo-d); --on: var(--paper); }
.face.right, .tab.right   { --c: var(--coral); --cd: var(--coral-d); --on: var(--paper); }
.face.bottom, .tab.bottom { --c: var(--sage); --cd: var(--sage-d); --on: var(--paper); }
.face.left, .tab.left     { --c: var(--sand); --cd: var(--sand-d); --on: var(--ink); }
.face { color: var(--on); }
.face.top .front, .face.bottom .front { background: linear-gradient(90deg, var(--c) 50%, var(--cd) 50%); }
.face.left .front, .face.right .front { background: linear-gradient(180deg, var(--c) 50%, var(--cd) 50%); }
.face .back { color: var(--cd); }
.face.left .back { color: #7d6640; }
.face.top .back, .face.bottom .back { background: linear-gradient(90deg, #fffdf8 50%, #f1ece1 50%); }
.face.left .back, .face.right .back { background: linear-gradient(180deg, #fffdf8 50%, #f1ece1 50%); }

.face.top .front .lbl    { left: 0; right: 0; top: 17%; text-align: center; }
.face.bottom .front .lbl { left: 0; right: 0; bottom: 17%; text-align: center; }
.face.top .back .lbl     { left: 0; right: 0; bottom: 18%; text-align: center; }
.face.bottom .back .lbl  { left: 0; right: 0; top: 18%; text-align: center; }
.face.left .lbl, .face.right .lbl { writing-mode: vertical-rl; top: 50%; transform: translateY(-50%); letter-spacing: .16em; }
.face.left .front .lbl  { left: 12%; }
.face.right .front .lbl { right: 12%; }
.face.right .back .lbl  { left: 14%; }
.face.left .back .lbl   { right: 14%; }

.face.top:hover, .face.top:focus-visible       { transform: rotateX(16deg); }
.face.bottom:hover, .face.bottom:focus-visible { transform: rotateX(-16deg); }
.face.left:hover, .face.left:focus-visible     { transform: rotateY(-16deg); }
.face.right:hover, .face.right:focus-visible   { transform: rotateY(16deg); }
.face.top.open    { transform: rotateX(180deg); }
.face.bottom.open { transform: rotateX(-180deg); }
.face.left.open   { transform: rotateY(-180deg); }
.face.right.open  { transform: rotateY(180deg); }
/* Pas d'animation par défaut : .unfolding n'est posée qu'après un clic sur un élément [data-unfold] (voir unfold.js). */
.unfolding .face.top.open    { animation: open-top var(--fold); }
.unfolding .face.bottom.open { animation: open-bottom var(--fold); }
.unfolding .face.left.open   { animation: open-left var(--fold); }
.unfolding .face.right.open  { animation: open-right var(--fold); }
@keyframes open-top { from { transform: none; } }
@keyframes open-bottom { from { transform: none; } }
@keyframes open-left { from { transform: none; } }
@keyframes open-right { from { transform: none; } }
.face:focus-visible .front .lbl { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.face.open { cursor: default; }
.seal { position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; pointer-events: none;
  background: linear-gradient(135deg, var(--coral) 50%, var(--coral-d) 50%); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }

/* ---------- Onglets (petit écran) ---------- */
.tab { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 8px 10px; text-decoration: none;
  font-size: 14px; font-weight: 700; color: var(--ink); background: var(--paper); box-shadow: inset 0 -3px 0 var(--c); text-align: center; }
.tab::before { content: ""; width: 12px; height: 12px; flex: none; background: linear-gradient(135deg, var(--c) 50%, var(--cd) 50%); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.tab.active { background: var(--c); color: var(--on); box-shadow: none; }
.tab.active::before { background: var(--on); }
.tab:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- Feuille de contenu ---------- */
.leaf-wrap { filter: drop-shadow(0 1px 1px rgba(34,37,44,.08)) drop-shadow(0 22px 26px rgba(30,45,80,.16)); min-width: 0; }
.leaf { position: relative; background: var(--paper); clip-path: polygon(0 0, calc(100% - 36px) 0, 100% 36px, 100% 100%, 0 100%);
  padding: 30px 34px 34px; min-height: 520px; transform-origin: 50% 0; }
.unfolding .leaf { animation: unfold .9s cubic-bezier(.3, .6, .2, 1) both; }
.leaf::before { content: ""; position: absolute; top: 0; right: 0; width: 36px; height: 36px; background: linear-gradient(225deg, transparent 50%, #e4ddcf 50%, #d4cbb9); }
@keyframes unfold { 0% { transform: perspective(1500px) rotateX(-70deg); } 65% { transform: perspective(1500px) rotateX(4deg); } 100% { transform: none; } }

.panel-head { display: grid; gap: 4px; margin-bottom: 22px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--tone, var(--muted)); }
.panel-head h1 { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(26px, 4vw, 38px); line-height: 1.15; text-wrap: balance; overflow-wrap: anywhere; }
.panel-head p { margin: 4px 0 0; max-width: 62ch; color: var(--muted); }
.tone-top { --tone: var(--indigo); } .tone-right { --tone: var(--coral-d); } .tone-bottom { --tone: var(--sage-d); } .tone-left { --tone: #8a7348; }

h2 { font-family: var(--display); font-weight: 700; font-size: 19px; margin: 0 0 4px; }
.block { display: grid; gap: 10px; margin-bottom: 26px; min-width: 0; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }

/* Champs : à plat, fond blanc, bordure nette, pour rester bien lisibles */
.field { display: grid; gap: 4px; min-width: 0; }
.field > label { font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--tone, var(--indigo)); text-transform: uppercase; }
.field input:not([type="checkbox"]), .field textarea, .field select {
  font: inherit; font-size: 16px; color: var(--ink); width: 100%; background: var(--field);
  border: 1px solid var(--line); border-radius: 0; padding: 10px 12px; }
.field textarea { resize: vertical; line-height: 1.65; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--tone, var(--indigo)); outline-offset: 0; border-color: transparent; }
.field .help, .errorlist { font-size: 13px; color: var(--muted); margin: 0; }
.errorlist { list-style: none; padding: 0; color: var(--coral-d); font-weight: 700; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.check input { margin-top: 4px; accent-color: var(--coral-d); width: 18px; height: 18px; flex: none; }

.btn { display: inline-block; border: 0; font: inherit; cursor: pointer; text-align: center; padding: 12px 30px; font-weight: 700; font-size: 15px; letter-spacing: .03em;
  color: var(--paper); text-decoration: none; background: linear-gradient(170deg, var(--indigo) 0 55%, var(--indigo-d) 55%);
  clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 50%, 100% 100%, 0 100%, 10px 50%); }
.btn.coral { background: linear-gradient(170deg, var(--coral) 0 55%, var(--coral-d) 55%); }
.btn.sage { background: linear-gradient(170deg, var(--sage) 0 55%, var(--sage-d) 55%); }
.btn.ghost { background: linear-gradient(170deg, #efe9dd 0 55%, #e4ddcf 55%); color: var(--ink); }
.btn.small { padding: 8px 22px; font-size: 13.5px; }
.btn:disabled { cursor: not-allowed; background: #ddd6c8; color: #7f7a70; }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.linkbtn { border: 0; background: none; font: inherit; font-size: 14px; color: var(--coral-d); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.inline { display: inline; margin: 0; }

.messages { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 8px; }
.messages li { padding: 10px 14px; font-size: 14.5px; font-weight: 500; background: color-mix(in srgb, var(--sage) 16%, var(--paper)); border-left: 4px solid var(--sage-d); }
.messages li.error { background: color-mix(in srgb, var(--coral) 12%, var(--paper)); border-color: var(--coral-d); }
.messages li.info { background: var(--washi); border-color: var(--line); }

.note { font-size: 14px; color: var(--muted); padding: 10px 14px; background: var(--washi); max-width: 62ch; margin: 0; }
.secret { display: grid; gap: 6px; padding: 14px 16px; background: var(--washi); max-width: 62ch; }
.secret code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; color: var(--indigo); overflow-wrap: anywhere; }
.secret small { color: var(--muted); font-size: 13.5px; }

.status { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.stat { padding: 12px 14px; background: linear-gradient(135deg, #fffdf8 50%, #f3eee4 50%); box-shadow: inset 0 0 0 1px #e6dfd1; }
.stat b { display: block; font-family: var(--display); font-weight: 800; font-size: 24px; font-variant-numeric: tabular-nums; line-height: 1.2; overflow-wrap: anywhere; }
.stat small { font-size: 12.5px; color: var(--muted); }

.rows { display: grid; }
.row { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--crease); }
.row:last-child { border-bottom: 0; }
.row .nm { font-weight: 700; flex: 1 1 160px; min-width: 0; }
.row .nm small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: 12px; font-weight: 700; padding: 3px 9px; white-space: nowrap; }
.chip.ok { background: color-mix(in srgb, var(--sage) 22%, var(--paper)); color: var(--sage-d); }
.chip.wait { background: color-mix(in srgb, var(--sand) 55%, var(--paper)); color: #6f5a36; }
.chip.org { background: color-mix(in srgb, var(--indigo) 12%, var(--paper)); color: var(--indigo); }
.add-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 10px; align-items: end; }
.add-row.excl-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto auto; }

.excl { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; font-size: 15px; padding: 6px 0; }
.excl .who { background: var(--washi); padding: 5px 12px; }
.excl .x { width: 20px; height: 20px; background: linear-gradient(135deg, var(--coral) 50%, var(--coral-d) 50%);
  clip-path: polygon(20% 0, 50% 30%, 80% 0, 100% 20%, 70% 50%, 100% 80%, 80% 100%, 50% 70%, 20% 100%, 0 80%, 30% 50%, 0 20%); }
.excl small { color: var(--muted); }

.danger { padding: 16px 18px; background: color-mix(in srgb, var(--coral) 8%, var(--paper)); display: grid; gap: 12px; margin-bottom: 18px; }
.danger h2 { color: var(--coral-d); margin: 0; }
.loop { display: flex; flex-wrap: wrap; gap: 6px; }
.loop span { width: 12px; height: 12px; background: var(--crease); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.loop span:first-child, .loop span:last-child { background: var(--coral); }

/* participant */
.reveal { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 28px; align-items: start; }
.env { position: relative; height: 230px; max-width: 300px; }
.env .card { position: absolute; left: 13%; right: 13%; top: 0; height: 150px; background: var(--paper); box-shadow: 0 4px 12px rgba(0,0,0,.12); text-align: center; padding: 18px 6px 0; }
.unfolding .env .card { animation: rise 1.1s .5s cubic-bezier(.3, .6, .2, 1) both; }
@keyframes rise { from { transform: translateY(70px); } to { transform: none; } }
.env .card small { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--indigo); font-weight: 700; }
.env .card b { display: block; font-family: var(--display); font-weight: 800; font-size: clamp(30px, 9vw, 46px); color: var(--coral-d); line-height: 1.1; margin-top: 2px; overflow-wrap: anywhere; }
.env .body { position: absolute; left: 0; right: 0; bottom: 0; height: 140px; background: var(--indigo); }
.env .l { position: absolute; left: 0; bottom: 0; width: 100%; height: 140px; background: #34497a; clip-path: polygon(0 0, 52% 58%, 0 100%); }
.env .r { position: absolute; right: 0; bottom: 0; width: 100%; height: 140px; background: #2f4373; clip-path: polygon(100% 0, 48% 58%, 100% 100%); }
.env .bt { position: absolute; left: 0; right: 0; bottom: 0; height: 140px; background: linear-gradient(180deg, #3b5287, var(--indigo-d)); clip-path: polygon(0 100%, 50% 42%, 100% 100%); }
.env .wax { position: absolute; left: 50%; bottom: 52px; width: 30px; height: 30px; margin-left: -15px; background: linear-gradient(135deg, var(--coral) 50%, var(--coral-d) 50%); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.confirm { display: grid; gap: 10px; padding: 16px 18px; background: color-mix(in srgb, var(--sage) 12%, var(--paper)); }
.confirm p { margin: 0; max-width: 52ch; }
.confirmed { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--sage-d); }
.confirmed::before { content: ""; width: 20px; height: 20px; flex: none; background: linear-gradient(135deg, var(--sage) 50%, var(--sage-d) 50%); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.meta { display: flex; gap: 14px 28px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.meta b { display: block; font-family: var(--display); font-weight: 800; font-size: 22px; color: var(--ink); }
.letter { font-size: 16px; line-height: 1.7; max-width: 60ch; padding: 16px 18px; background: var(--field); border: 1px solid #e6dfd1; white-space: pre-line; overflow-wrap: anywhere; }
.save-state { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; margin: 0; }
.save-state::before { content: ""; width: 9px; height: 9px; background: var(--sage); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.names { display: flex; flex-wrap: wrap; gap: 8px; }
.names span { font-size: 14px; padding: 5px 12px; background: var(--washi); }
.small-muted { font-size: 13px; color: var(--muted); }

/* page d'accueil : formulaire plié en trois */
.welcome { max-width: 720px; margin: 0 auto; }
.welcome .intro { margin: 10px 0 24px; }
.welcome .intro h1 { font-family: var(--display); font-weight: 800; font-size: clamp(30px, 6vw, 46px); line-height: 1.1; margin: 0 0 8px; text-wrap: balance; }
.welcome .intro p { margin: 0; color: var(--muted); max-width: 56ch; }
.folds { filter: drop-shadow(0 18px 24px rgba(30,45,80,.14)); }
.fold { background: var(--paper); padding: 22px 26px; display: grid; gap: 14px; }
.fold + .fold { border-top: 1px solid #e2dacb; }
.fold:nth-child(2) { background: #f7f3ea; }
.fold h2 { display: flex; align-items: baseline; gap: 10px; }
.fold h2 small { font-family: var(--body); font-size: 13px; font-weight: 500; color: var(--muted); }
.single { max-width: 560px; margin: 0 auto; }

@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .nav { display: none; }
  .tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; position: sticky; top: 0; z-index: 5; padding-block: 8px; background: var(--washi); }
  .leaf { padding: 22px 18px 26px; min-height: 0; clip-path: none; }
  .unfolding .leaf { animation: none; }
  .leaf::before { display: none; }
  .reveal { grid-template-columns: minmax(0, 1fr); }
  .add-row, .add-row.excl-form { grid-template-columns: minmax(0, 1fr); }
  .whoami { margin-left: 0; }
  .fold { padding: 18px 16px; }
}
@media (max-width: 520px) {
  .tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .btn { width: 100%; }
  .actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .face, .unfolding .face.open, .unfolding .leaf, .unfolding .env .card { transition: none; animation: none; }
}

/* ---------- Fil anonyme ---------- */
.thread { border-top: 1px dashed var(--crease); padding-top: 22px; }
.thread-list { display: grid; gap: 10px; max-height: 420px; overflow-y: auto; padding: 4px 2px; }
.msg { max-width: min(80%, 52ch); padding: 10px 14px; background: var(--washi); justify-self: start; }
.msg.mine { justify-self: end; background: color-mix(in srgb, var(--indigo) 10%, var(--paper)); }
.msg .who { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.msg p { margin: 0; overflow-wrap: anywhere; }
.thread-form { display: grid; gap: 10px; }
.pip { display: inline-block; width: 9px; height: 9px; margin: 0 0 1px 6px; vertical-align: middle; background: var(--coral); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.face.right .pip, .tab.right .pip { background: var(--paper); }
.face.left .lbl .pip, .face.right .lbl .pip { margin: 6px 0 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Corrections, échecs ---------- */
.chip.fail { background: color-mix(in srgb, var(--coral) 16%, var(--paper)); color: var(--coral-d); }
.row details.edit summary { list-style: none; display: inline-block; }
.row details.edit summary::-webkit-details-marker { display: none; }
.row details.edit[open] { flex: 1 1 100%; }
.row details.edit[open] > form { padding-top: 8px; }
