/* Graphiques du Bilan (GraphiqueView.swift) et globe de l'accueil (GlobeView). Variables : jetons.css (relevé 01 § 6). */

/* ---------- bloc ---------- */
.ak-graph-bloc { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.ak-graph-jours, .ak-graph-heures { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ak-graph-heures { gap: 8px; }
.ak-graph-vide { font: var(--graisse-normale) var(--taille-note)/var(--interligne) var(--police-sans); color: var(--couleur-texte-3); }

/* ---------- légende ---------- */
.ak-graph-legende { display: flex; flex-wrap: wrap; gap: 16px; font: var(--graisse-normale) var(--taille-legende)/var(--interligne) var(--police-sans);
  color: var(--couleur-texte-2); }
.ak-graph-legende__item { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.ak-graph-legende__echantillon { display: inline-block; width: 16px; height: 4px; border-radius: 2px; }
.ak-graph-legende__echantillon--ca { background: var(--couleur-teinte); }
.ak-graph-legende__echantillon--marge { background: var(--couleur-alerte); }

/* ---------- zone et tracé ---------- */
.ak-graph-zone { position: relative; width: 100%; touch-action: pan-y; -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent; outline: none; border-radius: var(--rayon-sm); }
.ak-graph-zone:focus-visible { box-shadow: 0 0 0 2px var(--couleur-teinte); }
.ak-graph-svg { display: block; overflow: visible; }
.ak-graph-axe { font-family: var(--police-sans); font-size: var(--taille-legende-2);
  fill: rgba(235, 235, 245, 0.6); /* libellés d'axe de Swift Charts : secondaryLabel du système (mesuré 157,156,162 sur la capture 03) */
  font-variant-numeric: tabular-nums; }
.ak-graph-grille { stroke: var(--couleur-filet-grille); stroke-width: 0.5; shape-rendering: crispEdges; }
.ak-graph-grille--x { stroke-dasharray: 2 2; }
.ak-graph-zero { stroke: var(--couleur-filet); stroke-width: 1; }
.ak-graph-aire-haut { stop-color: var(--couleur-teinte); stop-opacity: 0.22; }
.ak-graph-aire-bas { stop-color: var(--couleur-teinte); stop-opacity: 0.02; }
.ak-graph-ligne-ca { fill: none; stroke: var(--couleur-teinte); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ak-graph-ligne-marge { fill: none; stroke: var(--couleur-alerte); stroke-width: 1.5; stroke-dasharray: 4 3; stroke-linejoin: round; }
.ak-graph-regle { stroke: var(--couleur-texte-3); stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }
.ak-graph-barre { fill: var(--couleur-teinte); fill-opacity: 0.55; }
.ak-graph-barre--choisie { fill-opacity: 1; }

/* apparition : le tracé monte depuis l'axe avec le ressort des apps (une fois, au montage) */
.ak-graph-apparition { transform-box: view-box; animation: ak-graph-monte var(--duree-apparition, 537ms) var(--ressort, ease-out) both; }
@keyframes ak-graph-monte { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .ak-graph-apparition { animation: none; } }

/* ---------- encart du jour / de l'heure ---------- */
.ak-graph-encart { display: flex; align-items: center; gap: 8px; padding: 10px; background: var(--couleur-surface-2);
  border-radius: var(--rayon-sm); corner-shape: squircle; }
.ak-graph-encart__gauche { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.ak-graph-encart__droite { display: flex; flex-direction: column; gap: 2px; align-items: flex-end; text-align: right; }
.ak-graph-heures .ak-graph-encart { justify-content: space-between; }
.ak-graph-encart__titre { font: var(--graisse-moyenne) var(--taille-sous-titre)/var(--interligne) var(--police-sans); color: var(--couleur-texte); }
.ak-graph-encart__sous { font: var(--graisse-normale) var(--taille-legende)/var(--interligne) var(--police-sans); color: var(--couleur-texte-2); }
.ak-graph-encart__ligne { font: var(--graisse-normale) var(--taille-legende)/var(--interligne) var(--police-sans); color: var(--couleur-texte); }
.ak-graph-encart__chiffre { font: var(--graisse-moyenne) var(--taille-sous-titre)/var(--interligne) var(--police-sans);
  font-variant-numeric: tabular-nums; color: var(--couleur-texte); }
.ak-graph-chiffres { font-variant-numeric: tabular-nums; }
.ak-graph-encart__sous.ak-graph-gain { color: var(--couleur-gain); }
.ak-graph-encart__sous.ak-graph-perte { color: var(--couleur-perte); }
.ak-graph-encart__sous.ak-graph-chiffres:not(.ak-graph-gain):not(.ak-graph-perte) { color: var(--couleur-texte); }

/* bouton « bordered » d'iOS : capsule teinte à 15 %, texte teinte */
.ak-graph-bouton { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; height: 33px; padding: 0 12px;
  border: 0; border-radius: var(--rayon-capsule); background: color-mix(in srgb, var(--couleur-teinte) 15%, transparent);
  color: var(--couleur-teinte); font: var(--graisse-normale) var(--taille-sous-titre)/1 var(--police-sans); cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: background-color var(--duree-appui, 120ms); }
.ak-graph-bouton--icone { align-self: center; flex: none; height: auto; padding: 7px 11px; }
.ak-graph-bouton--icone svg { margin: 8px 0; }
.ak-graph-bouton:active { background: color-mix(in srgb, var(--couleur-teinte) 25%, transparent); }
@media (hover: hover) { .ak-graph-bouton:hover { background: color-mix(in srgb, var(--couleur-teinte) 20%, transparent); } }
.ak-graph-bouton:focus-visible { outline: 2px solid var(--couleur-teinte); outline-offset: 2px; }

/* ---------- globe de l'accueil (bilan/globe.js) ---------- */
.bi-globe { position: relative; height: var(--haut-globe, 340px); pointer-events: none; }
.bi-globe__toile { position: absolute; inset: 0; width: 100%; height: 100%; display: block; transform-origin: 50% 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 60%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0, #000 60%, transparent 100%); will-change: transform; }

/* ---------- galerie ---------- */
.ak-galerie-graph { display: flex; flex-direction: column; gap: 24px; }
.ak-galerie-graph__titre { margin: 0 0 8px 16px; font: var(--graisse-moyenne) var(--taille-intertitre)/var(--interligne) var(--police-sans);
  color: var(--couleur-texte); }
.ak-galerie-graph__carte { border-radius: var(--rayon-lg); background: rgba(40, 37, 33, 0.45);
  border: var(--trait-fin, 0.5px) solid var(--couleur-lisere-verre); }
.ak-galerie-graph__note { margin: 6px 16px 0; font: var(--graisse-normale) var(--taille-legende)/var(--interligne) var(--police-mono); color: var(--couleur-texte-3); }
