/* =====================================================================
   Section « Nos logiciels en action » de la vitrine.
   Un onglet par logiciel ; la scène (HTML et CSS) montre une journée type
   et enchaîne seule sur le logiciel suivant. scenes.js remplit les textes
   (catalogue SCENES), gère les onglets, la pause et l'enchaînement.
   Prototype d'origine : design/animations/saniya-scene.html.
   ===================================================================== */
.scene-slot { --c: var(--jateo); padding-bottom: 56px; }
.scene-slot .s-head { text-align: center; margin-inline: auto; max-width: 720px; }
.scene-slot .s-head p { margin-inline: auto; }

/* Onglets des logiciels */
.sc-tabs { display: flex; gap: 6px; margin: 24px auto 36px; padding: 4px; overflow-x: auto; scrollbar-width: none; justify-content: center; flex-wrap: wrap; }
.sc-tabs::-webkit-scrollbar { display: none; }
.sc-tab {
  flex: none; min-height: 44px; padding: 0 13px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper);
  color: var(--ink-2); font: 600 13.5px/1 var(--font-body); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
}
.sc-tab i { width: 8px; height: 8px; border-radius: 50%; background: var(--tc, var(--muted)); }
.sc-tab:hover { border-color: var(--ink-2); color: var(--ink); }
.sc-tab[aria-selected="true"] { background: var(--tc); border-color: var(--tc); color: #fff; }
.sc-tab[aria-selected="true"] i { background: #fff; }
.sc-tab:focus-visible { outline: 3px solid var(--spark-2); outline-offset: 2px; }
@media (max-width: 760px) { .sc-tabs { flex-wrap: nowrap; justify-content: flex-start; margin: 20px calc(-1 * var(--gutter-l)) 28px; padding-inline: var(--gutter-l); } }

/* Texte du logiciel affiché */
.scene-row { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: center; }
.sc-text .who { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c); }
.sc-text h3 { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.12; margin: 10px 0 14px; }
.sc-text h3 em { font-style: normal; color: var(--c); }
.sc-text > p { color: var(--ink-2); font-size: 17px; }
.sc-text ul { margin: 16px 0 22px; padding: 0; list-style: none; display: grid; gap: 8px; }
.sc-text li { display: flex; gap: 10px; color: var(--ink-2); }
.sc-text li::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 9px; border-radius: 50%; background: var(--c); }
.sc-text .go { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-product { background: var(--c); color: #fff; }
.btn-product:hover { filter: brightness(1.08); }
.sc-text.swap { animation: sc-fade .45s ease-out; }
@keyframes sc-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 900px) { .scene-row { grid-template-columns: 1fr; gap: 28px; } }

/* =====================================================================
   Scène : une fiche traverse trois étapes (colonnes), deux personnes
   nommées agissent, puis le client reçoit son message. Boucle de 14 s.
   ===================================================================== */
.sc {
  --c-soft: color-mix(in srgb, var(--c) 13%, #fff); --c-ink: color-mix(in srgb, var(--c) 70%, #000);
  --mid: #B45309; --mid-soft: #FEF3C7;
  --wa-bubble: #DCF8C6; --wa-bg: #ECE5DD; --tick: #34B7F1;
  --s-ink: #0E1726; --s-ink-2: #33415A; --s-muted: #6B7686; --s-line: #E3E7EE; --s-paper: #FFFFFF; --s-wash: #F6F8FA;
  --dur: 14s;
  position: relative; font: 13px/1.45 system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; color: var(--s-ink);
  max-width: 620px; margin: 0 auto; user-select: none;
}
.sc *, .sc *::before, .sc *::after { box-sizing: border-box; }
.sc-win { position: relative; background: var(--s-paper); border: 1px solid var(--s-line); border-radius: 16px; box-shadow: 0 2px 4px rgba(14,23,38,.04), 0 24px 60px rgba(14,23,38,.14); overflow: hidden; }
.sc-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--s-line); background: var(--s-wash); }
.sc-dots { display: flex; gap: 6px; } .sc-dots i { width: 9px; height: 9px; border-radius: 50%; background: #D5DAE2; }
.sc-app { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; white-space: nowrap; }
.sc-app b { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; background: var(--c); color: #fff; font-size: 12px; }
.sc-kpi { margin-left: auto; display: flex; gap: 8px; min-width: 0; }
.sc-kpi > span { padding: 3px 9px; border-radius: 999px; background: var(--s-paper); border: 1px solid var(--s-line); color: var(--s-muted); font-size: 11.5px; white-space: nowrap; }
.sc-kpi strong { color: var(--s-ink); font-variant-numeric: tabular-nums; }
.sc-kpi .n { display: inline-grid; overflow: hidden; vertical-align: bottom; }
.sc-kpi .n em { grid-area: 1 / 1; font-style: normal; animation: sc-count-a var(--dur) infinite; }
.sc-kpi .n em + em { animation-name: sc-count-b; }

.sc-board { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px; min-height: 270px; }
.sc-col { background: var(--s-wash); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sc-col h4 { margin: 0 0 2px; font: 700 11.5px/1.3 system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--s-muted); display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-col h4::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--dot, #9AA4B2); }
.sc-col.mid h4 { --dot: var(--mid); } .sc-col.end h4 { --dot: var(--c); }
.sc-card { background: var(--s-paper); border: 1px solid var(--s-line); border-radius: 10px; padding: 8px 9px; box-shadow: 0 1px 2px rgba(14,23,38,.05); min-width: 0; }
.sc-card .t { display: flex; justify-content: space-between; gap: 6px; font-weight: 700; font-size: 12px; white-space: nowrap; }
.sc-card .t span { color: var(--s-muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.sc-card .w { color: var(--s-muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-card.ghost { opacity: .55; }
.sc-card.low { margin-top: 172px; }

/* La fiche vedette, au-dessus de la grille */
.sc-hero {
  position: absolute; top: 46px; left: 24px; width: calc((100% - 48px - 20px) / 3 - 2px);
  border-color: var(--c); box-shadow: 0 10px 24px color-mix(in srgb, var(--c) 22%, transparent);
  animation: sc-move var(--dur) infinite cubic-bezier(.6,.05,.3,1);
}
.sc-hero .sc-who { display: flex; align-items: center; gap: 6px; margin: 4px 0; font-size: 12px; white-space: nowrap; overflow: hidden; }
.sc-hero .sc-av { flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--c-soft); color: var(--c-ink); font-weight: 800; font-size: 10px; display: grid; place-items: center; }
.sc-hero .sc-items { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 6px; }
.sc-hero .sc-items i { font-style: normal; font-size: 10.5px; padding: 1px 6px; border-radius: 999px; background: var(--s-wash); color: var(--s-ink-2); white-space: nowrap; }
.sc-hero .sc-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px; }
.sc-hero .sc-amt { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sc-chip { display: inline-grid; font-size: 10.5px; font-weight: 700; }
.sc-chip span { grid-area: 1 / 1; padding: 2px 7px; border-radius: 999px; white-space: nowrap; opacity: 0; }
.sc-chip .s1 { background: #EEF1F5; color: var(--s-ink-2); animation: sc-s1 var(--dur) infinite; }
.sc-chip .s2 { background: var(--mid-soft); color: #78350F; animation: sc-s2 var(--dur) infinite; }
.sc-chip .s3 { background: var(--c-soft); color: var(--c-ink); animation: sc-s3 var(--dur) infinite; }
.sc-prog { height: 4px; border-radius: 4px; background: var(--s-wash); overflow: hidden; margin-top: 6px; }
.sc-prog b { display: block; height: 100%; width: 0; background: var(--mid); animation: sc-prog var(--dur) infinite; }

/* Curseurs nommés */
.sc-cur { position: absolute; z-index: 5; pointer-events: none; animation: var(--path) var(--dur) infinite ease-in-out; }
.sc-cur svg { display: block; filter: drop-shadow(0 2px 3px rgba(0,0,0,.2)); }
.sc-cur svg path { fill: var(--k); }
.sc-cur span { position: absolute; left: 14px; top: 16px; padding: 2px 8px; border-radius: 999px; color: #fff; font-size: 11px; font-weight: 700; white-space: nowrap; background: var(--k); }
.sc-cur.f { --k: #C2410C; --path: sc-cur-f; } .sc-cur.m { --k: #4338CA; --path: sc-cur-m; }
.sc-cur.m span { left: auto; right: 6px; }

/* Téléphone du client */
.sc-phone {
  position: absolute; right: -18px; bottom: -34px; width: 214px; z-index: 6;
  background: var(--wa-bg); border: 6px solid #111827; border-radius: 22px; overflow: hidden;
  box-shadow: 0 20px 40px rgba(14,23,38,.28); animation: sc-phone var(--dur) infinite cubic-bezier(.2,.8,.2,1);
}
.sc-phone header { display: flex; align-items: center; gap: 7px; padding: 7px 9px; background: #075E54; color: #fff; font-size: 11.5px; font-weight: 700; white-space: nowrap; overflow: hidden; }
.sc-phone header b { flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--c); display: grid; place-items: center; font-size: 10px; }
.sc-msg { margin: 9px 8px 10px; padding: 7px 9px 5px; background: var(--wa-bubble); border-radius: 9px 9px 9px 2px; font-size: 11.5px; line-height: 1.4; color: #111B21; }
.sc-msg small { display: flex; justify-content: flex-end; align-items: center; gap: 3px; color: #667781; font-size: 10px; margin-top: 2px; }
.sc-msg small svg path { stroke: #8696A0; animation: sc-tick var(--dur) infinite; }

.sc-note { margin: 44px 0 0; padding-left: 48px; min-height: 36px; display: flex; align-items: center; color: var(--s-muted); font-size: 12px; }
.sc-pause {
  position: absolute; left: 0; bottom: 0; z-index: 7; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--s-line); background: rgba(255,255,255,.92); color: var(--s-ink); cursor: pointer; display: grid; place-items: center;
}
.sc-pause:focus-visible { outline: 3px solid #F07A1A; outline-offset: 2px; }
.sc-pause .play { display: none; }
.sc.paused .sc-pause .play { display: block; } .sc.paused .sc-pause .stop { display: none; }
.sc.paused *, .sc.paused *::before, .sc.paused *::after { animation-play-state: paused !important; }

/* ---- Images clés (14 s) ----
   0-6 %    la fiche apparaît dans la première colonne (premier geste)
   26-36 %  la seconde personne la passe à l'étape du milieu, la barre se remplit
   58-66 %  elle arrive dans la dernière colonne, le compteur avance
   68-74 %  le message arrive chez le client, coches bleues à 82 %
   94-100 % retour à l'état initial, puis logiciel suivant */
@keyframes sc-move {
  0% { transform: translate(0, 10px); opacity: 0; }
  6%, 26% { transform: translate(0, 0); opacity: 1; }
  30% { transform: translate(calc(100% + 12px), -6px) rotate(-2deg); }
  36%, 58% { transform: translate(calc(100% + 12px), 0) rotate(0); }
  62% { transform: translate(calc(200% + 24px), -6px) rotate(-2deg); }
  66%, 92% { transform: translate(calc(200% + 24px), 0); opacity: 1; }
  97%, 100% { transform: translate(calc(200% + 24px), 0); opacity: 0; }
}
@keyframes sc-s1 { 0%, 31% { opacity: 1; } 32%, 100% { opacity: 0; } }
@keyframes sc-s2 { 0%, 31% { opacity: 0; } 32%, 62% { opacity: 1; } 63%, 100% { opacity: 0; } }
@keyframes sc-s3 { 0%, 62% { opacity: 0; } 63%, 100% { opacity: 1; } }
@keyframes sc-prog { 0%, 36% { width: 0; background: var(--mid); } 56%, 62% { width: 100%; background: var(--mid); } 64%, 100% { width: 100%; background: var(--c); } }
@keyframes sc-count-a { 0%, 64% { transform: translateY(0); opacity: 1; } 67%, 100% { transform: translateY(-100%); opacity: 0; } }
@keyframes sc-count-b { 0%, 64% { transform: translateY(100%); opacity: 0; } 67%, 100% { transform: translateY(0); opacity: 1; } }
@keyframes sc-phone { 0%, 67% { transform: translateY(30px) scale(.96); opacity: 0; } 72%, 93% { transform: translateY(0) scale(1); opacity: 1; } 98%, 100% { transform: translateY(16px); opacity: 0; } }
@keyframes sc-tick { 0%, 80% { stroke: #8696A0; } 83%, 100% { stroke: var(--tick); } }
@keyframes sc-cur-f {
  0% { left: 4%; top: 70%; } 5% { left: 22%; top: 40%; } 9% { left: 21%; top: 41%; }
  20% { left: 6%; top: 78%; } 100% { left: 6%; top: 78%; }
}
@keyframes sc-cur-m {
  0%, 20% { left: 88%; top: 82%; } 26% { left: 24%; top: 40%; }
  30% { left: 46%; top: 36%; } 36% { left: 55%; top: 40%; } 52% { left: 56%; top: 62%; }
  58% { left: 56%; top: 40%; } 62% { left: 82%; top: 36%; } 66% { left: 88%; top: 40%; } 100% { left: 88%; top: 82%; }
}

@media (max-width: 560px) {
  .sc { font-size: 12px; }
  .sc-board { gap: 6px; padding: 10px; min-height: 250px; }
  .sc-hero { top: 42px; left: 16px; width: calc((100% - 32px - 12px) / 3 - 2px); padding: 7px; }
  @keyframes sc-move {
    0% { transform: translate(0, 10px); opacity: 0; } 6%, 26% { transform: translate(0, 0); opacity: 1; }
    30%, 58% { transform: translate(calc(100% + 8px), 0); } 62%, 92% { transform: translate(calc(200% + 16px), 0); opacity: 1; }
    97%, 100% { transform: translate(calc(200% + 16px), 0); opacity: 0; }
  }
  .sc-hero .sc-items i:nth-child(n+3) { display: none; }
  .sc-card .t span, .sc-card.ghost .w { display: none; }
  .sc-col h4 { font-size: 10.5px; letter-spacing: .03em; }
  .sc-cur span { font-size: 10px; }
  .sc-kpi > span:first-child { display: none; }
  .sc-phone { width: 184px; right: -6px; bottom: -40px; }
}
/* Moins d'animations demandé : état final, sans mouvement ni enchaînement */
@media (prefers-reduced-motion: reduce) {
  .sc *, .sc *::before, .sc *::after, .sc-text.swap { animation: none !important; }
  .sc-hero { transform: translate(calc(200% + 24px), 0); }
  .sc-chip .s3, .sc-phone { opacity: 1; } .sc-prog b { width: 100%; background: var(--c); }
  .sc-cur, .sc-pause { display: none; }
  .sc-kpi .n em:first-child { visibility: hidden; }
}
