/* Barometru.md – Rezultate. Tout est scopé sous .baro pour ne pas toucher au thème. */
.baro {
	--baro-neg: #c4442f;
	--baro-pos: #23845a;
	--baro-neu: #6b7280;
	--baro-same: #d6d9de;
	--baro-ink: #1f2933;
	--baro-muted: #5f6b76;
	--baro-line: #e4e7eb;
	--baro-bg: #ffffff;
	--baro-soft: #f5f6f8;
	--baro-accent: #1d4f91;
	--baro-env: #8a5a00;
	--baro-ue-weak: #cf3400;   /* mêmes couleurs que les jauges */
	--baro-ue-partial: #f6b900;
	--baro-ue-good: #7cda00;
	color: var(--baro-ink);
	font-variant-numeric: tabular-nums;
	line-height: 1.45;
	margin: 1.5rem 0;
}
.baro *, .baro *::before, .baro *::after { box-sizing: border-box; }
/* Le thème (Softek / radiantthemes-custom.css) applique « * { margin: 0 auto } » : on le neutralise dans le module.
   Les marges propres au module sont déclarées plus bas et l'emportent (même spécificité, ordre ultérieur). */
.baro *, .baro *::before, .baro *::after { margin: 0; }
.baro ul { padding: 0; list-style: none; }

