/* ═══════════════ Djouney v3 — le Salon (module S2) ═══════════════
   components/salon-view.js : classes .sl-
   Superpositions : vue pleine 48 · cadre du lecteur 70 (fenêtre déchirée de la vue pleine, fenêtre d'écoute,
   pastille) · lecteur YouTube 71, posé PAR-DESSUS son cadre. Au-dessus de toute l'app (battement 43, buée 44,
   Effleurement 45-46, jalons 55, feuilles 60) ; seuls les messages (100) passent devant, et ils s'écartent du
   lecteur (html[data-salon="open"], html[data-salon-coin^="haut"], --sl-toasts-top, --sl-toasts-bottom) ;
   s'ils ne trouvent aucune place libre, c'est le lecteur qui passe devant eux (101, posé par salon-view.js).
   Les feuilles passent sous le lecteur, et lui ne les couvre pas : la fenêtre d'écoute s'en écarte (salon-view.js),
   vue pleine elles s'arrêtent sous lui (--sl-sheet-max) ; la pastille repliée passe sous une feuille qui l'atteint.
   Règles de YouTube : rien ne recouvre le lecteur (ni papier, ni voile, ni bouton, ni flamme), sa zone fait au
   moins 200 × 200 px. La couche .sl-layer ne crée aucun contexte d'empilement. */

.sl-layer,
.sl-invite {
  /* Encre adoucie qui garde un contraste ≥ 4,5:1 sur la porcelaine comme sur le lait. */
  --sl-soft: rgba(var(--ink-rgb),  .84);
}
.sl-layer { display: contents; }

/* ═════════════════════════ Vue pleine ═════════════════════════ */
.sl-view {
  position: fixed;
  inset: 0;
  z-index: 48;
  display: flex;
  flex-direction: column;
  background: radial-gradient(120vmax 90vmax at 0% 0%, #FBF5EC 0%, var(--porcelain) 55%, #EADFD2 100%);
  color: var(--ink);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--mid) var(--ease), visibility 0s linear var(--mid);
}
.sl-view.is-shown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity var(--mid) var(--ease), visibility 0s;
}

.sl-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: calc(6px + var(--safe-top)) 16px 4px 4px;
}
.sl-back { color: var(--stem); }
.sl-head__titles {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 10px;
}
.sl-title {
  margin: 0;
  font-family: var(--font-hand);
  font-weight: 500;
  font-size: 34px;
  line-height: 1.15;
  color: var(--ink);
}
.sl-with {
  margin: 0;
  min-width: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 16px;
  color: var(--sl-soft);
  overflow-wrap: anywhere;
}

.sl-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.sl-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 10px 16px calc(36px + var(--safe-bottom));
}

/* ─── La place de la fenêtre (son cadre et le lecteur s'y posent, en position fixe) ───
   Le lecteur occupe la fenêtre moins une marge de papier (--sl-m, = FRAME.view.margin de salon-view.js) :
   largeur disponible × max(200 px, 16/9), soit 300 × 200 px à 360 px de large. */
.sl-window {
  --sl-m: 14px;
  position: relative;
  flex: none;
  width: 100%;
  min-width: calc(200px + 2 * var(--sl-m));
  aspect-ratio: 16 / 9;
  min-height: calc(200px + 2 * var(--sl-m));
  border-radius: 16px;
  background: var(--milk);
  box-shadow: var(--emboss);
}
@supports (height: 1cqw) {
  .sl-inner { container-type: inline-size; }
  .sl-window {
    aspect-ratio: auto;
    height: max(calc(200px + 2 * var(--sl-m)), calc((100cqw - 2 * var(--sl-m)) * 9 / 16 + 2 * var(--sl-m)));
  }
}

/* Sous la fenêtre, jamais dessus : le fil rouge descend de la vidéo jusqu'à la phrase. */
.sl-wait {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 0;
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15.5px;
  line-height: 1.4;
  color: var(--ink);
}
.sl-wait::before {
  content: "";
  width: 1.5px;
  height: 18px;
  border-radius: 1px;
  background: var(--thread);
  transform-origin: 50% 0;
  animation: sl-thread 600ms var(--ease) both;
}
.sl-wait:empty::before { display: none; }
@keyframes sl-thread { from { transform: scaleY(0); } }

