/* ==========================================================================
   Démonstrations scénarisées (SCENARIOS-DEMOS.md)
   D2 « une photo, tous vos réseaux » (plus de clients) · D3 « lu, rangé, préparé » (plus de temps).
   Règles : étiquette « Exemple fictif » visible en permanence, données inventées, aucune interface de marque,
   aucune zone de discussion, l'IA agit (étoile) et l'humain valide. Version fixe en mouvement réduit.
   ========================================================================== */

.demo { margin: 0; }

/* ---------- Scène ---------- */
.stage { position: relative; display: grid; background: var(--white); border: 1px solid var(--ink); box-shadow: var(--hard-shadow) var(--shadow-soft); }
.stage__bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px 16px; padding: 10px 12px; border-bottom: 1px solid var(--ink); }
.stage__bar .track { justify-content: center; }
.stage__body { position: relative; padding: clamp(14px, 2.4vw, 28px); }
.stage__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding: 12px 14px; border-top: 1px solid var(--ink); }
.stage__legend { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; }
.replay { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; font: 500 0.75rem/1 var(--f-mono); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-strong); transition: color 0.3s, box-shadow 0.3s; }
.replay svg { width: 12px; height: 12px; transition: transform 0.6s var(--ease-snap); }
.replay:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.replay:hover svg { transform: rotate(-180deg); }
@media (pointer: coarse) { .replay { height: 44px; padding: 0 14px; } }
@media (max-width: 760px) {
  .stage__bar { grid-template-columns: minmax(0, 1fr) auto; }
  .stage__bar .track { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
  .stage__body { padding: 12px; }
}

/* Une jauge qui compte des actions, jamais des gains */
.gauge { display: flex; align-items: baseline; gap: 14px; }
.gauge b { font: 700 clamp(2rem, 1.4rem + 1.6vw, 2.75rem)/0.9 var(--f-sans); font-stretch: 75%; font-variant-numeric: tabular-nums; color: var(--signal-ink); }
.gauge.is-friction b { color: var(--friction); }
.gauge .was { font: 500 0.75rem/1 var(--f-mono); color: var(--ink-3); }

/* ---------- Cartes communes ---------- */
.card { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--paper); border: 1px solid var(--ink); }
.card__bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; padding: 6px 10px; border-bottom: 1px solid var(--ink); background: var(--white); font: 500 0.6875rem/1.2 var(--f-mono); color: var(--ink-2); }
.card__bar em { font-style: normal; }
.card__read { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 10px 12px; border-top: 1px dashed var(--line-strong); background: var(--white); font: 500 0.75rem/1.3 var(--f-mono); color: var(--ink-2); }
.scan { position: absolute; left: 0; right: 0; top: 32px; height: 2px; background: var(--signal); box-shadow: 0 0 16px 3px color-mix(in srgb, var(--signal) 55%, transparent); opacity: 0; pointer-events: none; z-index: 2; }
.validate { position: relative; display: inline-flex; align-items: center; height: 40px; padding: 0 16px; background: var(--ink); color: var(--white); font: 600 0.875rem/1 var(--f-sans); }
.validate.is-wait { animation: ring 1.5s ease-out infinite; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--signal) 70%, transparent); } 80%, 100% { box-shadow: 0 0 0 10px transparent; } }
.sent { display: inline-flex; align-items: center; gap: 8px; font: 500 0.8125rem/1 var(--f-mono); color: var(--ok); }
.act { position: relative; display: flex; align-items: center; gap: 12px; margin-top: auto; min-height: 60px; padding: 10px 12px; border-top: 1px dashed var(--line-strong); background: var(--white); }
.act .hint { margin-left: auto; font: 500 0.6875rem/1.3 var(--f-mono); color: var(--ink-3); }
.act .sent { position: absolute; left: 12px; }

/* Un élément qui voyage d'une carte à l'autre : un mot, ou la photo */
.flyer { position: absolute; left: 0; top: 0; z-index: 6; pointer-events: none; white-space: nowrap; font-size: 0.9375rem; line-height: 1.65; background: var(--signal); color: var(--white); padding: 0 3px; box-shadow: 0 8px 20px color-mix(in srgb, var(--signal) 40%, transparent); }
.flyer--img { padding: 0; line-height: 0; overflow: hidden; box-shadow: 0 10px 26px rgba(13, 20, 23, 0.28); border: 1px solid var(--ink); background: var(--paper-2); }
.flyer--img svg { width: 100%; height: 100%; }

