/* Module Analyse MCR. Classes préfixées « analyse- ».
   Couleurs : uniquement les jetons de app.css (thèmes clair et sombre).
   L'orange porte toujours un texte bleu foncé (--on-accent). */

/* Date de l'instantané : bien visible en tête de chaque page. */
.analyse-date {
  display: inline-block; margin: 6px 0 0; padding: 4px 12px; border-radius: var(--radius-md);
  background: var(--accent); color: var(--on-accent); font-size: 0.95rem;
}
.analyse-date strong { font-weight: 700; }
.analyse-date .badge { margin-left: 6px; }
.analyse-onglets { margin-top: 4px; }

/* Filtres */
.analyse-filtres .analyse-societes { flex: 1 1 100%; border: 0; margin: 0; padding: 0; min-width: 0; }
.analyse-filtres .analyse-societes legend { font-size: 0.8rem; font-weight: 600; padding: 0; margin-bottom: 4px; }
.analyse-choix-societes { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.analyse-choix { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; cursor: pointer; }
.analyse-periode { margin: -6px 0 16px; }

/* Tuiles */
.analyse-tuiles .tuile-valeur { font-size: 1.55rem; }

/* Sections */
.analyse-section-entete h2 { font-size: 1.1rem; }
.analyse-bascule .btn { white-space: nowrap; }
.analyse-description { margin-top: -4px; }
.analyse-note { margin: 8px 0 12px; font-size: 0.88rem; }
.analyse-export { margin: 8px 0 0; }
.analyse-donnees { margin-top: 12px; }
.analyse-donnees > summary { cursor: pointer; font-weight: 600; font-size: 0.9rem; color: var(--text-2); }
.analyse-donnees[open] > summary { margin-bottom: 8px; }
.analyse-tableau { max-height: 520px; margin-bottom: 0; }
.analyse-negatif { color: var(--err-tx); }
.analyse-total > * { font-weight: 700; border-top: 2px solid var(--border); }
.analyse-pied { margin-top: 24px; }
.analyse-partie { margin: 28px 0 10px; font-size: 1.15rem; }
.analyse-definition h3 { margin-top: 0; }
.analyse-liste { margin: 0; padding-left: 20px; color: var(--text-2); }
.analyse-liste li { margin-bottom: 6px; }

/* Graphiques : défilement horizontal dans leur carte sur petit écran, jamais la page. */
.analyse-defilement { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.analyse-defilement > .graphique { min-width: 640px; }
/* Carte de chaleur : taille naturelle (texte à 11 px), défilement dans la carte
   si elle est plus large ; jamais réduite au point d'être illisible sur téléphone. */
.analyse-defilement > .graphique.analyse-chaleur { min-width: 0; max-width: none; width: auto; }
.graphique .analyse-zone { fill: transparent; }
.graphique .analyse-zone:hover, .graphique g:hover > .analyse-zone { fill: var(--selection); }

/* Lignes (jusqu'à quatre séries) */
.graphique .analyse-ligne { fill: none; stroke-width: 2; stroke: var(--action); }
.graphique .analyse-ligne-2 { stroke: var(--accent); }
.graphique .analyse-ligne-3 { stroke: var(--info); stroke-dasharray: 5 3; }
.graphique .analyse-ligne-4 { stroke: var(--ok); stroke-width: 2.5; }
.graphique .analyse-point { fill: var(--surface); stroke-width: 2; stroke: var(--action); }
.graphique .analyse-point-2 { stroke: var(--accent); }
.graphique .analyse-point-3 { stroke: var(--info); }
.graphique .analyse-point-4 { stroke: var(--ok); }
.legende-pastille.analyse-pastille-1 { background: var(--action); }
.legende-pastille.analyse-pastille-2 { background: var(--accent); }
.legende-pastille.analyse-pastille-3 { background: var(--info); }
.legende-pastille.analyse-pastille-4 { background: var(--ok); }

/* Carte de chaleur : valeur lisible sur les cases claires et foncées. */
.graphique .analyse-chaleur-texte { fill: var(--text); font-size: 11px; font-weight: 600; }
.graphique .analyse-chaleur-texte.analyse-chaleur-fort { fill: var(--on-action); }

@media (max-width: 720px) {
  .analyse-date { font-size: 0.9rem; }
  .analyse-bascule { width: 100%; }
  .analyse-tuiles .tuile-valeur { font-size: 1.35rem; }
}

@media print {
  .analyse-onglets, .analyse-export, .analyse-bascule { display: none !important; }
  .analyse-donnees { display: block; }
}
