/* La vue Analytique du back-office (assets/analytique.js, 21/11/2026) ; ses deux vues sont dans la barre du haut (menu.js).
   Couleurs des données : palette de référence de la skill dataviz, validée sur le fond des cartes #151513. */
.page-an { --serie-1: #3987e5; --serie-2: #d95926; --serie-3: #199e70; --bon-texte: #5fd59a; --perte: #ec835a; --surface: #151513; }
.an-filtres { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.an-dates { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--doux); font-size: 13.5px; }
.an-dates label { display: inline-flex; align-items: center; gap: 6px; }
.an-dates input { min-height: 34px; padding: 0 10px; border: 1px solid var(--trait); border-radius: 999px; background: var(--fond-2); color: var(--texte); font: 500 13.5px var(--corps); color-scheme: dark; }
.an-filtres select, .an-methode select { min-height: 34px; padding: 0 12px; border: 1px solid var(--trait); border-radius: 999px; background: var(--fond-2); color: var(--texte); font: 500 13.5px var(--corps); }
.an-methode { display: flex; justify-content: flex-end; margin: 4px 0 -4px; }
.an-methode select { min-width: 220px; }
#an-contenu { display: grid; gap: 28px; transition: opacity .2s; }
#an-contenu.charge { opacity: .5; }

.an-tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: 10px; }
.an-tuile { display: grid; gap: 6px; align-content: start; padding: 16px 18px; border: 0; border-radius: 12px; background: var(--fond-2); box-shadow: 0 0 0 1px var(--trait) inset; color: var(--texte); text-align: left; font: inherit; cursor: pointer; }
.an-tuile:hover { background: var(--carte); }
.an-tuile[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--papier) inset; }
.an-tuile.avenir { cursor: default; opacity: .55; }
.an-tuile-nom { font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--doux); font-weight: 600; }
.an-tuile-taux { font: 600 34px/1.1 var(--corps); }
.an-tuile-sous { color: var(--doux); font-size: 13px; }
.an-tuile-pied { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 8px; margin-top: 4px; min-width: 0; }
.an-bientot { color: var(--sourd); font-size: 13px; }
.an-spark { width: 120px; max-width: 100%; height: 32px; flex: 0 1 120px; }
.an-spark path { fill: none; stroke: var(--sourd); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.an-spark circle { fill: var(--serie-1); stroke: var(--fond-2); stroke-width: 2; }
.an-delta { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.an-delta svg { width: 10px; height: 10px; fill: currentColor; }
.an-delta.haut { color: var(--bon-texte); }
.an-delta.bas { color: #f0a99a; }
.an-delta.neutre { color: var(--sourd); font-weight: 500; }

.an-bloc { padding: 20px 22px; border-radius: 14px; background: var(--fond-2); box-shadow: 0 0 0 1px var(--trait) inset; }
.an-titre { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.an-titre h2 { margin: 0; font-size: 22px; }
.an-titre small { color: var(--sourd); font-size: 13px; }
.an-choix-etape { display: inline-flex; align-items: center; gap: 8px; color: var(--doux); font-size: 13px; }
.an-choix-etape select { min-height: 32px; padding: 0 10px; border: 1px solid var(--trait); border-radius: 999px; background: var(--carte); color: var(--texte); font: 500 13.5px var(--corps); }

.an-entonnoir { list-style: none; margin: 0; padding: 0; display: grid; }
.an-entonnoir li { display: grid; grid-template-columns: minmax(150px, 1.3fr) minmax(120px, 2fr) 64px 64px minmax(150px, 1.2fr); align-items: center; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--trait); font-size: 14px; }
.an-entonnoir li:last-child { border-bottom: 0; }
.an-etape-nom { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.an-entonnoir li.principal .an-etape-nom { font-weight: 600; }
.an-entonnoir li.secondaire { padding: 5px 0; font-size: 13px; color: var(--doux); }
.an-entonnoir li.secondaire .an-etape-nom { padding-left: 18px; }
.an-entonnoir li.secondaire .an-etape-barre { height: 10px; }
.an-entonnoir li.secondaire .an-etape-barre i { opacity: .55; }
.an-entonnoir li.secondaire .an-etape-n { font-weight: 500; }
.an-pastille { padding: 1px 8px; border-radius: 999px; background: var(--carte-2); color: var(--doux); font: 600 11px/1.6 var(--corps); font-style: normal; }
.an-etape-barre { height: 18px; }
.an-etape-barre i { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--serie-1); }
.an-etape-n, .an-etape-part { text-align: right; font-variant-numeric: tabular-nums; }
.an-etape-n { font-weight: 600; }
.an-etape-part { color: var(--doux); }
.an-etape-suite { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--sourd); font-size: 12.5px; }
.an-perte { display: inline-flex; align-items: center; gap: 4px; color: var(--perte); font-weight: 600; font-size: 12px; }
.an-perte svg, .an-verdict svg { width: 14px; height: 14px; fill: currentColor; flex: none; }

.an-courbe { position: relative; }
.an-courbe svg { display: block; width: 100%; height: auto; }
.an-grille { stroke: var(--trait); stroke-width: 1; }
.an-axe { fill: var(--sourd); font: 11px var(--corps); }
.an-legende { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--doux); font-size: 13px; }
.an-legende span { display: inline-flex; align-items: center; gap: 7px; }
.an-legende i { width: 10px; height: 10px; border-radius: 3px; }
.an-cle-visites, .an-vol-visites { background: #4a4944; fill: #4a4944; }
.an-cle-etape { background: var(--serie-1); }
.an-vol-etape { fill: var(--serie-1); }
.an-vol-survol { fill: rgba(255,255,255,.07); }
.an-trace { fill: none; stroke: var(--serie-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.an-point { fill: var(--serie-1); stroke: var(--surface); stroke-width: 2; }
.an-reticule { stroke: var(--doux); stroke-width: 1; }
.an-curseur { fill: var(--serie-1); stroke: var(--surface); stroke-width: 2; }
.an-bulle { position: absolute; top: 0; display: grid; gap: 1px; min-width: 140px; padding: 8px 12px; border-radius: 10px; background: var(--carte-2); box-shadow: 0 6px 24px rgba(0,0,0,.45); pointer-events: none; font-size: 12.5px; }
.an-bulle b { font-size: 16px; }
.an-bulle small { color: var(--doux); }
.an-donnees summary { cursor: pointer; color: var(--sourd); font-size: 13px; }
.an-donnees table { margin-top: 8px; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.an-donnees th, .an-donnees td { padding: 4px 14px 4px 0; text-align: right; border-bottom: 1px solid var(--trait); }
.an-donnees th:first-child, .an-donnees td:first-child { text-align: left; }
.an-donnees th { color: var(--sourd); font-weight: 600; }

.an-deux { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 28px; align-items: start; }
.an-reticule[hidden], .an-curseur[hidden] { display: none; }
.an-mesures { display: grid; align-content: start; }
.an-mesure { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(80px, 1.4fr) 58px 72px; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--trait); font-size: 14px; }
.an-mesure:last-child { border-bottom: 0; }
.an-mesure-barre { height: 8px; border-radius: 4px; background: var(--carte-2); overflow: hidden; }
.an-mesure-barre i { display: block; height: 100%; border-radius: 4px; background: var(--serie-1); }
.an-mesure b { text-align: right; font-variant-numeric: tabular-nums; }
.an-mesure small { text-align: right; color: var(--sourd); font-variant-numeric: tabular-nums; }

.an-test { display: grid; gap: 12px; padding: 16px 0; border-top: 1px solid var(--trait); }
.an-titre + .an-test { border-top: 0; padding-top: 4px; }
.an-test header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.an-test h3 { margin: 0; font: 600 17px var(--corps); }
.an-test header small { flex-basis: 100%; color: var(--sourd); font-size: 13px; }
.an-statut { padding: 1px 9px; border-radius: 999px; background: var(--carte-2); color: var(--doux); font-size: 12px; font-weight: 600; }
.an-statut.actif { background: rgba(12,163,12,.16); color: var(--bon-texte); }
.an-variantes { display: grid; }
.an-variante { display: grid; grid-template-columns: minmax(160px, 1.6fr) minmax(140px, 2fr) 70px 60px 66px 70px 96px; align-items: center; gap: 12px; padding: 7px 0; font-size: 14px; }
.an-variante.entete { color: var(--sourd); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.an-variante.entete span:nth-child(n+3) { text-align: right; }
.an-variante-nom { display: flex; align-items: center; gap: 8px; min-width: 0; }
.an-cle { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.an-variante-axe { position: relative; height: 18px; border-radius: 4px; background: var(--carte); }
.an-ic { position: absolute; top: 7px; height: 4px; border-radius: 2px; opacity: .5; }
.an-pt { position: absolute; top: 4px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; box-shadow: 0 0 0 2px var(--surface); }
.an-num { text-align: right; font-variant-numeric: tabular-nums; color: var(--doux); }
.an-num.fort { color: var(--texte); font-weight: 600; }
.an-verdict { display: flex; align-items: flex-start; gap: 8px; margin: 0; color: var(--doux); font-size: 14px; }
.an-verdict.bon { color: var(--bon-texte); }
.an-verdict.mauvais { color: #f0a99a; }

@media (max-width: 760px) {
  .an-entonnoir li { grid-template-columns: 1fr 56px 56px; gap: 4px 10px; }
  .an-etape-nom, .an-etape-suite { grid-column: 1 / -1; }
  .an-variante { grid-template-columns: 1fr 64px 64px; gap: 4px 10px; }
  .an-variante.entete { display: none; }
  .an-variante-nom, .an-variante-axe { grid-column: 1 / -1; }
  .an-variante > .an-num:nth-child(3), .an-variante > .an-num:nth-child(4), .an-variante > .an-num:nth-child(6) { display: none; }
  .an-mesure { grid-template-columns: 1fr 56px 64px; }
  .an-mesure-barre { grid-column: 1 / -1; grid-row: 2; }
}
