/* Jauge — modèle canonique ; son emploi : canon_gauge.md. */

@layer components {
    .gauge {
        display: block;
        width: var(--gauge-width, 100%);
        height: var(--gauge-height, 8px);
        overflow: hidden;
    }
    .gauge-level {
        display: block;
        width: calc(var(--gauge-value, 0) * 100%);
        height: 100%;
    }

    .gauge {
        border-radius: var(--gauge-radius, var(--canon-radius-pill));
        background-color: var(--gauge-track, var(--canon-theme-highlight));
    }
    .gauge-level {
        border-radius: inherit;
        background-color: var(--gauge-color, var(--canon-theme-action));
    }
}

/* Part locale — les réglages que l'app pose sur cet objet, contexte par contexte. */

@layer components {
    /* Les jauges d'Exavoris : fines, au rayon de la jauge ou en pilule ; la couleur d'une note suit sa
       valeur, celle d'un moteur de valorisation reste atténuée. */
    .analysis-score-track {
        --gauge-width: 64px;
        --gauge-height: 7px;
        --gauge-radius: var(--local-radius-gauge);
    }
    .analysis-gauge-bar {
        --gauge-radius: var(--local-radius-gauge);
    }
    .valuation-driver-bar {
        --gauge-height: 6px;
        --gauge-color: var(--canon-theme-muted);
    }
    .profile-bar {
        --gauge-height: 7px;
    }
    /* La ligne d'une note, et les crans d'un point de suivi : chaque cran est une jauge, pleine ou vide. */
    .scoring-row-track {
        --gauge-height: 8px;
        --gauge-radius: var(--local-radius-gauge);
    }
    .analysis-point-notch {
        --gauge-width: 9px;
        --gauge-height: 14px;
        --gauge-radius: var(--local-radius-swatch);
    }
}