.sl-track {
  margin: 18px 0 0;
  text-align: center;
  font-family: var(--font-hand);
  font-weight: 500;
  font-size: 29px;
  line-height: 1.15;
  color: var(--ink);
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sl-note {
  margin: 6px 0 0;
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  line-height: 1.45;
  color: var(--sl-soft);
}
/* Vide, elle ne prend aucune place mais reste là pour annoncer le prochain souci. */
.sl-note:empty { margin: 0; }

/* ─── Le disque, le bras, les deux flammes ─── */
.sl-stage {
  --disc: min(56vw, 232px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--disc) minmax(0, 1fr);
  align-items: end;
  width: 100%;
  margin: 22px 0 4px;
}
.sl-flame-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
  padding: 0 4px 2px;
}
.sl-flame-col__name {
  max-width: 100%;
  font-family: var(--font-hand);
  font-weight: 500;
  font-size: 21px;
  line-height: 1.15;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sl-turntable {
  position: relative;
  width: var(--disc);
  height: var(--disc);
}
.sl-disc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--milk);
  box-shadow: var(--emboss);
}
.sl-vinyl {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  transform-origin: 50% 50%;
}
.sl-vinyl__groove { fill: none; stroke: rgba(255, 255, 255, .95); stroke-width: .8; }
.sl-vinyl__ridge { fill: none; stroke: rgba(var(--shadow-rgb),  .24); stroke-width: .7; }
.sl-vinyl__glint { fill: none; stroke: rgba(255, 255, 255, .95); stroke-width: 1.8; stroke-linecap: round; }
.sl-vinyl__glint-shade { fill: none; stroke: rgba(var(--shadow-rgb),  .3); stroke-width: 1.4; stroke-linecap: round; }
.sl-vinyl__rim { fill: none; stroke: rgba(var(--shadow-rgb),  .32); stroke-width: 1; }
.sl-vinyl__label { fill: var(--flower); }
.sl-vinyl__label-ring { fill: none; stroke: rgba(255, 255, 255, .3); stroke-width: .7; }
.sl-vinyl__initial {
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: 25px;
  fill: var(--flower-ink);
}
/* Le reflet du vernis reste immobile quand le disque tourne dessous. */
.sl-disc__sheen {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  background: conic-gradient(from 200deg,
    transparent 0deg, rgba(255, 255, 255, .5) 26deg, transparent 58deg,
    transparent 180deg, rgba(255, 255, 255, .32) 206deg, transparent 238deg);
  /* Rien sur l'étiquette (43 % du rayon) : le reflet ne couvre que les sillons. */
  -webkit-mask: radial-gradient(circle closest-side, transparent 0 45%, #000 48% 98%, transparent 100%);
  mask: radial-gradient(circle closest-side, transparent 0 45%, #000 48% 98%, transparent 100%);
}

/* Le centre du disque est le bouton Lecture / Pause. */
.sl-disc__play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--flower-ink);
  box-shadow: inset 0 0 0 1px rgba(var(--light-rgb), calc(.28 * var(--hl-a)));
  transition: transform .15s var(--ease), opacity .25s var(--ease);
}
.sl-disc__play svg { width: 24px; height: 24px; }
.sl-disc__play:active { transform: scale(.95); }
.sl-disc__play:focus-visible { outline: 2px solid var(--flower-ink); outline-offset: -6px; border-radius: 50%; }
.sl-disc__play:disabled { cursor: default; opacity: .55; }

.sl-arm {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.sl-arm__swing { transition: transform 1100ms var(--ease); }
.sl-arm__thread { fill: none; stroke: var(--thread); stroke-width: 1.5; stroke-linecap: round; }
.sl-arm__bead { fill: var(--thread); }
.sl-arm__shadow {
  transform: translate(1.4px, 2px);
  opacity: .9;
  transition: transform 1100ms var(--ease), opacity 1100ms var(--ease);
}
.sl-arm__ghost { fill: none; stroke: rgba(var(--ink-rgb),  .2); stroke-width: 1.6; stroke-linecap: round; }
.sl-arm__ghost-bead { fill: rgba(var(--ink-rgb),  .22); }
/* Relevé : le fil s'éloigne du disque, son ombre s'allonge et pâlit. */
.sl-arm.is-lifted .sl-arm__shadow { transform: translate(5px, 8px); opacity: .45; }
.sl-arm__pivot { fill: var(--milk); stroke: rgba(var(--shadow-rgb),  .42); stroke-width: .8; }
.sl-arm__pivot-shade { fill: rgba(var(--shadow-rgb),  .34); }
.sl-arm__axis { fill: none; stroke: var(--stem); stroke-width: .9; }

/* Flammes : celle de l'autre ne s'allume que s'il est là ; une voix fait grandir la sienne. */
.sl-flame {
  position: relative;
  display: inline-grid;
  place-items: end center;
}
.sl-flame__glow {
  position: absolute;
  left: 50%;
  top: 22%;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--flower-light) 52%, transparent), transparent);
  opacity: 0;
  transform: scale(var(--sl-voice, 1));
  transition: opacity 500ms var(--ease);
  pointer-events: none;
}
.sl-flame.is-speaking .sl-flame__glow { opacity: .9; }
/* Propriété `scale` (et non `transform`) : elle s'ajoute à la mise en scène de la bougie (allumage en 460 ms)
   sans la remplacer. --sl-voice est lissé image par image : aucune transition ici. */
