/* Anthelixa · les conversations animées (18/10/2026, après l'étude des concurrents ; Yann : « plus UX », « les
   conversations sur un dossier, un document, un mail, entre humains et agents », « stylé et animé »).
   Le fil d'un dossier, comme dans la plateforme : un mail qui arrive, des personnes qui s'écrivent, un worker mentionné
   qui répond, une ligne au journal. Deux fils : « Chantier Manoir » sur l'accueil (VRAI aujourd'hui) et « Sorel
   Emballages » sur la page du Contrôle avant paiement, dit « maquette du worker que nous construisons avec vous ».
   - Le texte est dans le HTML, dans son état final : sans JavaScript, ou en prefers-reduced-motion, tout se lit d'un coup.
   - assets/js/scene.js fait entrer les messages l'un après l'autre (.est-visible), avec un « … » d'écriture avant ceux
     d'un worker, quand le fil entre à l'écran ; commande Pause, Reprendre, Rejouer (WCAG 2.2.2).
   - Charte : nuit sur papier ; l'iris pour les @mentions et la commande seulement ; ni orange ni couleur de poste.
     Une personne est un rond (ses initiales), un worker un carré avec son pictogramme : jamais de visage. */
.fil[data-scene] { max-width: 720px; margin: 40px 0 0; }
[data-scene] .fil__cadre { overflow: hidden; border: 1px solid var(--gris-1); border-radius: 12px; background: var(--papier); color: var(--nuit); box-shadow: 0 1px 2px rgba(16, 16, 20, .04), 0 12px 32px -12px rgba(16, 16, 20, .14); }
[data-scene] .fil__tete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px 18px; border-bottom: 1px solid var(--gris-1); background: var(--papier-chaud); }
[data-scene] .fil__dossier { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 500; font-size: 16px; line-height: 1.3; }
[data-scene] .fil__dossier .picto { flex: none; width: 18px; height: 18px; }
[data-scene] .fil__dossier small { display: block; font-size: 13px; font-weight: 400; }
[data-scene] .fil__presents { display: flex; align-items: center; margin: 0; padding: 0; list-style: none; }
[data-scene] .fil__presents li + li { margin-left: -3px; }
[data-scene] .fil__presents .fil__avatar { width: 30px; height: 30px; font-size: 10.5px; letter-spacing: 0; box-shadow: 0 0 0 2px var(--papier-chaud); }
[data-scene] .fil__mention-maquette { margin: 0; padding: 3px 10px; border: 1px solid var(--nuit); border-radius: 999px; background: var(--papier); font-size: 13px; font-weight: 500; line-height: 1.4; }

[data-scene] .fil__messages { display: grid; gap: 16px; margin: 0; padding: 20px 18px 8px; list-style: none; }
@media (min-width: 640px) { [data-scene] .fil__messages { padding: 24px 24px 8px; } }
[data-scene] .msg { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 0 12px; align-items: start; }
[data-scene] .fil__avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1.5px solid var(--nuit); border-radius: 50%; background: var(--papier); font-size: 13px; font-weight: 600; letter-spacing: .02em; }
[data-scene] .fil__avatar--worker { border-radius: 9px; border-color: var(--nuit); background: var(--nuit); color: var(--papier); }
[data-scene] .fil__avatar--worker .picto { width: 18px; height: 18px; }
[data-scene] .msg__tete { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin: 0; font-size: 14px; line-height: 1.4; }
[data-scene] .msg__nom { font-weight: 600; }
[data-scene] .msg__role { padding: 0 6px; border: 1px solid var(--nuit); border-radius: 4px; font-size: 11.5px; font-weight: 500; }
[data-scene] .msg__heure { font-family: var(--mono); font-size: 12.5px; }
[data-scene] .msg__corps { margin: 4px 0 0; font-size: 16px; line-height: 1.55; }
[data-scene] .msg--worker .msg__corps { padding: 10px 14px; border-radius: 4px 12px 12px 12px; background: var(--papier-chaud); }
[data-scene] .msg__mention { color: var(--iris); font-weight: 500; }
[data-scene] .msg__mono { font-family: var(--mono); font-size: .9em; overflow-wrap: anywhere; }
[data-scene] .msg__piece { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; margin-top: 8px; padding: 8px 12px; border: 1px solid var(--gris-1); border-radius: 8px; background: var(--papier); font-size: 14px; }
[data-scene] .msg__piece .picto { flex: none; width: 18px; height: 18px; }
[data-scene] .msg__piece b { font-weight: 500; overflow-wrap: anywhere; }