/* Filtres */
.baro-filters {
	display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: flex-end;
	padding: 1rem; background: var(--baro-soft); border-radius: 10px; margin-bottom: 1rem;
}
.baro-filter { display: flex; flex-direction: column; gap: .25rem; font-size: .8rem; color: var(--baro-muted); min-width: 160px; flex: 1 1 160px; }
.baro-filter select {
	font: inherit; font-size: .95rem; color: var(--baro-ink); padding: .45rem .6rem; border: 1px solid #cfd4da;
	border-radius: 6px; background: #fff; width: 100%; max-width: 100%;
}
.baro-filters__actions { display: flex; gap: .75rem; align-items: center; }
.baro-btn { font: inherit; padding: .5rem 1rem; border: 0; border-radius: 6px; background: var(--baro-accent); color: #fff; cursor: pointer; }
.baro.js .baro-btn { display: none; }
.baro-link { color: var(--baro-accent); font-size: .9rem; }

.baro-meta { color: var(--baro-muted); font-size: .9rem; margin: .25rem 0 1rem; }
.baro-meta strong { color: var(--baro-ink); }
.baro-notice { padding: .75rem 1rem; border-radius: 8px; background: var(--baro-soft); }
.baro-notice--warn { background: #fff6e0; border-left: 4px solid #e0a100; }
.baro-h { margin: 2rem 0 .35rem; font-size: 1.25rem; }
.baro-help { color: var(--baro-muted); font-size: .9rem; margin: 0 0 1rem; max-width: 60em; }

/* Indices */
.baro-kpis { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 1rem; }
.baro-kpi { border: 1px solid var(--baro-line); border-radius: 12px; padding: 1rem 1.1rem; background: var(--baro-bg); text-align: center; }
.baro-kpi--idx_general { border-color: #c9d6ea; background: #f7f9fd; }
.baro-kpi__head { display: flex; flex-direction: column; margin-bottom: .25rem; }
.baro-kpi__label { font-weight: 700; font-size: 1rem; }
.baro-kpi__sub { color: var(--baro-muted); font-size: .8rem; }
.baro-kpi__value { font-size: 2rem; font-weight: 700; line-height: 1.1; }
.baro-kpi--idx_general .baro-kpi__value { font-size: 2.6rem; }
.baro-kpi__value small { font-size: .9rem; font-weight: 400; color: var(--baro-muted); margin-left: .15rem; }
.baro-kpi__note { margin: .5rem 0 0; font-size: .9rem; color: var(--baro-muted); }
.baro-tone--neg .baro-kpi__value, .baro-tone--neg .baro-card__value { color: var(--baro-neg); }
.baro-tone--pos .baro-kpi__value, .baro-tone--pos .baro-card__value { color: var(--baro-pos); }

/* Jauge */
.baro-gauge { display: block; margin: 0 auto; width: 150px; height: auto; overflow: visible; }
.baro-gauge--lg { width: 190px; }
.baro-gauge--sm { width: 96px; margin: 0; flex: 0 0 auto; }
.baro-gauge__track { fill: none; stroke: var(--baro-same); stroke-width: 10; stroke-linecap: round; }
.baro-gauge__zero { stroke: #9aa3ad; stroke-width: 1.5; }
.baro-gauge__fill { fill: none; stroke-width: 10; stroke-linecap: round; }
.baro-gauge__fill--neg, .baro-gauge__dot--neg { stroke: var(--baro-neg); fill: none; }
.baro-gauge__fill--pos, .baro-gauge__dot--pos { stroke: var(--baro-pos); fill: none; }
.baro-gauge__fill--neu, .baro-gauge__dot--neu { stroke: var(--baro-neu); fill: none; }
.baro-gauge__dot { fill: #fff !important; stroke-width: 3; }
.baro-gauge__tick { font-size: 7px; fill: var(--baro-muted); }
.baro-gauge--sm .baro-gauge__tick { display: none; }

/* Delta */
.baro-delta { display: inline-block; font-size: .8rem; font-weight: 600; margin-top: .15rem; }
.baro-delta--up { color: var(--baro-pos); }
.baro-delta--down { color: var(--baro-neg); }
.baro-delta--flat { color: var(--baro-neu); }
.baro-delta__ref { font-weight: 400; color: var(--baro-muted); }

/* Cartes C01–C07 */
.baro-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.baro-card { border: 1px solid var(--baro-line); border-radius: 12px; padding: 1rem; background: var(--baro-bg); display: flex; flex-direction: column; gap: .6rem; }
.baro-card__head { display: flex; gap: .6rem; align-items: baseline; }
.baro-card__code { font-size: .75rem; font-weight: 700; color: var(--baro-muted); background: var(--baro-soft); border-radius: 4px; padding: .1rem .35rem; }
.baro-card__title { margin: 0; font-size: .98rem; line-height: 1.3; font-weight: 600; }
.baro-card__score { display: flex; align-items: center; gap: .9rem; }
.baro-card__score > div { display: flex; flex-direction: column; }
.baro-card__value { font-size: 1.7rem; font-weight: 700; line-height: 1.1; }

/* Barre empilée */
.baro-stack { display: flex; height: 22px; border-radius: 6px; overflow: hidden; background: var(--baro-soft); gap: 2px; }
.baro-stack__seg { display: flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 600; color: #fff; white-space: nowrap; min-width: 0; }
.baro-stack__seg--dec { background: var(--baro-neg); }
.baro-stack__seg--same { background: var(--baro-same); color: var(--baro-ink); }
.baro-stack__seg--inc { background: var(--baro-pos); }
.baro-stack__seg--ue-weak { background: var(--baro-ue-weak); color: #fff; }
.baro-stack__seg--ue-partial { background: var(--baro-ue-partial); color: #2b2410; }
.baro-stack__seg--ue-good { background: var(--baro-ue-good); color: #1f2a10; }
.baro-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .15rem; font-size: .8rem; color: var(--baro-muted); }
.baro-legend__item i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: .4rem; vertical-align: -1px; }
.baro-legend__item strong { color: var(--baro-ink); }
.baro-legend__n { color: #8a939c; }
.baro-legend__item--dec i { background: var(--baro-neg); }
.baro-legend__item--same i { background: var(--baro-same); }
.baro-legend__item--inc i { background: var(--baro-pos); }
.baro-legend__item--ue-weak i { background: var(--baro-ue-weak); }
.baro-legend__item--ue-partial i { background: var(--baro-ue-partial); }
.baro-legend__item--ue-good i { background: var(--baro-ue-good); }

/* Évolution */
.baro-trend-wrap { border: 1px solid var(--baro-line); border-radius: 12px; padding: .75rem; background: var(--baro-bg); }
.baro-trend { width: 100%; height: auto; display: block; }
.baro-trend__grid { stroke: var(--baro-line); stroke-width: 1; }
.baro-trend__grid--zero { stroke: #9aa3ad; }
.baro-trend__tick { font-size: 11px; fill: var(--baro-muted); }
.baro-trend__line { fill: none; stroke-width: 2; stroke-linejoin: round; }
.baro-trend__line--idx_general { stroke: var(--baro-accent); stroke-width: 3; }
.baro-trend__line--idx_company { stroke: #5aa0d6; }
.baro-trend__line--idx_env { stroke: var(--baro-env); }
.baro-trend__dot { stroke: #fff; stroke-width: 2; }
.baro-trend__dot--idx_general { fill: var(--baro-accent); }
.baro-trend__dot--idx_company { fill: #5aa0d6; }
.baro-trend__dot--idx_env { fill: var(--baro-env); }
.baro-trend__label { font-size: 12px; font-weight: 600; }
.baro-trend__label--idx_general { fill: var(--baro-accent); }
.baro-trend__label--idx_company { fill: #3b7fb3; }
.baro-trend__label--idx_env { fill: var(--baro-env); }

.baro-table-wrap { overflow-x: auto; margin-top: 1rem; }
.baro-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.baro-table th, .baro-table td { padding: .45rem .5rem; border-bottom: 1px solid var(--baro-line); text-align: right; }
.baro-table td { white-space: nowrap; }
.baro-table thead th { white-space: normal; vertical-align: bottom; }
.baro-table th[scope="row"] { text-align: left; font-weight: 400; white-space: normal; min-width: 150px; }
.baro-table thead th { font-weight: 600; color: var(--baro-muted); }
.baro-table .is-current { background: #f2f6fc; font-weight: 700; }
.baro-table tr.is-index th, .baro-table tr.is-index td { font-weight: 700; border-bottom-width: 2px; }
.baro-table td.baro-tone--neg { color: var(--baro-neg); }
.baro-table td.baro-tone--pos { color: var(--baro-pos); }

/* UE */
.baro-ue__top { display: grid; grid-template-columns: minmax(220px, 1fr) 2fr; gap: 1rem; align-items: center; }
.baro-ue__levels .baro-stack { height: 30px; }
.baro-ue__levels .baro-legend { flex-direction: row; flex-wrap: wrap; gap: .25rem 1rem; margin-top: .4rem; }
.baro-bars { list-style: none; margin: 1.25rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.baro-bars li { display: grid; grid-template-columns: minmax(0, 2fr) 3fr 3.5rem; gap: .75rem; align-items: center; font-size: .9rem; }
.baro-bars__track { position: relative; height: 14px; background: var(--baro-soft); border-radius: 7px; overflow: hidden; }
.baro-bars__fill { position: absolute; inset: 0 auto 0 0; background: var(--baro-accent); border-radius: 7px; }
.baro-bars__mid { position: absolute; top: -2px; bottom: -2px; left: 50%; border-left: 2px dashed #fff; }
.baro-bars__value { font-weight: 700; text-align: right; }

.baro-source { margin-top: 1.5rem; font-size: .8rem; color: var(--baro-muted); }

@media (max-width: 760px) {
	.baro-kpis, .baro-ue__top { grid-template-columns: 1fr; }
	.baro-grid { grid-template-columns: 1fr; }
	.baro-bars li { grid-template-columns: 1fr 3rem; }
	.baro-bars__track { grid-column: 1 / -1; grid-row: 2; }
	.baro-filter { flex-basis: 100%; }
}

/* =====================================================================
   Présentation « classique » (identique à l'ancien module)
   ===================================================================== */
.baro--classic .baro-filters { background: none; padding: 0; margin-bottom: 1.5rem; gap: .75rem 1.25rem; }
.baro--classic .baro-filter { color: #275084; font-weight: 700; font-size: .85rem; }
.baro--classic .baro-filter select {
	border: 2px solid #275084; border-radius: 0; color: #275084; font-weight: 700; font-size: 16px;
	padding: 10px 14px; background-color: #fff;
}
.baro--classic .baro-btn { background: #275084; border-radius: 0; }
.baro--classic .baro-link { color: #275084; }
.baro--classic .baro-meta { text-align: center; margin-bottom: 2rem; }

.baro-cgrid { display: flex; flex-wrap: wrap; }
.baro-cgi { width: 50%; display: flex; flex-direction: column; align-items: center; margin-bottom: 70px; padding: 0 10px; }
.baro-cgi--main { width: 100%; margin-bottom: 40px; }
.baro-cgi { container-type: inline-size; }
/* La jauge reste centrée dans la colonne (comme les pastilles et le titre) ;
   le pourcentage est posé à sa droite sans la décaler. */
.baro-cgi__gauge { width: 100%; display: flex; justify-content: center; }
.baro-cgi__dial { position: relative; width: 300px; max-width: 100%; }
.baro-cgi--main .baro-cgi__dial { width: 480px; }
.baro-cg { display: block; width: 100%; height: auto; overflow: visible; }
.baro-cg__zone { fill: none; stroke-width: 25; stroke-linecap: butt; }
.baro-cg__needle, .baro-cg__hub { fill: #ccc; }
.baro-cgi__value { padding-top: 10px; text-align: center; font-size: 28px; font-weight: 700; color: #000; line-height: 1; white-space: nowrap; }
.baro-cgi--main .baro-cgi__value { font-size: 40px; }
/* Assez de largeur : chiffre à droite de la jauge, comme l'ancien module. */
@container (min-width: 520px) {
	.baro-cgi__value { position: absolute; left: 100%; top: 30%; margin-left: 16px !important; padding-top: 0; text-align: left; }
}
/* Grande jauge : le chiffre (55px) ne passe à droite qu'avec assez de place, sinon il reste dessous. */
@container (min-width: 520px) and (max-width: 999px) {
	.baro-cgi--main .baro-cgi__value { position: static; margin-left: 0 !important; padding-top: 10px; text-align: center; }
}
@container (min-width: 1000px) {
	.baro-cgi--main .baro-cgi__value { font-size: 55px; margin-left: 40px !important; top: 28%; }
}
.baro-cgi__counts { display: flex; justify-content: center; gap: 4px; margin-top: 22px !important; }
.baro-cgi__counts li { position: relative; padding: 0 10px 0 18px; font-size: 14px; color: #666; }
.baro-cgi__counts li::before, .baro-clegend li::before {
	content: ''; position: absolute; left: 0; top: 50%; margin-top: -5px !important;
	width: 10px; height: 10px; border-radius: 50%; background: #cf3400;
}
.baro-cgi__counts li.is-zero::before, .baro-clegend li.is-zero::before { background: #f6b900; }
.baro-cgi__counts li.is-pos::before, .baro-clegend li.is-pos::before { background: #7cda00; }
.baro-cgi__title { margin-top: 14px !important; padding: 0 40px; font-size: 16px; font-weight: 600; line-height: 1.6; text-align: center; text-transform: none; color: #000; }
.baro-cgi--main .baro-cgi__title { font-size: 18px; }
.baro-clegend { width: 100%; margin-bottom: 80px !important; padding: 15px; background: #f8f8f8; border: 1px solid #eee; border-radius: 4px; }
.baro-clegend ul { display: flex; }
.baro-clegend li { position: relative; width: 33.33%; padding: 0 25px 0 18px; color: #000; font-weight: 600; font-size: 14px; line-height: 1.5; }
.baro-clegend li::before { top: 4px; margin-top: 0 !important; }
.baro-clegend li + li { border-left: 1px solid #ddd; padding-left: 36px; }
.baro-clegend li + li::before { left: 18px; }

@media (max-width: 900px) {
	.baro-cgi { width: 100%; }
}
@media (max-width: 760px) {
	.baro-cgi { width: 100%; margin-bottom: 45px; }
	.baro-cgi__title { padding: 0 10px; }
	.baro-clegend ul { flex-direction: column; gap: 10px; }
	.baro-clegend li { width: 100%; }
	.baro-clegend li + li { border-left: 0; padding-left: 18px; }
	.baro-clegend li + li::before { left: 0; }
}