.sl-flame .pc-candle__flame { scale: var(--sl-voice, 1); }

/* ─── Le fil de l'avancée ─── */
.sl-progress {
  position: relative;
  height: 44px;
  margin: 12px 8px 0;
  cursor: pointer;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
.sl-progress__line,
.sl-progress__done {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1.5px;
  margin-top: -.75px;
  border-radius: 1px;
}
.sl-progress__line { background: var(--relief); }
.sl-progress__done {
  background: var(--thread);
  transform-origin: 0 50%;
  transform: scaleX(0);
}
.sl-progress__knot {
  position: absolute;
  left: 0;
  top: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  background: var(--milk);
  box-shadow: var(--emboss-sm);
  transition: transform .2s var(--ease);
}
.sl-progress__knot::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: var(--thread);
}
.sl-progress.is-dragging .sl-progress__knot { transform: scale(1.25); }
.sl-progress[aria-disabled="true"] { cursor: default; }
.sl-progress[aria-disabled="true"] .sl-progress__knot { opacity: 0; }
.sl-progress:focus-visible { outline: 2px solid var(--ink-soft); outline-offset: 2px; border-radius: 10px; }

.sl-times {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sl-time {
  min-width: 44px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--sl-soft);
}
.sl-time--end { text-align: right; }
.sl-skips { display: flex; gap: 16px; }
.sl-skip svg { width: 26px; height: 26px; }
.sl-skip:disabled { opacity: .45; cursor: default; }
.sl-skip__num {
  font-family: var(--font-ui);
  font-size: 7.5px;
  font-weight: 600;
  fill: currentColor;
}

.sl-status {
  margin: 20px 0 0;
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
}

/* ─── Les voix ─── */
.sl-voice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--porcelain);
  box-shadow: var(--deboss);
  text-align: center;
}
.sl-voice__line {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15.5px;
  line-height: 1.45;
  color: var(--ink);
}
.sl-voice__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 10px;
}
.sl-voice__actions .btn { min-height: 44px; padding: 0 18px; }
.sl-voice__actions .btn--quiet { padding: 0 10px; }
.sl-voice__tip {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  line-height: 1.45;
  color: var(--sl-soft);
}
.sl-mic__slash { opacity: 0; transition: opacity .25s var(--ease); }
.sl-voice__mute.is-muted .sl-mic__slash { opacity: 1; }
.sl-duck {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  color: var(--sl-soft);
  opacity: 0;
  transition: opacity 600ms var(--ease);
}
.sl-duck.is-on { opacity: 1; }
.sl-voice:not(.is-live) .sl-duck { display: none; }

/* ─── Le volume ─── */
.sl-volume {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin: 16px 6px 0;
  color: var(--stem);
}
.sl-volume svg { flex: none; width: 20px; height: 20px; }
.sl-volume__range {
  flex: 1;
  min-width: 0;
  height: 44px;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.sl-volume__range::-webkit-slider-runnable-track { height: 1.5px; border-radius: 1px; background: var(--relief); }
.sl-volume__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -9.25px;
  border: 0;
  border-radius: 50%;
  background: var(--milk);
  box-shadow: var(--emboss-sm);
}
.sl-volume__range::-moz-range-track { height: 1.5px; border-radius: 1px; background: var(--relief); }
.sl-volume__range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: var(--milk);
  box-shadow: var(--emboss-sm);
}
.sl-volume__range:focus-visible { outline: 2px solid var(--ink-soft); outline-offset: 2px; border-radius: 8px; }
.sl-hint {
  margin: 16px 0 0;
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  line-height: 1.45;
  color: var(--sl-soft);
}