/* ---------- D2 : un mois sur les réseaux sociaux, tenu pour vous (séance photo → calendrier validé → compte) ---------- */
.d2 { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) minmax(0, 4fr); gap: clamp(12px, 1.6vw, 20px); align-items: stretch; }
.rolls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 6px; flex: 1; padding: 12px; }
.roll { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-2); }
.roll svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.flash { position: absolute; inset: 0; z-index: 2; background: #fff; opacity: 0; pointer-events: none; }
.cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); align-content: start; gap: 3px; flex: 1; padding: 10px 12px 6px; }
.cal__h { font: 500 0.5625rem/1.6 var(--f-mono); text-align: center; color: var(--ink-3); }
.cal__cell { position: relative; aspect-ratio: 1; min-width: 0; background: var(--white); border: 1px solid var(--line); transition: border-color 0.3s, box-shadow 0.3s; }
.cal__cell small { position: absolute; left: 3px; top: 2px; font: 500 0.5rem/1 var(--f-mono); color: var(--ink-3); }
.cal__cell.is-post { border-color: var(--line-strong); }
.cal__cell.is-ok { border-color: var(--ok); }
.cal__cell.is-live { box-shadow: inset 0 0 0 2px var(--signal); }
.cal__post { position: absolute; inset: 3px; display: block; overflow: hidden; opacity: 0; }
.cal__post svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cal__post--reel::after { content: ""; position: absolute; right: 2px; bottom: 2px; width: 0; height: 0; border-left: 6px solid #fff; border-block: 4px solid transparent; filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.6)); }
.cal__legend { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 0 12px 10px; font: 500 0.625rem/1 var(--f-mono); color: var(--ink-2); }
.cal__legend span { display: inline-flex; align-items: center; gap: 6px; }
.k { width: 9px; height: 9px; background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
.k--reel { position: relative; }
.k--reel::after { content: ""; position: absolute; left: 3px; top: 1.5px; border-left: 4px solid var(--ink-2); border-block: 3px solid transparent; }
.acct { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--white); }
.acct__av { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--signal); box-shadow: inset 0 0 0 3px var(--white); }
.acct b { display: block; font-size: 0.875rem; line-height: 1.2; }
.acct span { font: 500 0.6875rem/1.3 var(--f-mono); color: var(--ink-3); }
.feed__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-content: start; gap: 3px; flex: 1; padding: 10px 12px; background: var(--white); }
.feed__tile { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line); }
.feed__tile svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
.adcard { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 10px; margin: 0; padding: 10px 12px; border-top: 1px dashed var(--line-strong); background: var(--white); }
.adcard__i { display: grid; place-items: center; width: 40px; height: 40px; color: var(--signal-ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.adcard__i svg { width: 22px; height: 22px; }
.adcard b { display: block; font-weight: 650; line-height: 1.2; }
.adcard span { display: block; margin-top: 2px; font: 500 0.6875rem/1.4 var(--f-mono); color: var(--ink-3); }

/* ---------- D3 : un message lu, rangé en trois endroits, une réponse préparée, un geste ---------- */
.d3 { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 5fr); gap: clamp(12px, 1.6vw, 20px); align-items: stretch; }
.msg__txt { margin: 0; padding: 14px; font-size: 0.9375rem; line-height: 1.65; }
mark.x { padding: 1px 2px; margin: 0 -2px; background: transparent; color: inherit; transition: background-color 0.4s, box-shadow 0.4s; }
mark.x.is-read { background: color-mix(in srgb, var(--signal) 22%, transparent); box-shadow: inset 0 -2px 0 var(--signal); }
.dests { display: grid; align-content: stretch; gap: clamp(10px, 1.4vw, 14px); }
.dest { --auto: 0; display: flex; flex-direction: column; min-width: 0; background: var(--paper); border: 1px solid var(--ink); box-shadow: 5px 5px 0 color-mix(in srgb, var(--signal) calc(var(--auto) * 100%), transparent); }
.dest .card__bar { min-height: 28px; padding-block: 4px; }
.dest dl { display: grid; gap: 4px; margin: 0; padding: 8px 10px 10px; font-size: 0.8125rem; background: var(--white); }
.dest dl > div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 8px; align-items: baseline; }
.dest dt { font: 500 0.6875rem/1.4 var(--f-mono); color: var(--ink-3); }
.dest dd { min-height: 1.4em; margin: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; background: color-mix(in srgb, var(--signal) calc(var(--flash, 0) * 26%), transparent); }
.draft__txt { flex: 1; margin: 0; padding: 14px; min-height: 8.4em; font-size: 0.9375rem; line-height: 1.6; background: var(--white); }

@media (max-width: 960px) {
  .d2, .d3 { grid-template-columns: 1fr; }
  .draft__txt { min-height: 6.6em; }
}
@media (max-width: 760px) {
  /* Sur téléphone, une scène tient dans un écran : tout se resserre, la légende des rôles disparaît (elle est dite dans les cartes) */
  .stage__legend { display: none; }
  .stage__foot { padding: 10px 12px; }
  .gauge b { font-size: 1.75rem; }
  .d2, .d3 { gap: 10px; }
  .card__bar { min-height: 28px; padding-block: 4px; }
  .card__read { padding: 6px 10px; }
  .act { min-height: 52px; padding: 6px 12px; }
  .act .hint { display: none; }
  .rolls { grid-template-columns: repeat(6, minmax(0, 1fr)); padding: 8px; gap: 4px; }
  .cal__grid { padding: 8px 10px 8px; gap: 2px; }
  .cal__cell { aspect-ratio: 1.25; }
  .cal__legend { display: none; }
  .feed__grid { grid-template-columns: repeat(6, minmax(0, 1fr)); padding: 8px; gap: 2px; }
  .acct { padding: 6px 10px; }
  .adcard { padding: 8px 10px; }
  .msg__txt { padding: 10px 12px; font-size: 0.8125rem; line-height: 1.6; }
  .draft__txt { min-height: 5.6em; padding: 10px 12px; font-size: 0.8125rem; }
  .dests { gap: 8px; }
  .dest .card__bar { min-height: 24px; }
  .dest dl { gap: 2px; padding: 4px 10px 6px; font-size: 0.75rem; }
  .dest dl > div { grid-template-columns: 64px minmax(0, 1fr); }
}

/* Mouvement réduit : l'état final, lisible sans animation, et l'avant → après dans la jauge */
.rm .scan, .rm .ripple, .rm .flash { display: none; }
