/* Jarvis · refonte « Voûte céleste ». Charte : bleu nuit à indigo, bleus discrets, rose pâle pour Jarvis, or léger pour « À valider ».
   Aucun vert. Aucun trait entre les étoiles. Noms d'étoiles en petites majuscules espacées, fines.
   Mouvements : tout ce qui bouge est coupé quand html[data-mouvement="reduit"] (réglage du système, ou ?calme=1 en banc). */

:root {
  --nuit-0: #04081f; --nuit-1: #070c2e; --nuit-2: #0b1245;
  --encre: #eaeeff; --encre-2: #aab4de; --encre-3: #7d89ba;
  --filet: rgba(170, 188, 255, .16); --filet-2: rgba(170, 188, 255, .3);
  --bleu: #9db8ff; --bleu-vif: #c6d6ff; --rose: #ffc6de; --or: #e4bd72;
  --jour: #ffffff; --jour-2: #fafbfe; --jour-filet: #e9ecf4; --jour-encre: #121633; --jour-encre-2: #68708f; --jour-bleu: #2f4bd8; --jour-doux: #eef1fb;
  --police: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --titre: "Jost", "Josefin Sans", "Avenir Next", "Century Gothic", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --entete: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font-family: var(--police); font-size: 15px; line-height: 1.45; color: var(--encre); background: var(--nuit-1); overflow: hidden; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.saut { position: fixed; left: 12px; top: -60px; z-index: 60; padding: 10px 14px; border-radius: 10px; background: #fff; color: #121633; }
.saut:focus { top: 12px; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; display: block; }
:focus-visible { outline: 2px solid var(--bleu-vif); outline-offset: 3px; }
.surtitre { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--encre-2); font-weight: 500; }
.pastille { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }

/* ---------- en-tête ---------- */
.entete { position: fixed; inset: 0 0 auto 0; height: var(--entete); z-index: 20; display: flex; align-items: center; padding: 0 42px; pointer-events: none; }
.entete > * { pointer-events: auto; }
.marque { font-family: var(--titre); font-size: 26px; letter-spacing: .06em; color: #fff; text-decoration: none; line-height: 1; }
.marque span { font-weight: 300; }
.marque strong { font-weight: 600; }
.nav { position: absolute; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.nav a, .nav button { padding: 8px 12px; border: 0; background: none; color: var(--encre-2); font-size: 15px; text-decoration: none; border-radius: 8px; white-space: nowrap; transition: color .25s; }
.nav a:hover, .nav button:hover { color: #fff; }
.nav [aria-current="page"] { color: #fff; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 9px; }
.entete .entete-menu { display: none; margin-left: auto; }

html[data-jour="1"] .entete { background: var(--jour); border-bottom: 1px solid var(--jour-filet); }
html[data-jour="1"] .marque { color: var(--jour-encre); }
html[data-jour="1"] .nav a, html[data-jour="1"] .nav button { color: var(--jour-encre-2); }
html[data-jour="1"] .nav a:hover, html[data-jour="1"] .nav button:hover, html[data-jour="1"] .nav [aria-current="page"] { color: var(--jour-encre); }
html[data-jour="1"] :focus-visible { outline-color: var(--jour-bleu); }

/* ---------- boutons ronds, infobulles ---------- */
.rond { position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; padding: 0; border: 1px solid var(--filet-2); background: rgba(120, 150, 255, .12); color: #dfe7ff; transition: background .25s, border-color .25s, box-shadow .25s, transform .2s; }
.rond:hover { background: rgba(140, 165, 255, .22); border-color: rgba(200, 214, 255, .55); }
.rond:active { transform: scale(.96); }
.rond:disabled { opacity: .45; cursor: not-allowed; }
.rond-nu { border-color: transparent; background: none; }
.rond-ondes { background: #e9eeff; color: #18205a; border-color: transparent; }
.rond-ondes:hover { background: #fff; border-color: transparent; }
.rond-micro[aria-pressed="true"] { background: rgba(150, 176, 255, .34); border-color: var(--bleu-vif); box-shadow: 0 0 0 5px rgba(150, 176, 255, .14); animation: bouton-ecoute 2.4s ease-in-out infinite; }
.rond-ondes[aria-pressed="true"] { box-shadow: 0 0 0 5px rgba(233, 238, 255, .16); animation: bouton-ecoute 2.4s ease-in-out infinite; }
[data-infobulle]::after { content: attr(data-infobulle); position: absolute; bottom: calc(100% + 10px); right: 0; padding: 6px 10px; border-radius: 8px; background: rgba(8, 12, 44, .94); border: 1px solid var(--filet-2); color: #eef2ff; font-size: 12px; white-space: nowrap; opacity: 0; transform: translateY(4px); pointer-events: none; transition: opacity .18s, transform .18s; z-index: 5; }
[data-infobulle]:hover::after, [data-infobulle]:focus-visible::after { opacity: 1; transform: none; }
@keyframes bouton-ecoute { 0%, 100% { box-shadow: 0 0 0 4px rgba(150, 176, 255, .10); } 50% { box-shadow: 0 0 0 8px rgba(150, 176, 255, .20); } }

.bouton { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 99px; border: 1px solid rgba(170, 190, 255, .46); background: rgba(120, 150, 255, .15); color: #fff; font-size: 13.5px; font-weight: 600; text-decoration: none; transition: background .25s, border-color .25s; }
.bouton:hover { background: rgba(130, 160, 255, .28); border-color: rgba(200, 214, 255, .7); }

/* ---------- vues ---------- */
#scene { position: fixed; inset: 0; }
.vue { position: absolute; inset: 0; overflow: hidden; }
.vue-galaxie { background: var(--nuit-1); color-scheme: dark; }

/* ---------- ciel ---------- */
.ciel { position: absolute; inset: 0; overflow: hidden; --mx: 0; --my: 0; transform-origin: 39% 48%; transition: transform 1.3s cubic-bezier(.22, .7, .2, 1);
  background:
    radial-gradient(46% 52% at var(--cx, 39%) var(--cy, 48%), rgba(104, 74, 176, .46) 0, rgba(64, 54, 156, .22) 42%, transparent 72%),
    radial-gradient(48% 42% at 82% 4%, rgba(74, 44, 128, .34), transparent 70%),
    radial-gradient(60% 50% at 8% 96%, rgba(20, 30, 110, .4), transparent 70%),
    linear-gradient(104deg, #060a2a 0%, #0a1246 36%, #0c1247 60%, #070b2c 100%); }
.ciel.a-choix { transform: scale(1.035); }
.ciel.vise { transform: scale(2.7); transition: transform 1.1s cubic-bezier(.6, 0, .3, 1); }
.ciel.arrive { animation: ciel-arrive 1.3s cubic-bezier(.2, .7, .2, 1); }
@keyframes ciel-arrive { from { transform: scale(1.12); } to { transform: scale(1); } }
.ciel-plan { position: absolute; inset: 0; transform: translate3d(calc(var(--mx) * var(--pf, 0) * -1px), calc(var(--my) * var(--pf, 0) * -1px), 0); }
.ciel-nebuleuses { --pf: 7; }
.ciel-lointain { --pf: 11; }
.ciel-proche { --pf: 19; }
.ciel-astres { --pf: 27; }
canvas.ciel-plan { inset: auto; left: -36px; top: -36px; width: calc(100% + 72px); height: calc(100% + 72px); }

.nebuleuse { position: absolute; border-radius: 50%; mix-blend-mode: screen; will-change: transform; }
.n1 { left: -14%; top: 14%; width: 62vmax; height: 44vmax; background: radial-gradient(closest-side, rgba(54, 92, 226, .30), rgba(40, 70, 196, .12) 56%, transparent); animation: derive-1 96s ease-in-out infinite alternate; }
.n2 { right: -10%; bottom: -8%; width: 56vmax; height: 40vmax; background: radial-gradient(closest-side, rgba(62, 112, 236, .24), rgba(44, 80, 200, .10) 58%, transparent); animation: derive-2 118s ease-in-out infinite alternate; }
.n3 { right: 8%; top: -16%; width: 44vmax; height: 34vmax; background: radial-gradient(closest-side, rgba(98, 64, 186, .24), rgba(70, 50, 160, .09) 60%, transparent); animation: derive-3 104s ease-in-out infinite alternate; }
.n4 { left: 26%; bottom: -14%; width: 40vmax; height: 30vmax; background: radial-gradient(closest-side, rgba(56, 100, 232, .18), transparent 70%); animation: derive-2 84s ease-in-out infinite alternate-reverse; }
@keyframes derive-1 { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(5%, -4%, 0) scale(1.1); } }
@keyframes derive-2 { from { transform: translate3d(0, 0, 0) scale(1.06); } to { transform: translate3d(-6%, -3%, 0) scale(1); } }
@keyframes derive-3 { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-4%, 6%, 0) scale(1.12); } }

/* ---------- étoiles nommées ---------- */
.etoile { --g: 56px; --vif: 1; --tx: -50%; --ty: calc(var(--g) / -2); --couleur: #9db4ff; position: absolute; left: 50%; top: 50%; transform: translate(var(--tx), var(--ty)); display: flex; flex-direction: column; align-items: center; padding: 0; border: 0; background: none; color: inherit; opacity: 0; transition: opacity 1s ease; }
.etoile[data-type="theme"] { --g: 38px; --vif: .65; }
/* Les noms ne sont pas affichés au repos : le nom d'une étoile apparaît à son survol, à son focus clavier et tant qu'elle est sélectionnée
   (fondu court ; sans fondu en animations réduites). Il se place juste sous l'étoile ; repli posé par disposition.js en cas de conflit : dessus, droite, gauche. */
.etoile[data-place="dessus"] { flex-direction: column-reverse; --ty: calc(-100% + var(--g) / 2); }
.etoile[data-place="droite"] { flex-direction: row; --tx: calc(var(--g) / -2); --ty: -50%; }
.etoile[data-place="gauche"] { flex-direction: row-reverse; --tx: calc(-100% + var(--g) / 2); --ty: -50%; }
.ciel[data-pret] .etoile { opacity: 1; animation: etoile-parait 1.4s cubic-bezier(.2, .7, .2, 1) backwards; animation-delay: calc(.25s + var(--ordre, 0) * .13s); }
@keyframes etoile-parait { from { opacity: 0; } to { opacity: 1; } }
.ciel.a-choix .etoile[aria-pressed="false"] { opacity: .84; }
.etoile:focus-visible { outline: none; }
/* Aucun rond autour des étoiles. Survol, focus clavier et sélection se lisent par l'étoile elle-même : elle grandit et s'intensifie (jamais un anneau figé). */
.etoile-glyphe { position: relative; display: block; width: var(--g); height: var(--g); transition: transform .6s cubic-bezier(.2, .7, .2, 1), filter .6s ease; }
.etoile:hover .etoile-glyphe, .etoile:focus-visible .etoile-glyphe { transform: scale(1.2); filter: brightness(1.3); }
.etoile[aria-pressed="true"] .etoile-glyphe { transform: scale(1.38); filter: brightness(1.45) saturate(1.15); }
.etoile-glyphe i { position: absolute; display: block; }
/* Scintillement vivant : le halo respire (il se contracte et se dilate, son intensité varie), le point palpite, une étincelle à quatre branches
   s'allume brièvement en pivotant. Chaque étoile a ses durées et ses décalages (posés par ciel.js d'après son identifiant) : rien n'est synchronisé.
   --vif règle l'amplitude : 1 pour une société, 0,65 pour un thème. Tout s'arrête en mouvement réduit (étoiles stables). */
.etoile-halo { inset: -42%; border-radius: 50%;
  background: radial-gradient(circle closest-side, color-mix(in srgb, var(--couleur) 52%, transparent) 0, color-mix(in srgb, var(--couleur) 24%, transparent) 28%, color-mix(in srgb, var(--couleur) 9%, transparent) 60%, transparent 100%);
  animation: halo-respire var(--resp, 6s) ease-in-out var(--retard, 0s) infinite alternate; }
@keyframes halo-respire {
  0% { transform: scale(calc(1 - .2 * var(--vif, 1))); opacity: calc(.8 - .28 * var(--vif, 1)); }
  45% { transform: scale(calc(1 + .03 * var(--vif, 1))); opacity: .82; }
  100% { transform: scale(calc(1 + .22 * var(--vif, 1))); opacity: 1; }
}
.etoile-croix { inset: 0; opacity: .22; animation: etincelle var(--etin, 9s) ease-in-out var(--retard-e, 0s) infinite; }
@keyframes etincelle {
  0%, 56%, 100% { opacity: .2; transform: rotate(-7deg) scale(.68); }
  68% { opacity: calc(.45 + .55 * var(--vif, 1)); transform: rotate(3deg) scale(calc(1 + .32 * var(--vif, 1))); }
  78% { opacity: .5; transform: rotate(9deg) scale(1); }
  90% { opacity: .28; transform: rotate(2deg) scale(.8); }
}
.etoile-croix::before, .etoile-croix::after { content: ""; position: absolute; left: 50%; top: 50%; width: 128%; height: 1px; transform: translate(-50%, -50%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--couleur) 70%, #fff) 50%, transparent); opacity: .9; }
.etoile-croix::after { transform: translate(-50%, -50%) rotate(90deg); }
.etoile-point { left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px; border-radius: 50%; background: #fff; box-shadow: 0 0 3px 1px #fff, 0 0 12px 4px color-mix(in srgb, var(--couleur) 78%, #fff); animation: scintille var(--scin, 4.6s) ease-in-out var(--retard-p, 0s) infinite; }
.etoile[data-type="theme"] .etoile-point { width: 7px; height: 7px; margin: -3.5px; }
.etoile-nom { margin-top: 8px; opacity: 0; padding-left: .24em; font-size: 10.5px; line-height: 1.5; font-weight: 400; letter-spacing: .24em; text-transform: uppercase; white-space: nowrap; color: rgba(226, 233, 255, .8); text-shadow: 0 1px 3px rgba(4, 8, 31, .95), 0 0 10px rgba(4, 8, 31, .9); transition: opacity .18s ease, color .4s; position: relative; }
.etoile:hover .etoile-nom, .etoile:focus-visible .etoile-nom, .etoile[aria-pressed="true"] .etoile-nom { opacity: 1; color: #fff; }
.etoile[data-place="dessus"] .etoile-nom { margin: 0 0 8px; }
.etoile[data-place="droite"] .etoile-nom { margin: 0 0 0 8px; }
.etoile[data-place="gauche"] .etoile-nom { margin: 0 8px 0 0; }
@keyframes scintille {
  0%, 100% { opacity: 1; transform: scale(1); }
  22% { opacity: calc(1 - .36 * var(--vif, 1)); transform: scale(calc(1 - .2 * var(--vif, 1))); }
  41% { opacity: 1; transform: scale(calc(1 + .24 * var(--vif, 1))); }
  63% { opacity: calc(1 - .2 * var(--vif, 1)); transform: scale(.94); }
  82% { opacity: 1; transform: scale(calc(1 + .1 * var(--vif, 1))); }
}

/* ---------- mode de mouvement « indépendant » (?mouvement=independant) : chaque étoile a sa profondeur et sa dérive ; au choix, elle seule réagit ---------- */
html[data-ciel="independant"] .ciel.a-choix, html[data-ciel="independant"] .ciel.vise { transform: none; }
html[data-ciel="independant"] .ciel-astres { --pf: 0; }
html[data-ciel="independant"] .etoile { transform: translate(var(--tx), var(--ty)) translate3d(calc(var(--mx) * var(--pfe, 0) * -1px), calc(var(--my) * var(--pfe, 0) * -1px), 0); }
html[data-ciel="independant"] .ciel[data-pret] .etoile { animation: etoile-parait 1.4s cubic-bezier(.2, .7, .2, 1) calc(.25s + var(--ordre, 0) * .13s) backwards, etoile-derive var(--dur, 30s) ease-in-out var(--decal, 0s) infinite alternate; }
@keyframes etoile-derive {
  0% { translate: calc(var(--ax) * -1) calc(var(--ay) * -1); }
  35% { translate: calc(var(--ax) * .5) calc(var(--ay) * -.6); }
  70% { translate: calc(var(--ax) * -.3) var(--ay); }
  100% { translate: var(--ax) calc(var(--ay) * .2); }
}
html[data-ciel="independant"] .ciel .coeur { transform: translate(-50%, -50%) translate3d(calc(var(--mx) * -6px), calc(var(--my) * -6px), 0); }
html[data-ciel="independant"] .etoile.s-ouvre { z-index: 3; }
html[data-ciel="independant"] .etoile.s-ouvre .etoile-halo { filter: brightness(1.7); opacity: 1; transition: filter .9s ease; }

/* ---------- cœur de Jarvis ---------- */
.coeur { --taille: 132px; --h: .34; --o1: .22; --o2: .44; --o3: .72; --b2: 1.34; --b3: 1.58; --niveau: 0; --t1: 255, 214, 232; --t2: 216, 170, 232; position: absolute; left: var(--cx, 39%); top: var(--cy, 48%); width: var(--taille); height: var(--taille); transform: translate(-50%, -50%); pointer-events: none; }
.coeur > span { position: absolute; border-radius: 50%; }
.coeur-halo { inset: -88%; background: radial-gradient(circle, rgba(var(--t1), .5) 0, rgba(var(--t2), .26) 25%, rgba(150, 122, 226, .12) 47%, transparent 68%); animation: coeur-pouls 6s ease-in-out infinite; }
.coeur-disque { inset: 0; background: radial-gradient(circle, rgba(255, 255, 255, .96) 0, rgba(var(--t1), .64) 19%, rgba(var(--t2), .36) 58%, rgba(var(--t2), .2) 100%); box-shadow: 0 0 46px 6px rgba(var(--t2), .3), inset 0 0 0 1px rgba(255, 255, 255, .24); animation: coeur-souffle 6s ease-in-out infinite; }
.coeur-disque::before, .coeur-disque::after { content: ""; position: absolute; left: 50%; top: 50%; width: 118%; height: 1px; transform: translate(-50%, -50%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5) 50%, transparent); }
.coeur-disque::after { transform: translate(-50%, -50%) rotate(90deg); }
.coeur-trait { border: 1px solid rgba(255, 255, 255, .3); }
.coeur-trait.t1 { inset: 13%; }
.coeur-trait.t2 { inset: 30%; border-color: rgba(255, 255, 255, .24); }
.coeur-noyau { left: 50%; top: 50%; width: 15px; height: 15px; margin: -7.5px; background: #fff; box-shadow: 0 0 16px 6px rgba(255, 255, 255, .78), 0 0 36px 13px rgba(var(--t1), .62); }
/* le nom du cœur suit la même règle que celui des étoiles : masqué au repos, il apparaît au survol du disque */
.ciel .coeur-disque { pointer-events: auto; }
.coeur-disque:hover ~ .coeur-nom { opacity: 1; }
.coeur > .coeur-nom { opacity: 0; transition: opacity .18s ease; border-radius: 0; left: 50%; top: calc(50% + 24px); transform: translateX(-50%); padding-left: .32em; font-size: 10.5px; line-height: 1.5; white-space: nowrap; letter-spacing: .32em; text-transform: uppercase; color: rgba(255, 255, 255, .92); text-shadow: 0 1px 6px rgba(70, 30, 90, .5); }
.coeur-onde { inset: 0; border: 1px solid rgba(255, 255, 255, .62); opacity: 0; transition: opacity .5s; }
.coeur-orbite { inset: -17%; opacity: 0; transition: opacity .5s; }
.coeur-orbite::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 66%, rgba(208, 222, 255, .6) 99.5%, transparent 100%); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 1.5px), #000 calc(100% - 1.5px)); mask: radial-gradient(farthest-side, transparent calc(100% - 1.5px), #000 calc(100% - 1.5px)); }
.coeur-orbite i { position: absolute; left: 50%; top: 0; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px 3px rgba(204, 220, 255, .95); }

/* écoute : anneau discret */
.coeur[data-etat="ecoute"] { --t1: 216, 229, 255; --t2: 170, 192, 250; }
.coeur[data-etat="ecoute"] .o1 { opacity: .8; border-color: rgba(194, 214, 255, .9); transform: scale(1.24); animation: coeur-ecoute 3.2s ease-in-out infinite; }
/* réflexion : petite lumière qui tourne */
.coeur[data-etat="reflexion"] { --t1: 233, 220, 255; --t2: 192, 170, 246; }
.coeur[data-etat="reflexion"] .coeur-orbite { opacity: 1; animation: coeur-tourne 2.6s linear infinite; }
.coeur[data-etat="reflexion"] .coeur-halo, .coeur[data-etat="reflexion"] .coeur-disque { animation-duration: 3.6s; }
/* parole : pulsation et anneaux au niveau sonore (--niveau, de 0 à 1, posé par coeur.js) */
.coeur[data-etat="parole"] { --t1: 255, 206, 228; --t2: 238, 162, 214; }
.coeur[data-etat="parole"] .coeur-halo { animation: none; transform: scale(calc(1 + var(--niveau) * var(--h))); opacity: calc(.8 + var(--niveau) * .2); }
.coeur[data-etat="parole"] .coeur-disque { animation: none; transform: scale(calc(1 + var(--niveau) * .09)); }
.coeur[data-etat="parole"] .coeur-onde { transition: none; }
.coeur[data-etat="parole"] .o1 { opacity: calc(.3 + var(--niveau) * .6); transform: scale(calc(1.14 + var(--niveau) * var(--o1))); }
.coeur[data-etat="parole"] .o2 { opacity: calc(.18 + var(--niveau) * .45); transform: scale(calc(var(--b2) + var(--niveau) * var(--o2))); }
.coeur[data-etat="parole"] .o3 { opacity: calc(.08 + var(--niveau) * .3); transform: scale(calc(var(--b3) + var(--niveau) * var(--o3))); }
@keyframes coeur-pouls { 0%, 100% { transform: scale(1); opacity: .86; } 50% { transform: scale(1.08); opacity: 1; } }
@keyframes coeur-souffle { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }
@keyframes coeur-ecoute { 0%, 100% { transform: scale(1.22); opacity: .6; } 50% { transform: scale(1.28); opacity: .88; } }
@keyframes coeur-tourne { to { transform: rotate(360deg); } }

/* petit cœur de la page de conversation (fond blanc : teintes plus soutenues) */
.ciel .coeur { animation: coeur-parait 1.6s ease backwards; }
@keyframes coeur-parait { from { opacity: 0; } to { opacity: 1; } }
.coeur--mini { --taille: 34px; --t1: 250, 172, 206; --t2: 164, 144, 240; position: relative; left: auto; top: auto; transform: none; flex: none; margin: 0 4px; }
.coeur--mini .coeur-halo { inset: -34%; background: radial-gradient(circle, rgba(var(--t1), .42) 0, rgba(var(--t2), .2) 46%, transparent 70%); }
.coeur--mini .coeur-disque { background: radial-gradient(circle, #fff 0, rgba(var(--t1), .95) 34%, rgba(var(--t2), .92) 100%); box-shadow: 0 2px 10px rgba(var(--t2), .45); }
.coeur--mini .coeur-disque::before, .coeur--mini .coeur-disque::after, .coeur--mini .coeur-trait { display: none; }
.coeur--mini .coeur-noyau { width: 6px; height: 6px; margin: -3px; box-shadow: 0 0 6px 2px rgba(255, 255, 255, .9); }
.coeur--mini .coeur-onde { border-color: rgba(96, 118, 226, .75); }
.coeur--mini .coeur-orbite { inset: -26%; }
.coeur--mini .coeur-orbite::before { background: conic-gradient(from 0deg, transparent 0 60%, rgba(70, 96, 220, .7) 99.5%, transparent 100%); }
.coeur--mini .coeur-orbite i { width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; background: #3b56d8; box-shadow: 0 0 6px 1px rgba(70, 96, 220, .7); }
.coeur--mini[data-etat="ecoute"] { --t1: 150, 184, 250; --t2: 110, 140, 240; }
.coeur--mini[data-etat="reflexion"] { --t1: 200, 176, 250; --t2: 150, 124, 240; }
.coeur--mini[data-etat="parole"] { --t1: 248, 150, 198; --t2: 196, 120, 226; }

/* ---------- accueil : titre, légende ---------- */
.galaxie-titre { position: absolute; left: 42px; top: 86px; max-width: 520px; pointer-events: none; }
.galaxie-titre h1 { font-family: var(--titre); font-size: 30px; font-weight: 300; letter-spacing: .03em; line-height: 1.15; color: #f3f5ff; }
.galaxie-titre h1 strong { font-weight: 600; color: var(--rose); }
.legende { position: absolute; left: 42px; bottom: 108px; display: grid; gap: 9px; font-size: 12.5px; color: var(--encre-2); pointer-events: none; }
.legende li { display: flex; align-items: center; gap: 10px; }
.p-jarvis { background: var(--rose); box-shadow: 0 0 8px 2px rgba(255, 198, 222, .55); }
.p-societe { background: #c3a8ff; box-shadow: 0 0 8px 2px rgba(195, 168, 255, .5); }
.p-theme { width: 7px; height: 7px; margin: 0 1px; background: #fff; box-shadow: 0 0 8px 2px rgba(255, 255, 255, .5); }
.legende .banc-marque { margin-top: 6px; font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--encre-3); }

/* ---------- colonne de droite : panneau de détail, cartouches ---------- */
.colonne { position: absolute; right: 30px; top: 88px; bottom: 106px; width: 354px; display: flex; flex-direction: column; gap: 12px; pointer-events: none; }
.colonne > * { pointer-events: auto; }
.panneau { position: relative; flex: none; margin-bottom: auto; padding: 28px 26px 26px; border-radius: 22px; border: 1px solid var(--filet-2); background: linear-gradient(180deg, rgba(17, 25, 82, .78), rgba(10, 16, 60, .78)); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: panneau-entre .55s cubic-bezier(.2, .7, .2, 1); }
/* le panneau prend la hauteur de son contenu ; s'il manque de place : .serre, puis .tres-serre, et seulement en dernier recours .defile (interface.js) */
.panneau.serre { padding: 20px 20px 18px; }
.panneau.serre h2 { margin-top: 4px; font-size: 22px; }
.panneau.serre .panneau-resume { font-size: 12.5px; }
.panneau.serre .panneau-corps { margin-top: 14px; padding-top: 14px; }
.panneau.serre .liste li { padding: 9px 0; gap: 2px; }
.panneau.serre .liste li:first-child { padding-top: 0; }
.panneau.serre .liste b { font-size: 13px; }
.panneau.serre .liste small { font-size: 11.5px; }
.panneau.serre .points { gap: 10px; font-size: 13.5px; }
.panneau.serre .bouton { margin-top: 16px; padding: 9px 17px; }
.panneau.serre .note { margin-top: 10px; font-size: 11px; }
.panneau.serre .voir-tout { margin-top: 10px; }
.panneau.tres-serre { padding: 14px 16px 13px; }
.panneau.tres-serre .surtitre { font-size: 10px; }
.panneau.tres-serre h2 { font-size: 19px; margin-bottom: 2px; }
.panneau.tres-serre .panneau-resume { font-size: 11.5px; }
.panneau.tres-serre .panneau-corps { margin-top: 9px; padding-top: 9px; }
.panneau.tres-serre .liste li { padding: 6px 0; gap: 0; }
.panneau.tres-serre .liste b { font-size: 12.5px; }
.panneau.tres-serre .liste small { font-size: 11px; line-height: 1.35; }
.panneau.tres-serre .points { gap: 7px; font-size: 12.5px; }
.panneau.tres-serre .note { display: none; }
.panneau.tres-serre .jauge { margin-top: 4px; }
.panneau.tres-serre .bouton { margin-top: 11px; padding: 7px 15px; font-size: 12.5px; }
.panneau.tres-serre .voir-tout { margin-top: 7px; }
.panneau.defile { overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(170, 188, 255, .3) transparent; }
.voir-tout { display: inline-block; margin-top: 14px; font-size: 12.5px; letter-spacing: .02em; color: var(--bleu-vif); text-decoration: none; border-bottom: 1px solid rgba(198, 214, 255, .28); transition: color .2s, border-color .2s; }
.voir-tout:hover { color: #fff; border-bottom-color: rgba(255, 255, 255, .7); }
@keyframes panneau-entre { from { opacity: 0; transform: translate3d(18px, 0, 0); } to { opacity: 1; transform: none; } }
.panneau-fermer { position: absolute; right: 12px; top: 12px; width: 36px; height: 36px; color: var(--encre-2); }
.panneau h2 { margin: 6px 36px 6px 0; font-family: var(--titre); font-size: 26px; font-weight: 500; letter-spacing: .02em; line-height: 1.2; color: #fff; outline: none; }
.panneau-resume { font-size: 13.5px; color: var(--encre-2); }
.panneau-corps { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--filet); }
.panneau-corps:empty { display: none; }
.points { display: grid; gap: 15px; font-size: 14.5px; }
.points li { display: grid; grid-template-columns: 6px 1fr; gap: 12px; align-items: baseline; }
.points li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--bleu); transform: translateY(-2px); }
.panneau .bouton { margin-top: 24px; }
.liste { display: grid; }
.liste li { display: grid; gap: 3px; padding: 12px 0; border-bottom: 1px solid var(--filet); }
.liste li, .points li { animation: ligne-entre .5s cubic-bezier(.2, .7, .2, 1) both; }
.liste li:nth-child(2), .points li:nth-child(2) { animation-delay: .05s; }
.liste li:nth-child(3), .points li:nth-child(3) { animation-delay: .1s; }
.liste li:nth-child(4), .points li:nth-child(4) { animation-delay: .15s; }
.liste li:nth-child(5), .points li:nth-child(5) { animation-delay: .2s; }
.liste li:nth-child(n+6), .points li:nth-child(n+6) { animation-delay: .25s; }
@keyframes ligne-entre { from { opacity: 0; transform: translate3d(0, 6px, 0); } to { opacity: 1; transform: none; } }
.liste li:first-child { padding-top: 0; }
.liste li:last-child { border-bottom: 0; padding-bottom: 0; }
.liste b { font-size: 14px; font-weight: 600; color: #f1f4ff; }
.liste small { font-size: 12px; color: var(--encre-2); }
.liste .ligne { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.liste .prochain b { color: #fff; }
.liste .heure { font-variant-numeric: tabular-nums; color: var(--bleu-vif); font-size: 13px; font-weight: 600; min-width: 46px; }
.liste .evenement { grid-template-columns: 52px 1fr; gap: 2px 10px; }
.liste .evenement small { grid-column: 2; }
.liste .passe { opacity: .55; }
.etiquette { flex: none; padding: 2px 8px; border-radius: 99px; font-size: 10.5px; letter-spacing: .06em; border: 1px solid var(--filet-2); color: var(--encre-2); white-space: nowrap; }
.etiquette.vive { color: #dfe8ff; border-color: rgba(157, 184, 255, .6); background: rgba(120, 150, 255, .16); }
.etiquette.or { color: var(--or); border-color: rgba(228, 189, 114, .6); }
.jauge { height: 3px; margin-top: 6px; border-radius: 3px; background: rgba(160, 180, 255, .18); overflow: hidden; }
.jauge i { display: block; height: 100%; border-radius: 3px; background: var(--bleu); }
.note { margin-top: 16px; font-size: 12px; color: var(--encre-3); }

/* les quatre cartouches restent en haut à droite, sous le menu ; le panneau de détail s'ouvre juste dessous, au même écart qu'entre eux */
.cartouches { flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cartouche { display: block; min-width: 0; padding: 16px 16px 15px; border-radius: 14px; border: 1px solid var(--filet-2); background: rgba(10, 16, 58, .58); text-align: left; transition: border-color .3s, background .3s, transform .3s; }
.cartouche b { display: block; margin-top: 7px; font-size: 21px; font-weight: 600; line-height: 1.15; color: #f6f8ff; white-space: nowrap; }
.cartouche:hover { border-color: rgba(200, 214, 255, .56); transform: translateY(-2px); }
.cartouche[aria-expanded="true"] { border-color: var(--bleu); background: rgba(40, 60, 150, .36); }
.cartouche-valider { border-color: rgba(228, 189, 114, .78); background: linear-gradient(180deg, rgba(58, 43, 22, .6), rgba(26, 21, 26, .66)); }
.cartouche-valider .surtitre { color: var(--or); }
.cartouche-valider:hover, .cartouche-valider[aria-expanded="true"] { border-color: #f0cf8c; background: linear-gradient(180deg, rgba(74, 55, 28, .66), rgba(34, 27, 30, .7)); }

/* ---------- barre de demande ---------- */
.demande-zone { position: absolute; left: 50%; bottom: 34px; width: min(750px, calc(100% - 48px)); transform: translateX(-50%); z-index: 6; }
.demande { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 6px 7px 6px 26px; border-radius: 30px; border: 1px solid var(--filet-2); background: rgba(14, 20, 66, .74); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: border-color .3s, box-shadow .3s; }
.demande:focus-within { border-color: rgba(198, 212, 255, .6); box-shadow: 0 0 0 4px rgba(150, 176, 255, .08); }
.demande textarea { flex: 1; min-width: 0; height: 24px; max-height: 120px; padding: 0; border: 0; outline: none; resize: none; background: none; font-size: 15px; line-height: 24px; color: var(--encre); }
.demande textarea::placeholder { color: var(--encre-2); opacity: 1; }
.demande-modele { flex: none; display: flex; }
.demande-modele select { max-width: 124px; padding: 6px 4px; border: 0; border-radius: 8px; background: none; color: var(--encre-2); font-size: 12.5px; cursor: pointer; -webkit-appearance: none; appearance: none; text-align: right; }
.demande-modele select:hover { color: #fff; }

html[data-modeste="1"] .panneau, html[data-modeste="1"] .demande { -webkit-backdrop-filter: none; backdrop-filter: none; }
html[data-modeste="1"] .vue-galaxie .demande { background: rgba(12, 18, 60, .92); }

/* ---------- voile de passage entre les deux vues ---------- */
.voile { position: fixed; inset: 0; z-index: 40; background: #fff; opacity: 0; pointer-events: none; transition: opacity .5s ease; }
.voile[data-teinte="nuit"] { background: var(--nuit-1); }
.voile[data-actif="1"] { opacity: 1; pointer-events: auto; }
.voile[data-actif="1"][data-lent="1"] { transition: opacity .62s ease .42s; }
.rideau { position: absolute; inset: 0; z-index: 25; background: rgba(4, 8, 31, .5); }

/* ---------- maquette (Marketplace, création d'agent) ---------- */
.maquette { width: min(420px, calc(100vw - 32px)); padding: 28px; border: 1px solid var(--jour-filet); border-radius: 20px; background: #fff; color: var(--jour-encre); box-shadow: 0 30px 80px rgba(8, 12, 50, .35); }
.maquette::backdrop { background: rgba(6, 10, 40, .5); }
.maquette .surtitre { color: var(--jour-bleu); }
.maquette h2 { margin: 6px 0 10px; font-family: var(--titre); font-size: 24px; font-weight: 500; }
.maquette p { color: var(--jour-encre-2); font-size: 14px; }
.maquette form { margin-top: 22px; display: flex; justify-content: flex-end; }
.maquette .bouton { background: #18205a; border-color: #18205a; }
.maquette .bouton:hover { background: #232d78; }

/* ======================= conversation : sobre et blanche ======================= */
.vue-conversation { top: var(--entete); display: grid; grid-template-columns: 272px minmax(0, 1fr) 328px; background: var(--jour); color: var(--jour-encre); color-scheme: light; }
.vue-conversation .surtitre { color: var(--jour-encre-2); }
.tiroir-fermer, .seulement-etroit, .seulement-moyen { display: none; }
.vue-conversation .rond-nu { color: var(--jour-encre-2); }
.vue-conversation .rond-nu:hover { background: var(--jour-doux); border-color: transparent; }

.equipe { display: flex; flex-direction: column; min-height: 0; padding: 22px 14px 16px; border-right: 1px solid var(--jour-filet); background: var(--jour-2); }
.equipe-tete { display: flex; justify-content: space-between; align-items: flex-start; padding: 0 8px 18px; }
.equipe-tete h2 { display: flex; align-items: center; gap: 10px; margin-top: 4px; font-family: var(--titre); font-size: 22px; font-weight: 500; letter-spacing: .01em; }
.equipe-tete .pastille { box-shadow: 0 0 0 1px rgba(18, 22, 51, .16); }
.equipe-sous { padding: 0 8px 8px; }
.agents { flex: 1; min-height: 0; overflow: auto; display: grid; align-content: start; gap: 2px; scrollbar-width: thin; }
.agent { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: center; width: 100%; padding: 9px 8px; border: 0; border-radius: 12px; background: none; text-align: left; transition: background .2s; }
.agent:hover { background: #f1f3fa; }
.agent[aria-current="true"] { background: var(--jour-doux); }
.agent-avatar { position: relative; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #e7ebfa; color: #2a3aa0; font-size: 13px; font-weight: 600; }
.agent-avatar.jarvis { background: radial-gradient(circle, #fff 0, #f9b3d0 38%, #a892f0 100%); }
.agent-avatar::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--jour-2); background: #c5cbdf; }
.agent[data-etat="actif"] .agent-avatar::after { background: #3d63e6; }
.agent[data-etat="hors_ligne"] .agent-avatar::after { background: #fff; box-shadow: inset 0 0 0 1.5px #b9c0d8; }
.agent b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agent small { display: block; font-size: 12px; color: var(--jour-encre-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.creer-agent { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px; border: 1px dashed #c6cde6; border-radius: 14px; background: #fff; color: #2a336b; text-align: left; transition: border-color .2s, background .2s; }
.creer-agent:hover { border-color: var(--jour-bleu); background: #f6f8ff; }
.creer-agent b { display: block; font-size: 13.5px; font-weight: 600; }
.creer-agent small { display: block; font-size: 11.5px; color: var(--jour-encre-2); }

.fil { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.fil-tete { display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 12px 28px; border-bottom: 1px solid var(--jour-filet); }
.fil-titre { min-width: 0; }
.fil-titre h1 { font-size: 16px; font-weight: 600; }
.fil-titre p { font-size: 12.5px; color: var(--jour-encre-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fil-etat { margin-left: auto; font-size: 12px; color: #4a57a8; white-space: nowrap; }
.messages { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 24px; padding: 30px max(28px, calc((100% - 720px) / 2)) 22px; outline: none; scrollbar-width: thin; }
.message { animation: message-entre .45s cubic-bezier(.2, .7, .2, 1); }
@keyframes message-entre { from { opacity: 0; transform: translate3d(0, 8px, 0); } to { opacity: 1; transform: none; } }
.message.utilisateur { align-self: flex-end; max-width: 78%; }
.message.utilisateur .bulle { padding: 11px 16px; border-radius: 18px 18px 6px 18px; background: var(--jour-doux); font-size: 15px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.message.utilisateur small { display: block; margin-top: 4px; text-align: right; font-size: 11px; color: #8a91ad; }
.message.reponse { align-self: flex-start; max-width: 90%; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; }
.message-avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #e7ebfa; color: #2a3aa0; font-size: 11px; font-weight: 600; }
.message-avatar.jarvis { background: radial-gradient(circle, #fff 0, #f9b3d0 38%, #a892f0 100%); }
.message-tete { font-size: 12px; color: var(--jour-encre-2); margin-bottom: 3px; }
.message-tete b { color: var(--jour-encre); font-weight: 600; }
.corps { font-size: 15px; line-height: 1.62; overflow-wrap: anywhere; }
.corps p { margin: 0 0 10px; white-space: pre-wrap; }
.corps ul, .corps ol { margin: 0 0 10px; padding-left: 22px; list-style: revert; }
.corps li { margin: 3px 0; }
.corps > :last-child { margin-bottom: 0; }
.attente .corps { color: var(--jour-encre-2); }
.points-attente { display: inline-flex; gap: 3px; margin-left: 6px; }
.points-attente i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; animation: attente 1.3s ease-in-out infinite; }
.points-attente i:nth-child(2) { animation-delay: .18s; }
.points-attente i:nth-child(3) { animation-delay: .36s; }
@keyframes attente { 0%, 100% { opacity: .25; } 40% { opacity: 1; } }
.fil-vide { margin: auto; text-align: center; color: var(--jour-encre-2); max-width: 380px; }
.fil-vide b { display: block; margin-bottom: 6px; font-family: var(--titre); font-size: 22px; font-weight: 500; color: var(--jour-encre); }
.erreur { align-self: center; font-size: 13px; color: #a1344f; }

.vue-conversation .demande-zone { position: static; width: auto; transform: none; padding: 8px max(28px, calc((100% - 760px) / 2)) 22px; }
.vue-conversation .demande { background: #fff; border-color: #dde1ee; box-shadow: 0 8px 28px rgba(20, 30, 90, .07); -webkit-backdrop-filter: none; backdrop-filter: none; }
.vue-conversation .demande:focus-within { border-color: #aab6ea; box-shadow: 0 8px 28px rgba(20, 30, 90, .07), 0 0 0 4px rgba(47, 75, 216, .07); }
.vue-conversation .demande textarea { color: var(--jour-encre); }
.vue-conversation .demande textarea::placeholder { color: #8088a6; }
.vue-conversation .demande-modele select { color: var(--jour-encre-2); }
.vue-conversation .demande-modele select:hover { color: var(--jour-encre); }
.vue-conversation .demande .rond { border-color: #dde1ee; background: #f4f6fc; color: #2a336b; }
.vue-conversation .demande .rond:hover { background: #e9edfb; border-color: #c4ccea; }
.vue-conversation .demande .rond-ondes { background: #18205a; color: #fff; border-color: transparent; }
.vue-conversation .demande .rond-ondes:hover { background: #26308a; }
.vue-conversation .demande .rond-micro[aria-pressed="true"] { background: #dfe6ff; border-color: #6f86e8; }
.vue-conversation [data-infobulle]::after { background: #18205a; border-color: #18205a; }

/* ---------- pages « Voir tout » : liste complète d'un cartouche, lecture seule ---------- */
.vue-page { top: var(--entete); overflow: auto; background: var(--jour); color: var(--jour-encre); color-scheme: light; }
.page { max-width: 760px; margin: 0 auto; padding: 38px 28px 64px; }
.page-retour { display: inline-block; margin-bottom: 26px; font-size: 13px; color: var(--jour-encre-2); text-decoration: none; border-bottom: 1px solid var(--jour-filet); }
.page-retour:hover { color: var(--jour-encre); border-bottom-color: #aab6ea; }
.vue-page .surtitre { color: var(--jour-encre-2); }
.page h1 { margin: 6px 0 4px; font-family: var(--titre); font-size: 30px; font-weight: 500; letter-spacing: .01em; }
.page-resume { font-size: 14px; color: var(--jour-encre-2); }
.page-corps { margin-top: 26px; border-top: 1px solid var(--jour-filet); padding-top: 6px; }
.vue-page .liste li { padding: 16px 0; border-bottom-color: #eef0f6; }
.vue-page .liste li:first-child { padding-top: 16px; }
.vue-page .liste li:last-child { padding-bottom: 16px; }
.vue-page .liste b { font-size: 15px; color: var(--jour-encre); }
.vue-page .liste small { font-size: 13px; color: var(--jour-encre-2); }
.vue-page .liste .heure { color: var(--jour-bleu); font-size: 14px; }
.vue-page .liste .prochain b { color: var(--jour-encre); }
.vue-page .etiquette { border-color: transparent; background: #f0f2f8; color: #5d6480; }
.vue-page .etiquette.vive { background: #e9eefc; color: #2a3aa0; }
.vue-page .etiquette.or { background: #fbf1dc; color: #8a5a00; }
.vue-page .jauge { max-width: 320px; background: #e9edf8; }
.vue-page .jauge i { background: #3d63e6; }
.vue-page .note { margin-top: 22px; font-size: 13px; color: var(--jour-encre-2); }

.cote { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--jour-filet); background: var(--jour); }
.onglets { display: flex; align-items: center; gap: 4px; padding: 14px 18px 0; border-bottom: 1px solid var(--jour-filet); }
.onglets [role="tab"] { padding: 10px 12px 12px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--jour-encre-2); font-size: 13.5px; font-weight: 600; transition: color .2s, border-color .2s; }
.onglets [role="tab"]:hover { color: var(--jour-encre); }
.onglets [role="tab"][aria-selected="true"] { color: var(--jour-encre); border-bottom-color: var(--jour-bleu); }
.onglets .tiroir-fermer { margin-left: auto; }
.volet { flex: 1; min-height: 0; overflow: auto; padding: 8px 18px 18px; outline: none; scrollbar-width: thin; }
.volet li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 13px 0; border-bottom: 1px solid #f0f2f8; }
.volet li:last-child { border-bottom: 0; }
.volet b { display: block; font-size: 13.5px; font-weight: 600; }
.volet small { display: block; font-size: 12px; color: var(--jour-encre-2); }
.tuile { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #f1f4fc; color: #3a4aa8; }
.tuile .ic { width: 18px; height: 18px; }
.tuile.repere { background: none; }
.tuile.repere::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #3d63e6; box-shadow: 0 0 0 4px #e6ecfd; }
.tuile.repere.or::before { background: #d39a2a; box-shadow: 0 0 0 4px #fbf1dc; }
.tuile.repere.calme::before { background: #b6bdd4; box-shadow: 0 0 0 4px #f0f2f8; }
.volet .etiquette { display: inline-block; margin-top: 6px; border-color: transparent; background: #e9eefc; color: #2a3aa0; }
.volet .etiquette.or { background: #fbf1dc; color: #8a5a00; }
.volet .etiquette.calme { background: #f0f2f8; color: #5d6480; }
.volet .jauge { background: #e9edf8; }
.volet .jauge i { background: #3d63e6; }
.vide { padding: 28px 0; text-align: center; font-size: 13px; color: var(--jour-encre-2); }

/* ======================= largeur moyenne : le volet de droite de la conversation devient un tiroir ======================= */
@media (max-width: 1180px) {
  .vue-conversation { grid-template-columns: 256px minmax(0, 1fr); }
  .seulement-moyen, .cote .tiroir-fermer { display: grid; }
  .cote { position: absolute; z-index: 30; top: 0; right: 0; bottom: 0; width: min(360px, 92vw); transform: translate3d(104%, 0, 0); transition: transform .4s cubic-bezier(.2, .7, .2, 1); box-shadow: -20px 0 60px rgba(10, 16, 60, .16); visibility: hidden; }
  .cote[data-ouvert="true"] { transform: none; visibility: visible; }
  .vue-conversation .rideau { background: rgba(10, 16, 60, .28); }
  .nav { gap: 0; }
  .nav a, .nav button { font-size: 14px; padding: 8px 9px; }
}

/* ======================= fenêtre basse : cartouches plus compacts, le panneau y gagne ======================= */
@media (max-height: 800px) {
  .colonne { top: 76px; }
  .cartouche { padding: 11px 14px 10px; }
  .cartouche b { margin-top: 4px; font-size: 18px; }
  .ciel .coeur { --taille: 112px; }
}

/* ======================= accueil resserré (fenêtre étroite, tablette) : colonne plus fine, noms sur deux lignes ======================= */
@media (max-width: 1100px) {
  .galaxie-titre { left: 24px; }
  .galaxie-titre h1 { font-size: clamp(22px, 2.8vw, 28px); }
  .legende { display: none; }
  .colonne { right: 18px; width: 310px; }
  .panneau { padding: 24px 22px 22px; }
  .ciel .coeur { --taille: clamp(92px, 11vw, 124px); }
  .ciel .coeur { --o2: .3; --b2: 1.3; --o3: .46; --b3: 1.48; }
  .ciel .coeur > .coeur-nom { top: calc(50% + 19px); font-size: 10px; }
  .ciel .coeur-noyau { width: 12px; height: 12px; margin: -6px; }
  .etoile { --g: clamp(42px, 5vw, 54px); }
  .etoile[data-type="theme"] { --g: clamp(30px, 3.6vw, 38px); }
  .etoile-nom { max-width: clamp(108px, 14vw, 150px); font-size: 10px; letter-spacing: .18em; padding-left: .18em; white-space: normal; text-align: center; line-height: 1.45; }
  .vue-galaxie .demande-zone { width: min(750px, calc(100% - 36px)); }
}

/* ======================= en-tête en menu, conversation sur une colonne ======================= */
@media (max-width: 860px) {
  :root { --entete: 56px; }
  .entete { padding: 0 8px 0 18px; }
  .marque { font-size: 23px; }
  .entete .entete-menu { display: grid; color: #fff; }
  html[data-jour="1"] .entete .entete-menu { color: var(--jour-encre); }
  .nav { position: fixed; left: 8px; right: 8px; top: calc(var(--entete) + 2px); transform: none; display: none; flex-direction: column; gap: 0; padding: 8px; border-radius: 18px; border: 1px solid var(--filet-2); background: rgba(10, 15, 54, .97); box-shadow: 0 24px 60px rgba(0, 0, 0, .4); }
  .nav[data-ouvert="true"] { display: flex; animation: panneau-entre .3s ease; }
  .nav a, .nav button { padding: 13px 14px; font-size: 15px; text-align: left; color: var(--encre) !important; }
  .nav [aria-current="page"] { text-decoration: none; background: rgba(120, 150, 255, .16); }
  .galaxie-titre { top: calc(var(--entete) + 8px); }
  .colonne { top: calc(var(--entete) + 8px); }

  .demande { min-height: 54px; gap: 6px; padding: 5px 5px 5px 16px; }
  .demande-modele select { max-width: 76px; font-size: 12px; }
  .rond { width: 42px; height: 42px; }
  .colonne { bottom: 100px; }

  .vue-conversation { grid-template-columns: minmax(0, 1fr); }
  .seulement-etroit, .equipe .tiroir-fermer { display: grid; }
  .equipe { position: absolute; z-index: 30; top: 0; left: 0; bottom: 0; width: min(310px, 88vw); transform: translate3d(-104%, 0, 0); transition: transform .4s cubic-bezier(.2, .7, .2, 1); box-shadow: 20px 0 60px rgba(10, 16, 60, .16); visibility: hidden; }
  .equipe[data-ouvert="true"] { transform: none; visibility: visible; }
  .fil-tete { min-height: 58px; padding: 8px 8px; gap: 6px; }
  .fil-etat { display: none; }
  .messages { padding: 20px 14px 14px; gap: 20px; }
  .message.utilisateur { max-width: 88%; }
  .message.reponse { max-width: 100%; }
  .vue-conversation .demande-zone { padding: 6px 10px calc(12px + env(safe-area-inset-bottom)); }
  .page { padding: 26px 18px 48px; }
}

/* ======================= téléphone : accueil empilé, version allégée, mêmes interactions ======================= */
@media (max-width: 760px) {
  .galaxie-titre { left: 18px; right: 18px; top: calc(var(--entete) + 6px); }
  .galaxie-titre h1 { font-size: 21px; }
  .ciel .coeur { --taille: 86px; }
  .ciel .coeur > .coeur-nom { top: calc(50% + 17px); font-size: 9px; }
  .etoile { --g: 42px; }
  .etoile[data-type="theme"] { --g: 30px; }
  .etoile-nom { max-width: 108px; font-size: 9px; }
  .n3, .n4 { display: none; }
  .ciel.a-choix { transform: none; }

  .colonne { display: contents; }
  .cartouches { position: absolute; z-index: 5; left: 10px; right: 10px; top: calc(var(--entete) + 42px); margin: 0; grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .cartouche { padding: 9px 9px 8px; border-radius: 12px; }
  .cartouche .surtitre { display: block; font-size: 8.5px; letter-spacing: .1em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cartouche b { margin-top: 3px; font-size: 14px; }
  .cartouche:hover { transform: none; }
  /* le détail s'ouvre sous les cartouches, sans les couvrir ni couvrir la barre ; interface.js règle sa distance au haut */
  .panneau { position: absolute; z-index: 30; left: 10px; right: 10px; top: 160px; margin: 0; padding: 22px 20px 20px; border-radius: 20px; background: linear-gradient(180deg, rgba(17, 25, 82, .98), rgba(9, 14, 54, .98)); -webkit-backdrop-filter: none; backdrop-filter: none; animation: feuille-monte .45s cubic-bezier(.2, .7, .2, 1); }
  @keyframes feuille-monte { from { transform: translate3d(0, -18px, 0); opacity: 0; } to { transform: none; opacity: 1; } }
  .rideau { z-index: 4; }

  .vue-galaxie .demande-zone { left: 10px; right: 10px; bottom: calc(12px + env(safe-area-inset-bottom)); width: auto; transform: none; }
  .vue-galaxie .demande { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(12, 18, 60, .92); }
}

/* ======================= réduire les animations : rien ne bouge, les états restent lisibles ======================= */
html[data-mouvement="reduit"] *, html[data-mouvement="reduit"] *::before, html[data-mouvement="reduit"] *::after { animation: none !important; transition: none !important; }
html[data-mouvement="reduit"] .ciel, html[data-mouvement="reduit"] .ciel-plan { transform: none !important; }
html[data-mouvement="reduit"] .coeur[data-etat="ecoute"] .o1 { transform: scale(1.24); opacity: .9; }
html[data-mouvement="reduit"] .coeur[data-etat="reflexion"] .coeur-orbite { transform: rotate(48deg); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .ciel, .ciel-plan { transform: none !important; }
}

/* ======================= v1 : application (chat réel, voix Talk, marquage de démonstration) ======================= */
.network-state { position: fixed; left: 50%; top: 8px; transform: translateX(-50%); z-index: 70; max-width: min(560px, calc(100% - 24px)); padding: 8px 14px; border-radius: 12px; background: #fff; color: #121633; font-size: 13px; box-shadow: 0 8px 28px rgba(0, 0, 0, .3); }

/* Marquage « Données de démonstration » : visible et discret. Sombre sur le ciel, clair sur les pages blanches. */
.demo-marque { display: inline-flex; align-items: center; gap: 7px; margin-top: 10px; font-size: 10.5px; line-height: 1.2; letter-spacing: .16em; text-transform: uppercase; color: #98a4d2; font-weight: 500; }
.demo-marque::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--or); flex: none; }
html[data-jour="1"] .demo-marque { color: #6a728f; }
.demo-titre .demo-marque { margin-top: 5px; }
.demo-liste .demo-marque, .demo-volet .demo-marque { margin: 0 8px 8px; }
.demo-volet { padding: 10px 18px 0; }
.demo-volet:empty, .demo-liste:empty { display: none; }
.compte { font-size: 12.5px; color: var(--encre-2); white-space: nowrap; }
.entete .compte { position: absolute; right: 42px; }
html[data-jour="1"] .entete .compte { color: var(--jour-encre-2); }
.compte-lateral { padding: 0 8px 12px; font-size: 12px; color: var(--jour-encre-2); white-space: normal; }
.compte:empty { display: none; }
@media (max-width: 1320px) { .entete .compte { display: none; } }

/* historique des conversations, nouvelle conversation */
.equipe-v1 .agents { flex: 0 1 auto; max-height: 40%; }
.fils-zone { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; margin-top: 14px; }
.fils { flex: 1; min-height: 0; overflow: auto; display: grid; align-content: start; gap: 2px; scrollbar-width: thin; }
.fil-lien { width: 100%; padding: 9px 10px; border: 0; border-radius: 10px; background: none; text-align: left; font-size: 13.5px; color: var(--jour-encre); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fil-lien:hover { background: #f1f3fa; }
.fil-lien[aria-current="true"] { background: var(--jour-doux); font-weight: 600; }
.fils-vide { padding: 4px 10px 8px; font-size: 12.5px; color: var(--jour-encre-2); }
.nouvelle-conv { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 10px 12px; border: 1px solid #dde1ee; border-radius: 12px; background: #fff; color: #2a336b; font-size: 13.5px; font-weight: 600; min-height: 44px; }
.nouvelle-conv:hover { border-color: var(--jour-bleu); background: #f6f8ff; }

/* état de Jarvis, messages en échec, validation en attente, appels vocaux gardés */
.fil-etat[data-etat="hors-ligne"] { color: #a1344f; }
.hors-ligne { margin: 0; padding: 10px 28px; background: #fdf3f5; color: #8a2a40; font-size: 13px; border-bottom: 1px solid #f3d3da; }
.echec { align-self: flex-end; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; max-width: 78%; font-size: 13px; color: #a1344f; }
.reessayer { min-height: 36px; padding: 6px 14px; border: 1px solid #e3b6c1; border-radius: 999px; background: #fff; color: #8a2a40; font-size: 13px; }
.reessayer:hover { background: #fdf3f5; }
.attente-validation { align-self: center; max-width: 560px; padding: 12px 16px; border: 1px solid #ecd9a8; border-radius: 14px; background: #fffaf0; color: #5a4614; font-size: 13.5px; line-height: 1.5; }
.attente-validation a { color: #2f4bd8; font-weight: 600; }
.appel-vocal { align-self: center; width: min(560px, 100%); border: 1px solid var(--jour-filet); border-radius: 14px; background: var(--jour-2); font-size: 13.5px; }
.appel-vocal summary { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 14px; cursor: pointer; color: var(--jour-encre-2); list-style: none; }
.appel-vocal summary::-webkit-details-marker { display: none; }
.appel-vocal summary small { margin-left: auto; font-size: 11.5px; }
.appel-vocal .ic { width: 18px; height: 18px; }
.appel-corps { padding: 4px 14px 12px; display: grid; gap: 6px; }
.ligne-appel { font-size: 13.5px; line-height: 1.5; color: var(--jour-encre); overflow-wrap: anywhere; }
.ligne-appel b { margin-right: 4px; font-weight: 600; }
.ligne-appel.lui b { color: var(--jour-bleu); }

/* bandeau de la conversation vocale : état réel (connexion, écoute, parole, micro coupé, erreur), transcription, micro coupé */
.voix-bandeau { position: fixed; left: 50%; bottom: 104px; transform: translateX(-50%); z-index: 25; width: min(560px, calc(100% - 28px)); padding: 10px 14px; border-radius: 20px; border: 1px solid var(--filet-2); background: rgba(14, 20, 66, .9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: var(--encre); }
html[data-jour="1"] .voix-bandeau { background: #fff; border-color: #dde1ee; color: var(--jour-encre); box-shadow: 0 8px 28px rgba(20, 30, 90, .1); -webkit-backdrop-filter: none; backdrop-filter: none; }
.voix-ligne { display: flex; align-items: center; gap: 10px; min-height: 36px; }
.voix-point { width: 9px; height: 9px; border-radius: 50%; background: var(--bleu-vif); flex: none; }
.voix-bandeau[data-etat="reflexion"] .voix-point { background: var(--or); animation: attente 1.3s ease-in-out infinite; }
.voix-bandeau[data-etat="ecoute"] .voix-point { background: var(--bleu-vif); animation: attente 2.4s ease-in-out infinite; }
.voix-bandeau[data-etat="parole"] .voix-point { background: var(--rose); animation: attente 1.1s ease-in-out infinite; }
.voix-bandeau[data-etat="erreur"] .voix-point { background: #e8708f; }
.voix-etat { flex: 1; min-width: 0; font-size: 14px; }
.voix-texte { margin-top: 6px; max-height: 96px; overflow: auto; display: grid; gap: 4px; scrollbar-width: thin; }
.voix-bandeau .ligne-appel { color: inherit; font-size: 13px; }
.voix-bandeau .ligne-appel.lui b { color: var(--bleu-vif); }
html[data-jour="1"] .voix-bandeau .ligne-appel.lui b { color: var(--jour-bleu); }
.voix-bandeau .ligne-appel.en-cours { opacity: .75; }
.voix-note { margin-top: 6px; font-size: 12.5px; color: var(--encre-2); }
html[data-jour="1"] .voix-note { color: var(--jour-encre-2); }
.voix-bandeau .rond-nu { color: inherit; width: 36px; height: 36px; }
.voix-bandeau .rond-nu[aria-pressed="true"] { background: rgba(150, 176, 255, .28); border-color: var(--bleu-vif); }
@media (max-width: 860px) { .voix-bandeau { bottom: 84px; } }
@media (max-width: 760px) {
  .cartouches { top: calc(var(--entete) + 66px); }
  .demo-titre .demo-marque { margin-top: 3px; font-size: 9.5px; letter-spacing: .12em; }
}
