/* Composants et accueil : segment, carte du pilote, iris, lignes de bots, arrêt d'urgence, tirer pour actualiser — porté de maquettes/premium-v2/styles.css (rem, contraste, backdrop-filter limité aux onglets et aux feuilles) */
/* ——— Accueil ——— */
.barre-haut { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.barre-actions { display: flex; gap: 8px; }
.segment {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  padding: 3px;
  border-radius: 999px;
  background: rgba(157, 176, 224, .07);
  box-shadow: inset 0 0 0 1px var(--filet), inset 0 1px 2px rgba(0, 0, 0, .25);
}
.segment button {
  position: relative;
  z-index: 1;
  padding: 7px 14px;
  font-size: 0.8125rem;
  font-weight: 560;
  text-align: center;
  color: var(--brume);
  border-radius: 999px;
  transition: color .25s;
  white-space: nowrap;
}
.segment button[aria-checked="true"] { color: var(--porcelaine); }
.segment-curseur {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #24335A, #1B2746);
  box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .08), inset 0 0 0 1px rgba(255, 255, 255, .03);
  transition: transform var(--ressort-vif-d) var(--ressort-vif);
}
.bouton-rond {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  color: var(--porcelaine-2);
  font-size: 1.25rem;
  background: rgba(157, 176, 224, .07);
  box-shadow: inset 0 0 0 1px var(--filet), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.bouton-rond svg { width: 20px; height: 20px; }

.heros { margin-top: 26px; user-select: none; -webkit-user-select: none; }
.heros-label { display: flex; align-items: center; gap: 8px; color: var(--brume); font-size: 0.875rem; min-height: 21px; transition: color .2s; }
.heros.lecture .heros-label { color: var(--porcelaine-2); }
.heros-valeur {
  display: flex;
  align-items: flex-start;
  margin: 6px 0 0;
  font-size: var(--t-heros);
  font-weight: 510;
  font-stretch: 122%;
  letter-spacing: -.036em;
  line-height: 1;
  text-shadow: 0 2px 30px rgba(120, 150, 255, .12);
}
.heros-valeur .cents { font-size: 1.75rem; margin-top: 4px; letter-spacing: -.02em; color: var(--porcelaine-2); }
.heros-valeur .devise { font-size: 0.8125rem; font-weight: 600; font-stretch: 100%; letter-spacing: .01em; color: var(--brume); margin: 7px 0 0 8px; }
.simu-note { font-size: 0.75rem; color: var(--pervenche); padding: 2px 9px; border-radius: 999px; background: var(--pervenche-doux); }
.heros.simulation .heros-valeur { color: #D4DCF5; }

.od { display: inline-flex; }
.od-c {
  display: inline-block;
  height: 1em;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(transparent, #000 16%, #000 84%, transparent);
  mask-image: linear-gradient(transparent, #000 16%, #000 84%, transparent);
}
.od-r { display: flex; flex-direction: column; transform: translateY(calc(var(--n, 0) * -1em)); transition: transform var(--od-d, var(--od-lent)); transition-delay: calc(var(--k, 0) * 40ms); }
.od-r > span { height: 1em; line-height: 1; }
.od-s { display: inline-block; }

.heros-pnl { display: grid; gap: 3px; margin-top: 14px; font-size: 0.9375rem; font-weight: 560; min-height: 47px; }
.heros-pnl small { font-size: 0.8125rem; font-weight: 450; color: var(--brume); margin-left: 5px; }

.spark-hote { position: relative; margin: 16px calc(-1 * var(--gouttiere)) 0; height: 118px; touch-action: pan-y; cursor: crosshair; }
.spark-vide { height: 40px; margin: 16px 0 0; display: grid; align-items: center; }
.spark-vide span { height: 1px; background: repeating-linear-gradient(90deg, var(--filet-2) 0 4px, transparent 4px 9px); }
.graphe { overflow: visible; }
.graphe text { font-family: inherit; font-size: var(--t-axe); font-weight: 500; fill: var(--brume); font-variant-numeric: tabular-nums; }
.graphe text.fort { fill: #0A1020; font-weight: 660; font-size: 0.7188rem; }
.graphe text.clair { fill: var(--brume); }
.trait, .trait-lueur { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.tete-trait { opacity: 0; stroke: rgba(255, 255, 255, .5); stroke-width: 7; stroke-opacity: .18; }
.spark-point { transform-box: fill-box; transform-origin: center; }
.spark-halo { transform-box: fill-box; transform-origin: center; animation: halo 2.4s var(--sortie) infinite; }
@keyframes halo { from { transform: scale(.4); opacity: .55; } to { transform: scale(2.6); opacity: 0; } }
.viseur { transition: opacity .12s; pointer-events: none; }
.periodes { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 10px; }
.periodes .segment button { padding: 6px 12px; font-size: 0.7813rem; }
.periode-var { font-size: 0.8125rem; font-weight: 560; text-align: right; }

/* Carte du pilote */
.pilote-carte {
  position: relative;
  display: block;
  width: 100%;
  margin-top: 28px;
  padding: 18px 18px 16px;
  border-radius: var(--r-xl);
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(90% 60% at 14% 0%, rgba(242, 180, 90, .14), transparent 60%),
    var(--grain, none),
    linear-gradient(180deg, #17223D, #111A30);
  box-shadow: inset 0 1px 0 rgba(255, 228, 190, .08), 0 30px 60px -34px rgba(0, 0, 0, .95), 0 0 50px -30px rgba(242, 180, 90, .25);
}
.pilote-carte > *:not(.reflet), .mode > *:not(.reflet), .reprendre > *:not(.reflet), .acces-carte > *:not(.reflet) { position: relative; }
.pilote-carte > .reflet, .mode > .reflet, .reprendre > .reflet, .acces-carte > .reflet { position: absolute; }
.pc-tete { display: grid; grid-template-columns: auto 1fr auto; gap: 13px; align-items: center; }
.pc-nom { font-size: 1.0313rem; font-weight: 620; letter-spacing: -.01em; white-space: nowrap; }
.pc-etat { display: flex; align-items: center; gap: 7px; font-size: 0.8125rem; color: var(--brume); margin-top: 2px; }
.pc-valeur { text-align: right; font-size: 1.0938rem; font-weight: 560; font-stretch: 112%; letter-spacing: -.02em; }
.pc-valeur small { display: block; font-size: 0.7813rem; font-weight: 560; font-stretch: 100%; letter-spacing: 0; }
.regimes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.regime {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px 6px 9px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  background: rgba(157, 176, 224, .07);
  white-space: nowrap;
}
.regime b { font-weight: 560; }
.regime svg { width: 16px; height: 12px; }
.regime.hausse b, .regime.hausse svg { color: var(--jade); }
.regime.range b, .regime.range svg { color: var(--pervenche); }
.regime.baisse b, .regime.baisse svg { color: var(--corail); }
.regime.hausse { background: var(--jade-doux); }
.regime.range { background: var(--pervenche-doux); }
.regime.baisse { background: var(--corail-doux); }
.pc-decision { margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid var(--filet); }
.pc-pied { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; font-size: 0.7813rem; color: var(--brume); }
.pc-pied svg { width: 18px; height: 18px; }

.point-vivant { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--jade); flex: none; }
.point-vivant::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--jade); animation: halo 2.2s var(--sortie) infinite; }
.pilote-veille .point-vivant { background: var(--brume-2); }
.pilote-veille .point-vivant::after { display: none; }
.point-pause { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--brume-2); margin: 0 6px 1px 0; }
.point-ok { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--jade); margin-right: 7px; box-shadow: 0 0 0 3px var(--jade-doux); }

/* ——— L'iris du pilote ——— */
.iris { position: relative; display: inline-block; flex: none; width: var(--t); height: var(--t); }
.iris-disque { position: absolute; inset: calc((1 - var(--d)) * var(--t) / 2); border-radius: 50%; }
.iris-disque canvas, .iris-disque svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.iris-anneau { position: absolute; inset: 0; width: 100%; height: 100%; }
.iris-lueur {
  position: absolute;
  inset: calc((1 - var(--d)) * var(--t) / 2 - var(--t) * .14);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(242, 180, 90, .36), rgba(242, 180, 90, .1) 62%, transparent);
  animation: lueur 6.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes lueur { 0%, 100% { opacity: .55; transform: scale(.96); } 50% { opacity: 1; transform: scale(1.04); } }
.pilote-veille .iris-lueur { opacity: .12; animation: none; }
.iris-svg .pupille { transform-box: fill-box; transform-origin: center; animation: pupille 7s ease-in-out infinite; }
@keyframes pupille { 0%, 62%, 100% { transform: scaleX(1); } 70% { transform: scaleX(1.9); } 80% { transform: scaleX(1.75); } }
.pilote-veille .iris-svg { filter: grayscale(.8) brightness(.7); }
/* Iris endormi (états vides, accès expiré) : paupières mi-closes */
.iris.dort .iris-lueur { opacity: .14; animation: none; }
.iris.dort.repli .iris-disque { overflow: hidden; }
.iris.dort .iris-svg { filter: grayscale(.75) brightness(.72); }
.iris.dort.repli .iris-disque::before, .iris.dort.repli .iris-disque::after {
  content: "";
  position: absolute;
  left: -12%;
  right: -12%;
  z-index: 1;
  background: linear-gradient(180deg, #1A2440, #111A30);
}
.iris.dort.repli .iris-disque::before { top: -12%; height: 60%; border-radius: 0 0 50% 50% / 0 0 34% 34%; box-shadow: 0 2px 0 rgba(0, 0, 0, .45), inset 0 -2px 0 rgba(242, 180, 90, .18); }
.iris.dort.repli .iris-disque::after { bottom: -12%; height: 22%; border-radius: 50% 50% 0 0 / 40% 40% 0 0; background: linear-gradient(0deg, #1A2440, #131C33); }

/* Lignes de bots */
.lignes { border-radius: var(--r-l); overflow: hidden; }
.lignes:not(.carte) { background: var(--grain, none), var(--carte); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045), inset 0 0 0 1px var(--filet); }
.ligne-bot {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 14px;
  position: relative;
}
.ligne-bot + .ligne-bot::before { content: ""; position: absolute; top: 0; left: 64px; right: 0; height: 1px; background: var(--filet); }
.ligne-bot .chev { width: 16px; height: 16px; color: var(--brume); }
.lb-milieu { min-width: 0; }
.jeton {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.8125rem;
  font-weight: 700;
  font-stretch: 110%;
  color: var(--encre);
  flex: none;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .5), inset 0 -2px 4px rgba(0, 0, 0, .18), 0 6px 14px -8px rgba(0, 0, 0, .8);
}
.jeton.btc { background: radial-gradient(circle at 30% 25%, #FFD08A, #E79A2E 70%); }
.jeton.eth { background: radial-gradient(circle at 30% 25%, #D9DEFF, #8A97E8 70%); }
.jeton.sol { background: radial-gradient(circle at 30% 25%, #B5F5DE, #5FC3B4 70%); }
.jeton.bnb { background: radial-gradient(circle at 30% 25%, #FFE9A0, #D8AE2E 70%); }
.jeton.xrp { background: radial-gradient(circle at 30% 25%, #E6EAF2, #8E99AE 70%); }
.lb-nom { font-weight: 600; font-size: 0.9375rem; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.lb-sous { display: block; font-size: 0.7813rem; color: var(--brume); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-res { text-align: right; font-weight: 600; font-size: 0.9063rem; }
.lb-res small { display: block; font-size: 0.75rem; font-weight: 500; color: var(--brume); }
.etiquette {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7188rem;
  font-weight: 600;
  letter-spacing: .005em;
  white-space: nowrap;
}
.etiquette.reel { color: var(--jade); background: var(--jade-doux); }
.etiquette.simu { color: var(--pervenche); background: repeating-linear-gradient(-45deg, rgba(157, 176, 255, .15) 0 4px, rgba(157, 176, 255, .06) 4px 8px); }
.etiquette.pilote { color: var(--ambre); background: var(--ambre-doux); }
.voir-tout { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 10px; padding: 8px; font-size: 0.8125rem; font-weight: 560; color: var(--brume); border-radius: 12px; }
.voir-tout svg { width: 15px; height: 15px; }

/* Arrêt d'urgence (maintenir) */
.urgence {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin-top: 30px;
  padding: 15px 18px 15px 14px;
  border-radius: var(--r-l);
  overflow: hidden;
  background: rgba(255, 122, 134, .055);
  box-shadow: inset 0 0 0 1px rgba(255, 122, 134, .3), inset 0 1px 0 rgba(255, 200, 205, .05);
  isolation: isolate;
  touch-action: none;
}
.urgence-remplissage {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(255, 122, 134, .2), rgba(255, 122, 134, .42));
  transform: scaleX(0);
  transform-origin: left center;
}
.urgence-icone { position: relative; width: 44px; height: 44px; flex: none; display: grid; place-items: center; color: var(--corail); border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(255, 122, 134, .2); }
.urgence-icone > svg:not(.urgence-anneau) { width: 24px; height: 24px; }
.urgence-anneau { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.urgence-anneau circle { fill: none; stroke: var(--corail); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.urgence-texte b { display: block; font-size: 1rem; font-weight: 640; font-stretch: 106%; color: #FFB3BA; }
.urgence-texte small { display: block; font-size: 0.7813rem; color: var(--brume); margin-top: 2px; line-height: 1.4; }
.urgence.maintien .urgence-texte small { color: #FFD3D7; }
.urgence.reprise { background: var(--jade-doux); box-shadow: inset 0 0 0 1px rgba(79, 224, 166, .3); }
.urgence.reprise .urgence-icone { color: var(--jade); box-shadow: inset 0 0 0 1.5px rgba(79, 224, 166, .3); }
.urgence.reprise .urgence-texte b { color: #9FF0CC; }

/* Tirer pour actualiser */
.ptr {
  position: absolute;
  top: calc(10px + var(--haut-tg));
  left: 50%;
  width: 60px;
  height: 60px;
  margin-left: -30px;
  z-index: 2;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
}
.ptr .iris { position: absolute; left: 10px; top: 10px; }
.ptr-anneau { position: absolute; inset: 0; width: 60px; height: 60px; transform: rotate(-90deg); }
.ptr-anneau circle { fill: none; stroke: var(--ambre); stroke-width: 1.8; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; opacity: .9; }
.ptr.pret .ptr-anneau circle { stroke-dashoffset: 0; }
.ptr.charge .ptr-anneau { animation: tourne 1.1s linear infinite; }
.ptr.charge .ptr-anneau circle { stroke-dasharray: .22 .78; stroke-dashoffset: 0; }
@keyframes tourne { to { transform: rotate(270deg); } }
.ptr-lib { position: absolute; top: 66px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 0.75rem; font-weight: 560; color: var(--brume); }
.ptr.pret .ptr-lib, .ptr.charge .ptr-lib { color: var(--ambre); }


/* ——— États communs (refonte) : erreurs de lecture, champ de saisie du budget ——— */
.bandeau-erreur { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 0; padding: 10px 12px; border-radius: var(--r-m); font-size: var(--t-meta); line-height: 1.4; color: #FFC3C9; background: var(--corail-doux); box-shadow: inset 0 0 0 1px rgba(255, 122, 134, .25); }
.bandeau-erreur > svg { flex: none; width: 16px; height: 16px; margin-top: 1px; }
.bandeau-erreur span { flex: 1; }
.lien-discret { flex: none; min-height: 44px; margin: -12px -6px -12px 0; padding: 0 8px; font-weight: 600; color: var(--porcelaine); text-decoration: underline; text-underline-offset: 3px; }
.carte-erreur { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 16px; margin-top: 16px; }
.carte-erreur .ce-ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--corail); background: var(--corail-doux); }
.carte-erreur .ce-ico svg { width: 18px; height: 18px; }
.carte-erreur b { display: block; font-weight: 600; }
.carte-erreur p { margin: 4px 0 12px; color: var(--brume); font-size: var(--t-sec); }
.budget-champ { width: 7ch; min-width: 0; padding: 0; border: 0; background: none; color: var(--porcelaine); font-size: 2.375rem; font-weight: 520; font-stretch: 120%; letter-spacing: -.035em; line-height: 1.1; -moz-appearance: textfield; appearance: textfield; }
.budget-champ::-webkit-outer-spin-button, .budget-champ::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.budget-champ:focus-visible { outline: 2px solid var(--ambre); outline-offset: 4px; border-radius: 8px; }
.bloc-curseur .lib { display: block; font-weight: 600; margin-bottom: 4px; }
.regime.lecture { background: rgba(157, 176, 224, .08); }
.regime.lecture b, .regime.lecture svg { color: var(--brume); }
.jeton.autre { background: radial-gradient(circle at 30% 25%, #E6EAF2, #8E99AE 70%); }

/* ——— Accueil (refonte) : bandeaux, ce que l'app a fait seule, tout en pause, devises ——— */
.bandeau { display: flex; gap: 10px; align-items: center; margin-top: 12px; padding: 11px 14px; border-radius: var(--r-m); font-size: var(--t-meta); line-height: 1.4; color: var(--porcelaine-2); background: rgba(157, 176, 224, .07); box-shadow: inset 0 0 0 1px var(--filet); min-height: 44px; }
.bandeau > svg { width: 16px; height: 16px; flex: none; color: var(--pervenche); }
.bandeau span { flex: 1; }
.bandeau b { flex: none; font-weight: 600; color: var(--porcelaine); }
.bandeau.fin-acces { background: var(--ambre-doux); box-shadow: inset 0 0 0 1px rgba(242, 180, 90, .25); }
.bandeau.fin-acces > svg { color: var(--ambre); }
.bandeau.erreur-bots > svg { color: var(--corail); }
.activite-carte { padding: 16px 18px 4px; }
.compteur-semaine { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.compteur-semaine p { margin: 0; display: grid; gap: 2px; }
.compteur-semaine b { font-size: 1.75rem; font-weight: 560; font-stretch: 118%; letter-spacing: -.03em; line-height: 1.05; }
.compteur-semaine p:first-child b { color: var(--ambre); }
.compteur-semaine span { font-size: var(--t-meta); color: var(--brume); line-height: 1.3; }
.fil li { padding-bottom: 16px; }
.fil .voix { font-size: 1rem; }
.fil .fil-texte { margin: 0; font-size: var(--t-sec); line-height: 1.4; color: var(--porcelaine-2); }
.fil .fil-texte.alerte { color: #FFC3C9; }
.activite-carte .voir-tout { margin-top: 0; margin-bottom: 6px; width: 100%; }
.tout-pause { display: grid; gap: 12px; padding: 18px; margin-top: 16px; }
.devises { margin-top: 12px; }
.actualise { margin: 0; min-height: 32px; font-weight: 500; color: var(--brume); }
.pilote-carte.lancer .pc-pied span { color: var(--ambre); font-weight: 600; }
