/* hallmark — shape: app screen · theme: stageshow (by request) · posture: restrained · nav: none (fausse app dans une fenêtre) · footer: légende en verre · hero: la fenêtre elle-même
   critique : une seule fenêtre calme sur fond pastel, un seul accent bleu, le mouvement raconte ce que l'IA fait (curseur, surligneur, montant qui roule).
   renonciations : fenêtre macOS dessinée (pastilles, barre) = demande de Matthias (démo « style Apple ») ; scène fixe 1600 × 900 mise à l'échelle = démo pilotée, pas un site.
   Démo « nouvelles demandes » : scène dessinée en 1600 × 900, mise à l'échelle de l'écran. Jetons repris du kit stageshow. */
:root {
  --texte: #262628;
  --texte-2: #5c5c60;
  --texte-3: #6e6e73;
  --boite: #f6f5f4;
  --papier: #fdfdfc;
  --blanc: #ffffff;
  --fil: rgba(0, 0, 0, .12);
  --gris-clair: #f1f0ee;
  --bleu: #0a5fc2;
  --bleu-clair: #e6effa;
  --vert: #1b7148;
  --vert-clair: #e4f2ea;
  --ambre: #8f5600;
  --ambre-clair: #fbf0dc;
  --rouge: #b0362c;
  --rouge-clair: #f9e7e4;
  --surligneur: #ffe58a;
  --retrait: #3a3a3c;
  --police: "Inter", system-ui, -apple-system, sans-serif;
  --arrivee: cubic-bezier(.22, 1, .36, 1);
  --trajet: cubic-bezier(.45, 0, .1, 1);
  --ombre-fenetre: 0 0 0 1px rgba(0, 0, 0, .06), 0 30px 60px -12px rgba(50, 50, 93, .25), 0 18px 36px -18px rgba(0, 0, 0, .3);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: linear-gradient(160deg, #efe9df 0%, #e8e6e2 45%, #dfe7ec 100%);
  color: var(--texte); font-family: var(--police); font-weight: 460; letter-spacing: -.1px;
  -webkit-font-smoothing: antialiased; caret-color: var(--bleu);
}
::selection { background: #cfe0f6; color: var(--texte); }
* { scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, .18) transparent; }
button { font: inherit; color: inherit; letter-spacing: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2.5px solid var(--bleu); outline-offset: 2px; }

/* ---------- Scène ---------- */
.scene { position: fixed; inset: 0; overflow: hidden; }
.stage { width: 1600px; height: 900px; position: absolute; left: 50%; top: 50%; transform-origin: center; transform: translate(-50%, -50%); }
.vue {
  position: absolute; inset: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%), linear-gradient(to bottom, transparent 0, #000 30px);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%), linear-gradient(to bottom, transparent 0, #000 30px);
  mask-composite: intersect;
}
.cam { position: absolute; left: 0; top: 0; width: 1600px; height: 900px; transform-origin: 0 0; transition: transform 750ms var(--trajet); will-change: transform; }

/* ---------- Fenêtre ---------- */
.fenetre {
  position: absolute; left: 56px; top: 28px; width: 1488px; height: 700px;
  background: var(--papier); border-radius: 12px; overflow: hidden; box-shadow: var(--ombre-fenetre);
  display: flex; flex-direction: column;
}
.barre-titre {
  height: 56px; flex: none; display: grid; grid-template-columns: 316px 1fr auto; align-items: center;
  padding-right: 16px; background: var(--boite); box-shadow: inset 0 -.5px 0 var(--fil);
}
.feux { display: flex; gap: 8px; padding-left: 20px; }
.feux span { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .12); }
.feux span:nth-child(1) { background: #ff5f57; }
.feux span:nth-child(2) { background: #febc2e; }
.feux span:nth-child(3) { background: #28c840; }
.cabinet { display: flex; align-items: baseline; gap: 12px; padding-left: 28px; min-width: 0; }
.cabinet-nom { font-size: 17px; font-weight: 600; white-space: nowrap; }
.cabinet-sous { font-size: 15px; color: var(--texte-3); white-space: nowrap; }

/* Contrôle segmenté (modes et onglets) : le fond change en fondu, rien ne glisse */
.segments { display: flex; gap: 2px; padding: 3px; border-radius: 9px; background: rgba(0, 0, 0, .055); }
.segment {
  border: 0; background: transparent; border-radius: 7px; padding: 6px 14px; font-size: 14px; font-weight: 520;
  color: var(--texte-2); cursor: pointer; white-space: nowrap;
  transition: background-color 200ms var(--arrivee), color 200ms var(--arrivee), box-shadow 200ms var(--arrivee);
}
.segment:hover:not(:disabled):not([aria-selected="true"]) { color: var(--texte); }
.segment[aria-selected="true"] { background: var(--blanc); color: var(--texte); box-shadow: 0 1px 2px rgba(0, 0, 0, .1), inset 0 0 0 .5px var(--fil); }
.segment:disabled { cursor: default; color: rgba(60, 60, 67, .38); }
.segment[aria-selected="true"]:disabled { color: var(--texte); } /* l'onglet ouvert reste lisible (détail 7) */
.segment.presse { background: rgba(255, 255, 255, .6); }

.colonnes { flex: 1; min-height: 0; display: grid; grid-template-columns: 316px 1fr 572px; }
/* Fenêtre entière (28 px au-dessus, 28 px jusqu'à la légende) : rien ne passe sous le verre (relecteur, détail 5). */
.boite, .lecture, .dossier { min-height: 0; min-width: 0; display: flex; flex-direction: column; }

/* ---------- Boîte de réception ---------- */
.boite { background: var(--boite); box-shadow: inset -.5px 0 0 var(--fil); }
.boite-tete { padding: 18px 20px 10px; font-size: 15px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.compte { font-size: 13px; font-weight: 520; color: var(--texte-3); font-feature-settings: "tnum"; }
.mails { list-style: none; margin: 0; padding: 0 10px; }
.mail-ligne {
  width: 100%; text-align: left; border: 0; background: transparent; padding: 11px 12px 12px 22px; display: grid; gap: 3px;
  border-radius: 8px; cursor: pointer; position: relative; transition: background-color 120ms ease-out;
}
.mail-ligne:hover { background: rgba(0, 0, 0, .035); }
.mail-ligne.non-lu::before { content: ""; position: absolute; left: 8px; top: 18px; width: 7px; height: 7px; border-radius: 50%; background: var(--bleu); }
.mail-ligne[aria-current="true"] { background: rgba(10, 95, 194, .1); }
.mail-ligne.presse { background: rgba(10, 95, 194, .2); }
.mail-ligne .qui { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; }
.mail-ligne .qui b { font-weight: 560; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-ligne.non-lu .qui b { font-weight: 650; }
.mail-ligne .heure { color: var(--texte-3); font-size: 13px; flex: none; font-feature-settings: "tnum"; padding-top: 1px; }
.mail-ligne .objet { font-size: 14px; color: var(--texte-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-ligne .tags { display: flex; gap: 5px; margin-top: 5px; }
.barre { display: block; height: 10px; border-radius: 5px; background: rgba(0, 0, 0, .07); }
.barre.fine { height: 7px; background: rgba(0, 0, 0, .045); }
.l40 { width: 40%; } .l45 { width: 45%; } .l52 { width: 52%; } .l55 { width: 55%; } .l60 { width: 60%; } .l70 { width: 70%; } .l80 { width: 80%; } .l85 { width: 85%; }

/* Étiquettes : pastilles discrètes, couleur seulement pour un état */
.tag { display: inline-flex; align-items: center; font-size: 12.5px; font-weight: 560; padding: 1px 7px; border-radius: 6px; background: rgba(0, 0, 0, .06); color: var(--texte-2); }
.tag.vert { background: var(--vert-clair); color: var(--vert); }
.tag.ambre { background: var(--ambre-clair); color: var(--ambre); }
.tag.rouge { background: var(--rouge-clair); color: var(--rouge); }

/* ---------- Colonne du mail ---------- */
.lecture { background: var(--papier); box-shadow: inset -.5px 0 0 var(--fil); transition: opacity 300ms var(--arrivee), transform 300ms var(--arrivee); }
.lecture.cache { opacity: 0; transform: translateY(8px); transition: none; }
.mail { padding: 26px 36px 20px; overflow: auto; min-height: 0; flex: 1 1 auto; position: relative; }
.mail-entete { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 15px; color: #fff; flex: none; }
.av-0 { background: #3d6fa8; } .av-1 { background: #3f8770; } .av-2 { background: #a4683f; } .av-3 { background: #7562a6; } .av-4 { background: #3f8590; }
.mail-de { min-width: 0; }
.mail-de b { display: block; font-size: 16px; font-weight: 600; }
.mail-de span { font-size: 14px; color: var(--texte-3); }
.mail-date { margin-left: auto; font-size: 14px; color: var(--texte-3); align-self: flex-start; font-feature-settings: "tnum"; white-space: nowrap; }
.mail-objet { font-size: 23px; line-height: 1.3; margin: 0 0 14px; font-weight: 600; letter-spacing: -.3px; }
.mail-corps { font-size: 18.5px; line-height: 1.55; white-space: pre-wrap; margin: 0; max-width: 60ch; }

.pj { flex: none; display: flex; flex-direction: column; box-shadow: inset 0 .5px 0 var(--fil); background: var(--boite); }
.pj-tete { display: flex; align-items: center; gap: 12px; padding: 14px 36px; font-size: 15px; flex: none; }
.pj-icone { width: 28px; height: 34px; border-radius: 4px; background: var(--blanc); box-shadow: inset 0 0 0 .5px var(--fil); color: var(--rouge); font-size: 9.5px; font-weight: 650; display: grid; place-items: end center; padding-bottom: 4px; flex: none; }
.pj-tete b { font-weight: 560; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pj-tete span { color: var(--texte-3); font-size: 13.5px; margin-left: auto; flex: none; }
.pj-texte { display: none; font-family: inherit; font-size: 16.5px; line-height: 1.5; white-space: pre-wrap; margin: 0; padding: 4px 36px 22px; height: 300px; overflow: auto; }
.pj.ouverte .pj-texte { display: block; animation: fondu 400ms var(--arrivee) both; }
.vide { flex: 1; display: grid; place-items: center; text-align: center; color: var(--texte-2); font-size: 18px; line-height: 1.45; padding: 40px; }
.vide b { display: block; color: var(--texte); font-size: 23px; font-weight: 600; margin-bottom: 6px; letter-spacing: -.3px; }

/* Le surligneur : ce que l'IA a repéré */
mark { background: none; color: inherit; }
mark.surligne { background-image: linear-gradient(transparent 10%, var(--surligneur) 10%, var(--surligneur) 94%, transparent 94%); background-repeat: no-repeat; background-size: 0% 100%; transition: background-size 700ms var(--arrivee); border-radius: 2px; }
mark.surligne.on { background-size: 100% 100%; }
mark.retire .etiq { display: none; }
mark.retire.on .orig { display: none; }
mark.retire.on .etiq {
  display: inline-block; font-size: .72em; font-weight: 600; color: #fff; background: var(--retrait); border-radius: 5px;
  padding: 1px 7px; vertical-align: .12em; white-space: nowrap; animation: fondu 400ms var(--arrivee) both;
}
.lecture-scan { position: absolute; left: 0; right: 0; height: 90px; top: 0; background: linear-gradient(transparent, rgba(10, 95, 194, .06) 45%, rgba(10, 95, 194, .12) 50%, transparent); pointer-events: none; animation: scan 2.4s ease-in-out infinite; }
@keyframes scan { from { transform: translateY(-90px); } to { transform: translateY(520px); } }

/* ---------- Dossier ---------- */
.dossier { background: var(--papier); }
.dossier-tete { display: flex; justify-content: space-between; align-items: center; padding: 18px 28px 12px; }
.dossier-titre { font-weight: 600; font-size: 17px; }
.etat { font-size: 13.5px; font-weight: 560; color: var(--texte-2); background: rgba(0, 0, 0, .055); border-radius: 999px; padding: 3px 10px; font-feature-settings: "tnum"; transition: background-color 300ms, color 300ms; }
.etat.travaille { color: var(--bleu); background: var(--bleu-clair); }
.etat.pret { color: var(--vert); background: var(--vert-clair); }
.onglets { margin: 0 28px 4px; }
.onglets .segment { flex: 1; padding: 6px 8px; }
.volets { flex: 1; min-height: 0; position: relative; }
.volet { position: absolute; inset: 0; overflow: auto; padding: 12px 28px 24px; }
.volet.entre { animation: fondu 300ms var(--arrivee) both; }

.ligne { display: grid; grid-template-columns: 132px 1fr; gap: 16px; padding: 16px 0; box-shadow: inset 0 -.5px 0 var(--fil); align-items: start; transition: opacity 400ms var(--arrivee); }
.ligne:last-child { box-shadow: none; }
#v-analyse.focus-actif .ligne:not(.focus) { opacity: .72; }
/* Ce qui défile s'efface en bas au lieu d'être coupé net (relecteur, 03/12) */
.mail, .volet, .pj-texte { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 36px), transparent); }
/* Le mail et le volet s'effacent aussi en haut quand ils ont défilé (fenêtre entière, donc plus courte). */
.mail, .volet { -webkit-mask-image: linear-gradient(to bottom, transparent, #000 26px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to bottom, transparent, #000 26px, #000 calc(100% - 36px), transparent); }
.ligne-nom { font-size: 13.5px; font-weight: 560; color: var(--texte-3); padding-top: 4px; }
.ligne-valeur { font-size: 18px; line-height: 1.4; min-width: 0; }
.ligne-valeur .grand { font-size: 24px; font-weight: 600; display: block; margin-bottom: 2px; letter-spacing: -.4px; font-feature-settings: "tnum"; }
.ligne-valeur .petit { font-size: 15.5px; color: var(--texte-2); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; margin-top: 6px; line-height: 1.45; }
.ligne-valeur .petit.entier { -webkit-line-clamp: 7; }
.ligne-valeur .petit b { font-weight: 600; color: var(--texte); }
.ligne .attente { display: grid; gap: 9px; padding-top: 8px; }
.verdict { display: inline-flex; align-items: center; font-size: 18px; font-weight: 600; padding: 3px 11px; border-radius: 8px; background: rgba(0, 0, 0, .06); }
/* Trois couleurs d'état : vert atteint, rouge non atteint ou urgent, ambre à qualifier ; le reste en gris (détail 7). */
.verdict.passe { background: var(--vert-clair); color: var(--vert); }
.verdict.ne_passe_pas, .verdict.u-haute { background: var(--rouge-clair); color: var(--rouge); }
.verdict.a_qualifier { background: var(--ambre-clair); color: var(--ambre); }
.apparait { animation: fondu 520ms var(--arrivee) both; }
@keyframes fondu { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Montant qui roule : une bande 0-9 par chiffre, un emplacement fixe, le signe € à part */
.roule { display: inline-flex; font-feature-settings: "tnum"; }
.chiffre { display: inline-block; height: 1.2em; line-height: 1.2em; overflow: hidden; vertical-align: top; }
.bande { display: flex; flex-direction: column; transition: transform 700ms var(--arrivee); }
.bande span { height: 1.2em; }
.euro { margin-left: .22em; }

.groupe { margin-bottom: 20px; }
.groupe h3 { font-size: 13.5px; font-weight: 560; color: var(--texte-3); margin: 6px 0 8px; }
.groupe ul { margin: 0; padding-left: 20px; font-size: 16.5px; line-height: 1.45; }
.groupe li { margin-bottom: 6px; }
.groupe.attention ul { list-style: none; padding: 0; }
.groupe.attention li { box-shadow: inset 3px 0 0 var(--ambre); background: var(--ambre-clair); padding: 8px 12px; border-radius: 0 8px 8px 0; }
.dates { display: flex; flex-wrap: wrap; gap: 6px; }
.date { font-size: 14.5px; background: var(--gris-clair); box-shadow: inset 0 0 0 .5px var(--fil); border-radius: 6px; padding: 5px 9px; }
.date b { margin-right: 6px; font-weight: 600; font-feature-settings: "tnum"; }
.retiree { display: inline-block; font-size: .82em; font-weight: 600; color: #fff; background: var(--retrait); border-radius: 5px; padding: 0 6px; }

.brouillon { font-size: 14px; color: var(--texte-2); background: var(--gris-clair); border-radius: 8px; padding: 8px 12px; margin: 6px 0 14px; }
.entetes { font-size: 15px; margin-bottom: 12px; line-height: 1.6; box-shadow: inset 0 -.5px 0 var(--fil); padding-bottom: 10px; }
.entetes span { color: var(--texte-3); display: inline-block; width: 60px; }
.texte-doc { font-family: inherit; font-size: 16.5px; line-height: 1.55; white-space: pre-wrap; margin: 0; }
.lettre { font-size: 16px; line-height: 1.55; }
.lettre p { margin: 0 0 12px; white-space: pre-wrap; }
.aucune { color: var(--texte-2); font-size: 17px; line-height: 1.5; padding: 20px 2px; }
.aucune b { display: block; color: var(--texte); font-size: 20px; font-weight: 600; margin-bottom: 6px; }

/* ---------- Formulaire du mode essai ---------- */
.formulaire { padding: 22px 36px; overflow: auto; display: flex; flex-direction: column; gap: 13px; flex: 1; }
.avert { background: var(--ambre-clair); color: #5a3800; border-radius: 8px; padding: 10px 14px; font-size: 15px; line-height: 1.45; }
.avert b { font-weight: 650; }
.champ { display: grid; gap: 5px; }
.champ label { font-weight: 560; font-size: 13.5px; color: var(--texte-2); }
.champ input, .champ textarea { font: inherit; font-size: 16.5px; border: 0; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .2); border-radius: 8px; padding: 9px 12px; color: var(--texte); background: var(--blanc); }
.champ textarea { line-height: 1.45; resize: vertical; }
.champ input::placeholder, .champ textarea::placeholder { color: #8a8a8e; }
.champ input:focus, .champ textarea:focus { outline: 2.5px solid rgba(10, 95, 194, .35); outline-offset: 0; box-shadow: inset 0 0 0 1px var(--bleu); }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.erreur { color: var(--rouge); font-weight: 600; font-size: 15px; }

/* ---------- Boutons ---------- */
.btn { border: 0; border-radius: 10px; padding: 11px 22px; font-size: 17px; font-weight: 560; cursor: pointer; white-space: nowrap; transition: background-color 150ms, transform 120ms var(--arrivee); }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .4; cursor: default; }
.btn-plein { background: var(--bleu); color: #fff; }
.btn-plein:hover:not(:disabled) { background: #0853ab; }
.btn-second { background: rgba(0, 0, 0, .06); color: var(--texte); box-shadow: inset 0 0 0 .5px var(--fil); }
.btn-second:hover:not(:disabled) { background: rgba(0, 0, 0, .09); }
.formulaire .btn { font-size: 15.5px; padding: 9px 18px; }

/* ---------- Légende en verre ---------- */
.legende-verre {
  position: absolute; left: 120px; right: 120px; bottom: 24px; min-height: 120px; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 16px 22px 16px 32px;
  border-radius: 20px; background: rgba(255, 255, 255, .6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6); backdrop-filter: blur(24px) saturate(1.6);
  box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .1), 0 12px 32px -10px rgba(50, 50, 93, .22), 0 2px 6px rgba(0, 0, 0, .05);
}
.legende { min-width: 0; flex: 1; }
.legende-haut { display: flex; align-items: center; gap: 12px; margin-bottom: 2px; }
.pas { font-size: 14.5px; font-weight: 560; color: var(--texte-2); white-space: nowrap; font-feature-settings: "tnum"; }
.fictif { font-size: 14.5px; font-weight: 560; color: var(--texte-3); }
.fictif::before { content: "·"; margin-right: 12px; }
.legende-titre { font-size: 30px; font-weight: 600; letter-spacing: -.6px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legende-texte { font-size: 20px; color: var(--texte-2); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progres { list-style: none; display: flex; gap: 6px; margin: 8px 0 0; padding: 0; }
.progres li { font-size: 14px; font-weight: 560; padding: 3px 10px; border-radius: 999px; background: rgba(0, 0, 0, .05); color: var(--texte-3); transition: background-color 300ms, color 300ms; }
.progres li.fait { background: var(--vert-clair); color: var(--vert); }
.progres li.encours { background: var(--bleu-clair); color: var(--bleu); }
.commandes { display: flex; align-items: center; gap: 10px; flex: none; }
body.sans-nav #precedent, body.sans-nav #suivant { visibility: hidden; }

/* ---------- Curseur ---------- */
.curseur { position: absolute; left: 0; top: 0; z-index: 5; pointer-events: none; opacity: 0; transition: transform 700ms var(--trajet), opacity 300ms var(--arrivee); }
.curseur.visible { opacity: 1; }
.curseur-y { transition: transform 700ms var(--arrivee); }
.curseur-fleche { display: block; transform-origin: 4px 3px; transition: transform 120ms var(--arrivee); filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .3)); }
.curseur-fleche path { fill: #111; stroke: #fff; stroke-width: 1.4; stroke-linejoin: round; }
.curseur.presse .curseur-fleche { transform: scale(.85); }

/* ---------- Réduire les animations : chaque étape montre son état final, sans mouvement ---------- */
@media (prefers-reduced-motion: reduce) {
  .cam, .lecture, mark.surligne, .bande, .segment, .ligne, .etat, .progres li, .btn { transition: none; }
  .apparait, .volet.entre, .pj.ouverte .pj-texte, mark.retire.on .etiq { animation: none; }
  .lecture-scan, .curseur { display: none; }
}