/* ─── Changer de morceau ─── */
.sl-change {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 14px;
}
.sl-change__toggle { min-height: 44px; }
.sl-change__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 6px;
}
.sl-change__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.sl-change__actions .btn { min-height: 44px; }
.sl-change__err {
  margin: 0;
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14.5px;
  color: var(--ink);
}
.sl-change__err::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 1.5px;
  margin-right: 8px;
  vertical-align: middle;
  background: var(--thread);
}

.sl-leave {
  align-self: center;
  min-height: 44px;
  margin-top: 20px;
  color: var(--ink);
}

/* ─── Entrée en scène : les éléments se posent l'un après l'autre ─── */
.sl-view.is-shown .sl-rise { animation: sl-rise var(--slow) var(--ease) both; }
.sl-view.is-shown .sl-stage { animation-delay: 60ms; }
.sl-view.is-shown .sl-progress { animation-delay: 120ms; }
.sl-view.is-shown .sl-times { animation-delay: 150ms; }
.sl-view.is-shown .sl-status { animation-delay: 190ms; }
.sl-view.is-shown .sl-voice { animation-delay: 230ms; }
@keyframes sl-rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes sl-fade { from { opacity: 0; } }

/* ═════════════════════════ Le cadre du lecteur (sous lui) ═════════════════════════
   .sl-frame : coque fixe que salon-view.js pose sur la fenêtre (géométrie, rognure sous l'en-tête) ;
   .sl-frame__card : le papier, son fondu, et dans la fenêtre d'écoute la barre. Le lecteur (z 71) est posé
   au-dessus, sur la zone --sl-hx/--sl-hy/--sl-hw/--sl-hh : la déchirure court autour, dans la marge. */
.sl-frame {
  position: fixed;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  z-index: 70;
  pointer-events: none;
}
.sl-frame__card {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity 140ms ease, visibility 0s linear 140ms;
}
.sl-frame.is-shown .sl-frame__card {
  opacity: 1;
  visibility: visible;
  transition: opacity 280ms var(--ease), visibility 0s;
}

/* Le creux de la déchirure : sombre comme les bandes que YouTube pose autour de la vidéo. */
.sl-frame__depth {
  position: absolute;
  left: calc(var(--sl-hx, 0px) - 9px);
  top: calc(var(--sl-hy, 0px) - 9px);
  width: calc(var(--sl-hw, 0px) + 18px);
  height: calc(var(--sl-hh, 0px) + 18px);
  background: #140D10;
  box-shadow: inset 2px 3px 8px rgba(0, 0, 0, .6);
}
/* La pochette attend sous le lecteur (le temps qu'il se charge, ou s'il ne peut pas se charger). */
.sl-frame__cover {
  position: absolute;
  left: var(--sl-hx, 0px);
  top: var(--sl-hy, 0px);
  width: var(--sl-hw, 0px);
  height: var(--sl-hh, 0px);
  object-fit: cover;
}
.sl-frame__cover:not([src]),
.sl-frame__cover.is-missing,
.sl-frame.is-closed .sl-frame__depth,
.sl-frame.is-closed .sl-frame__cover { visibility: hidden; }