/* Un mail qui arrive dans le dossier : une carte, pas une bulle. */
[data-scene] .msg--mail .msg__carte { margin-top: 4px; padding: 12px 14px; border: 1px solid var(--gris-1); border-left: 3px solid var(--nuit); border-radius: 8px; background: var(--papier); }
[data-scene] .msg__objet { margin: 0; font-weight: 500; font-size: 15.5px; }
[data-scene] .msg__extrait { margin: 4px 0 0; font-size: 15px; line-height: 1.5; }

/* La carte d'un contrôle : trois vérifications et l'état. */
[data-scene] .msg__controle { margin-top: 10px; padding: 12px 14px; border: 1px solid var(--gris-1); border-radius: 8px; background: var(--papier); }
[data-scene] .msg__controle-tete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin: 0; font-weight: 500; font-size: 15px; }
[data-scene] .msg__statut { padding: 1px 8px; border: 1.5px solid var(--nuit); border-radius: 6px; font-size: 13px; font-weight: 600; }
[data-scene] .msg__verifs { display: grid; gap: 4px; margin: 10px 0 0; padding: 0; list-style: none; font-size: 15px; }
[data-scene] .msg__verif { display: flex; align-items: center; gap: 8px; }
[data-scene] .msg__verif .picto { flex: none; width: 16px; height: 16px; }
[data-scene] .msg__signe { display: inline-grid; flex: none; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--nuit); color: var(--papier); font-size: 11px; font-weight: 700; line-height: 1; }
[data-scene] .msg__signe::before { content: "!"; }
[data-scene] .msg__verif--alerte { font-weight: 500; }

/* Le journal : une ligne discrète, en travers du fil. */
[data-scene] .msg--journal { grid-template-columns: 1fr; }
[data-scene] .msg--journal p { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 13.5px; }
[data-scene] .msg--journal p::before, [data-scene] .msg--journal p::after { content: ""; flex: 1; height: 1px; background: var(--gris-1); }
[data-scene] .msg--journal .picto { flex: none; width: 15px; height: 15px; }

/* Le « … » d'un worker qui écrit (le temps de lire le dossier) : seulement pendant l'animation. */
[data-scene] .msg--ecrit { display: none; }
.fil[data-scene].est-anime .msg--ecrit.est-visible { display: grid; }
[data-scene] .msg__points { display: inline-flex; gap: 4px; margin-top: 6px; padding: 12px 14px; border-radius: 4px 12px 12px 12px; background: var(--papier-chaud); }
[data-scene] .msg__points span { width: 6px; height: 6px; border-radius: 50%; background: var(--nuit); animation: fil-point 1s ease-in-out infinite; }
[data-scene] .msg__points span:nth-child(2) { animation-delay: .15s; }
[data-scene] .msg__points span:nth-child(3) { animation-delay: .3s; }
@keyframes fil-point { 0%, 60%, 100% { opacity: .25; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }

[data-scene] .fil__pied { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 18px 14px; }
@media (min-width: 640px) { [data-scene] .fil__pied { padding: 10px 24px 16px; } }
[data-scene] .fil__saisie { flex: 1 1 220px; margin: 0; padding: 9px 14px; border: 1px solid var(--gris-1); border-radius: 999px; font-size: 14px; }
[data-scene] .fil__commande { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 14px; border: 1px solid var(--iris); border-radius: 999px; background: transparent; color: var(--iris); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
[data-scene] .fil__commande:hover { background: var(--iris); color: var(--papier); }
[data-scene] .fil__commande:focus-visible { outline: 2px solid var(--iris); outline-offset: 2px; }
[data-scene] .fil__commande .picto { width: 16px; height: 16px; }
[data-scene] .fil__legende { margin-top: 10px; font-size: 14px; }

/* Le mouvement, seulement quand scene.js l'a demandé. */
.fil[data-scene].est-anime .fil__messages > .msg:not(.msg--ecrit) { display: none; }
.fil[data-scene].est-anime .fil__messages > .msg.est-visible:not(.msg--ecrit) { display: grid; animation: fil-entree .45s var(--ease) both; }
.fil[data-scene].est-anime .fil__messages > .msg--journal.est-visible { display: grid; }
@keyframes fil-entree { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.fil[data-scene].est-anime .fil__messages { min-height: var(--fil-hauteur, auto); align-content: start; }
@media (prefers-reduced-motion: reduce) { [data-scene] .msg__points span { animation: none; } }
@media print { [data-scene] .fil__pied { display: none; } }