.sl-frame__paper {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  /* Lumière en haut à gauche : le bord du papier jette son ombre dans le creux de la déchirure. */
  filter: drop-shadow(2px 3px 3px rgba(var(--ink-rgb),  .38)) drop-shadow(0 0 1px rgba(var(--ink-rgb),  .2));
}
.sl-paper__milk { stop-color: var(--milk); }
.sl-paper__rim { fill: none; stroke: rgba(var(--hollow-rgb),  .6); stroke-width: .8; vector-effect: non-scaling-stroke; }
.sl-paper__fibre { fill: none; stroke: rgba(255, 255, 255, .96); stroke-width: 2.2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.sl-paper__seam { fill: none; stroke: rgba(var(--shadow-rgb),  .34); stroke-width: 1; stroke-dasharray: 1.5 4; vector-effect: non-scaling-stroke; }

/* Sans morceau, le papier n'est pas encore déchiré (et le lecteur, vide, est caché). */
.sl-frame__closed {
  position: absolute;
  left: var(--sl-hx, 0px);
  top: var(--sl-hy, 0px);
  width: var(--sl-hw, 0px);
  height: var(--sl-hh, 0px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 12px 22px;
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  line-height: 1.4;
  color: var(--sl-soft);
  opacity: 0;
  transition: opacity var(--mid) var(--ease);
}
.sl-frame.is-closed .sl-frame__closed { opacity: 1; }

/* ═════════════════════════ La fenêtre d'écoute (vue repliée) ═════════════════════════
   Une carte de papier : la vidéo dans un carré de 200 × 200 px (le minimum de YouTube), et SOUS elle une barre fine.
   Elle se déplace au doigt et se cale dans un coin ; salon-view.js la place (visualViewport : clavier compris). */
.sl-frame.is-dock .sl-frame__card {
  border-radius: 18px;
  box-shadow: var(--emboss-sm);
  pointer-events: auto;
  touch-action: none;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}
.sl-frame.is-grabbed .sl-frame__card,
.sl-fold.is-grabbed .sl-fold__card {
  cursor: grabbing;
  box-shadow: -4px -4px 10px rgba(255, 255, 255, .9), 10px 16px 28px rgba(var(--shadow-rgb),  .42);
}
.sl-frame__card:focus-visible,
.sl-fold__card:focus-visible { outline: 2px solid var(--ink-soft); outline-offset: 3px; }

/* Sous la vidéo : 9 + 200 + 2 px (FRAME.pip.margin, PIP_VIDEO, PIP_GAP dans salon-view.js). */
.sl-pip {
  position: absolute;
  left: 0;
  top: 211px;
  width: 218px;
}
.sl-frame:not(.is-dock) .sl-pip { visibility: hidden; }
.sl-pip__note {
  margin: 0;
  padding: 7px 12px 0;
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13.5px;
  line-height: 1.35;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.sl-pip__note:empty { padding: 0; }
.sl-pip__note.is-wait::before {
  content: "";
  display: block;
  width: 1.5px;
  height: 10px;
  margin: -5px auto 4px;
  border-radius: 1px;
  background: var(--thread);
}
.sl-pip__bar {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 50px;
  padding: 0 5px 2px 12px;
}
/* La flamme de l'autre, et de quoi saisir la fenêtre. */
.sl-pip__grip {
  flex: 1;
  align-self: stretch;
  display: flex;
  align-items: center;
  min-width: 0;
}
.sl-pip__btn {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--stem);
  cursor: pointer;
  transition: box-shadow .2s var(--ease), transform .15s var(--ease);
}
.sl-pip__btn svg { width: 20px; height: 20px; }
.sl-pip__btn:active { box-shadow: var(--deboss); }
.sl-pip__btn:focus-visible { outline-offset: 0; border-radius: 50%; }
.sl-pip__btn:disabled { opacity: .45; cursor: default; box-shadow: none; }
.sl-pip__play {
  background: var(--porcelain);
  box-shadow: var(--deboss);
}
.sl-pip__play svg { width: 18px; height: 18px; }
.sl-pip__play:active { transform: scale(.95); }

/* ─── Repliée : la pastille (« Le Salon · en pause pour toi » + Reprendre) ─── */
.sl-fold {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 70;
  width: max-content;
  pointer-events: none;
}
.sl-fold__card {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 60px;
  padding: 0 8px 0 12px;
  border-radius: 30px;
  background: var(--milk);
  box-shadow: var(--emboss-sm);
  white-space: nowrap;
  touch-action: none;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 140ms ease, visibility 0s linear 140ms;
}
.sl-fold.is-shown .sl-fold__card {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 280ms var(--ease), visibility 0s;
}
.sl-fold__flame {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
}
.sl-fold__open {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 44px;
  padding: 0 6px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.sl-fold__name {
  font-family: var(--font-hand);
  font-weight: 500;
  font-size: 23px;
  line-height: 1;
}
.sl-fold__state {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13px;
  line-height: 1.3;
  color: var(--sl-soft);
}
.sl-fold__resume {
  min-height: 44px;
  padding: 0 16px;
  font-size: 14px;
}

/* Les zones sûres (encoche, barre d'accueil), lues en pixels par salon-view.js. */
.sl-probe {
  position: fixed;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
  visibility: hidden;
  pointer-events: none;
}

/* ─── Les messages s'écartent du lecteur ───
   Vue pleine : la fenêtre est en haut, ils passent en bas ; si elle descend jusque-là (téléphone en paysage,
   clavier), salon-view.js les remonte en haut (--sl-toasts-top, --sl-toasts-bottom: auto). Fenêtre d'écoute dans
   un coin du haut (ou remontée jusque-là par le clavier) : ils sortent juste dessous (--sl-toasts-top) ;
   sinon ils restent à leur place (14 px sous la zone sûre, comme dans porcelaine.css). */
html[data-salon="open"] #toasts {
  top: var(--sl-toasts-top, auto);
  bottom: var(--sl-toasts-bottom, calc(18px + var(--safe-bottom)));
}
html[data-salon="dock"] #toasts,
html[data-salon-coin^="haut"] #toasts { top: var(--sl-toasts-top, calc(14px + var(--safe-top))); }

/* ─── Les feuilles (porcelaine.css, z 60) passent sous le lecteur, qui ne les couvre jamais ───
   Vue pleine : une feuille s'arrête sous ce qu'on voit du lecteur (--sl-sheet-max, posé par salon-view.js le temps
   des feuilles, qui fait défiler la vue s'il le faut) et défile en elle-même : ses boutons ne sont jamais dessous.
   Fenêtre d'écoute : d'un coin du bas, elle monte au coin du haut, ou se replie (salon-view.js) ; la pastille
   repliée, si une feuille l'atteint, passe sous elle le temps de la feuille (59 < 60). */
html[data-salon="open"] .sheet { max-height: min(92vh, var(--sl-sheet-max, 92vh)); }
.sl-fold.is-under { z-index: 59; }

/* ═════════════════════════ L'invitation, dans le carnet ═════════════════════════ */
.sl-invite {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--milk);
  box-shadow: var(--emboss-sm);
  color: var(--ink);
  animation: sl-rise var(--slow) var(--ease);
}
.sl-invite__body { flex: 1 1 170px; min-width: 0; }
.sl-invite__text {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.sl-invite__name,
.sl-invite__song {
  font-family: var(--font-hand);
  font-style: normal;
  font-weight: 500;
  line-height: 1;
}
.sl-invite__name { font-size: 1.32em; padding-right: .12em; }
.sl-invite__song { font-size: 1.24em; }
.sl-invite__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 12px;
}
.sl-invite__actions .btn { min-height: 44px; }
.sl-invite__actions .btn:not(.btn--quiet) { padding: 0 20px; }

.sl-tear {
  position: relative;
  flex: none;
  width: 112px;
  height: 63px;
  border-radius: 12px;
  background: var(--milk);
  box-shadow: var(--emboss-sm);
  overflow: hidden;
}
.sl-tear__cover {
  position: absolute;
  left: 3px;
  top: 3px;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  object-fit: cover;
}
.sl-tear__paper {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(1.5px 2px 2px rgba(var(--ink-rgb),  .36));
}

/* ═════════════════════════ Le bouton d'en-tête ═════════════════════════ */
.sl-btn {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--stem);
}
.sl-btn svg { width: 24px; height: 24px; overflow: visible; }
.sl-btn:active { box-shadow: var(--deboss); }
.sl-btn__label { transition: fill var(--mid) var(--ease), stroke var(--mid) var(--ease); }
.sl-btn.is-active .sl-btn__label { fill: var(--flower); stroke: var(--flower); }
.sl-btn.is-active svg { animation: sl-turn 8s linear infinite; }
@keyframes sl-turn { to { transform: rotate(360deg); } }

/* ═════════════════════════ Petits écrans ═════════════════════════ */
@media (max-width: 380px) {
  .sl-title { font-size: 31px; }
  .sl-flame-col__name { font-size: 19px; }
  .sl-voice { padding: 14px 12px; }
}

/* ═════════════════════════ Mouvement réduit ═════════════════════════
   porcelaine.css ramène toutes les durées à 0,01 ms : les fondus voulus ici les reprennent
   (sélecteurs plus précis et !important). Le disque ne tourne plus, la fenêtre ne glisse plus : elle se pose. */
@media (prefers-reduced-motion: reduce) {
  .sl-view,
  .sl-frame .sl-frame__card,
  .sl-fold .sl-fold__card { transition: opacity 320ms ease, visibility 0s linear 320ms !important; }
  .sl-view.is-shown,
  .sl-frame.is-shown .sl-frame__card,
  .sl-fold.is-shown .sl-fold__card { transition: opacity 320ms ease, visibility 0s !important; }
  .sl-frame .sl-frame__closed,
  .sl-voice .sl-duck,
  .sl-flame .sl-flame__glow { transition: opacity 400ms ease !important; }
  .sl-flame__glow { transform: none; }
  .sl-wait::before { animation: none; }
  .sl-view.is-shown .sl-rise,
  .sl-invite { animation: sl-fade 500ms ease both !important; }
  .sl-btn.is-active svg { animation: none; }
}
