/*  ═══════════════════════════════════════════════════════════════════════════════════════════════
    PRÉCISION DE VOS PRÉVISIONS (2026-10-11, prévision glissante) : la vue « Précision » du Reporting (préfixe `pg-`).

    Posée DANS `.rep-root` : elle reprend les cartes et les jetons du module (`rep-card`, `--rep-*`), qui suivent déjà les styles
    Moderne / Mat / Papier et les thèmes clair / sombre. Rien ici n'invente une couleur : tout se tire des jetons du module.
    ⚠️ Toute modification ici doit bumper le `?v=` de prevision-glissante.css dans index.html.
    ═══════════════════════════════════════════════════════════════════════════════════════════════ */

.pg { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

/* ── L'en-tête : le constat, et le geste ─────────────────────────────────────────────────────── */
.pg-tete { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; gap: 26px; align-items: start; }
.pg-tete-t { min-width: 0; }
.pg-figer { padding: 16px; border-radius: var(--rep-r-carte); border: 1px solid var(--rep-hair); background: var(--rep-tint-2); }
.pg-figer-s { margin: 6px 0 0; font-size: 12px; line-height: 1.45; color: var(--rep-sub); overflow-wrap: anywhere; }
.pg-figer-r { display: flex; gap: 8px; margin-top: 10px; }
.pg-figer-i {
    flex: 1; min-width: 0; height: 42px; padding: 0 12px;
    border-radius: 11px; border: 1px solid var(--rep-hair); background: var(--rep-tint);
    color: var(--rep-ink); font: 500 13px var(--font-family);
}
.pg-figer-i::placeholder { color: var(--rep-dim); }
.pg-figer-i:focus-visible { outline: 2px solid var(--rep-accent); outline-offset: 1px; }
.rep-cta.pg-figer-b { margin-top: 0; flex-shrink: 0; padding: 0 16px; }
.rep-cta.pg-figer-b:disabled { opacity: .6; cursor: default; }
.pg-figer-m { margin: 9px 0 0; font-size: 12px; line-height: 1.45; color: var(--rep-ink); }
.pg-figer-n { margin: 9px 0 0; font-size: 11px; line-height: 1.45; color: var(--rep-dim); }

/* ── L'éventail ──────────────────────────────────────────────────────────────────────────────── */
.pg-ev .rep-card-h, .pg-hor .rep-card-h, .pg-vers .rep-card-h, .pg-det .rep-card-h { margin-bottom: 10px; }
.pg-seg { flex-shrink: 0; }
.pg-ev-g { min-height: 10rem; }
.pg-ev-r { fill: none; stroke: var(--rep-accent); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; pointer-events: none; }
.pg-ev-pt { fill: var(--rep-accent); pointer-events: none; }
.pg-ev-v {
    fill: none; stroke: var(--rep-sub); stroke-width: 1.3; stroke-dasharray: 4 3; stroke-linejoin: round;
    opacity: var(--a, .6); pointer-events: none;
}
.pg-ev-v.is-der { stroke: var(--rep-ink); stroke-width: 1.8; }
.pg-ev-v.is-sel { stroke: var(--rep-warn); stroke-width: 2.2; opacity: 1; }
.pg-ev-0 { stroke: color-mix(in srgb, var(--rep-ink) 30%, transparent); stroke-width: 1; }
.pg-ev-fr { opacity: .8; }
.pg-ev-x { margin-top: 6px; white-space: nowrap; }
.pg-ev-x span { overflow: visible; }
.pg-ev-x span.is-fr { color: var(--rep-accent); font-weight: 700; }
.pg-ev-ech { margin-top: 6px; font-size: 10.5px; color: var(--rep-dim); text-align: right; font-variant-numeric: tabular-nums; }
.rep-leg i.pg-leg-r { width: 15px; height: 2.4px; border-radius: 0; background: var(--rep-accent); }
.rep-leg i.pg-leg-v { width: 15px; height: 0; border-radius: 0; background: transparent; border-top: 1.5px dashed var(--rep-sub); }
.rep-leg i.pg-leg-f { background: transparent; border-left: 1.5px dashed var(--rep-accent); width: 0; height: 10px; border-radius: 0; }

/* ── Les tableaux ────────────────────────────────────────────────────────────────────────────── */
/*  Défilement horizontal DANS la carte, jamais de la page : à 375 px, un tableau de six colonnes glisse sous le doigt. */
.pg-tab-w { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 0 4px; }
.pg-tab { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.pg-tab th {
    padding: 8px 10px; text-align: right; white-space: nowrap;
    font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--rep-dim);
    border-bottom: 1px solid var(--rep-hair);
}
.pg-tab td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--rep-hair); color: var(--rep-ink); vertical-align: top; }
.pg-tab tbody tr:last-child > td { border-bottom: 0; }
.pg-tab th:first-child, .pg-tab td:first-child { text-align: left; }
.pg-tab .pg-nd { color: var(--rep-dim); font-style: italic; }
.pg-h-l { font-weight: 700; white-space: nowrap; }
.pg-h-s { display: block; margin-top: 2px; font-size: 10.5px; color: var(--rep-dim); white-space: nowrap; }

.pg-tab-v td { vertical-align: middle; }
.pg-v.is-on > td { background: var(--rep-tint-2); }
.pg-v.is-autre { opacity: .55; }
.pg-v-n { min-width: 15rem; }
.pg-v-b {
    display: flex; flex-direction: column; gap: 2px; padding: 0; border: 0; background: none; cursor: pointer;
    text-align: left; color: var(--rep-ink); font: inherit;
}
.pg-v-b b { font-size: 13px; }
.pg-v-b i { font-style: normal; font-size: 11px; color: var(--rep-dim); }
.pg-v-b:hover b, .pg-v-b:focus-visible b { color: var(--rep-accent); }
.pg-v-b:focus-visible { outline: 2px solid var(--rep-accent); outline-offset: 2px; border-radius: 4px; }
.pg-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.pg-badge {
    display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px;
    border: 1px solid var(--rep-hair); background: var(--rep-tint); font-size: 10.5px; color: var(--rep-sub); white-space: nowrap;
}
.pg-badge.is-warn { border-color: color-mix(in srgb, var(--rep-warn) 40%, transparent); color: var(--rep-warn); }
.pg-v-m, .pg-v-s { white-space: nowrap; color: var(--rep-sub); }
.pg-v-x { width: 1%; white-space: nowrap; }
.pg-x {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 32px; height: 32px; padding: 0 8px;
    border-radius: var(--rep-r-ctrl); border: 1px solid var(--rep-hair); background: transparent; color: var(--rep-dim); cursor: pointer;
    font: 600 12px var(--font-family);
}
.pg-x:hover { color: var(--rep-ink); background: var(--rep-tint); }
.pg-x.is-conf { color: var(--rep-bad); border-color: color-mix(in srgb, var(--rep-bad) 45%, transparent); }

/* ── Le détail d'une version ─────────────────────────────────────────────────────────────────── */
.pg-h3 { margin: 16px 0 6px; font: 700 13px/1.3 var(--font-family); color: var(--rep-ink); }
.pg-alerte { display: flex; gap: 7px; align-items: baseline; margin: 0 0 8px; font-size: 12px; line-height: 1.5; color: var(--rep-warn); }
.pg-p-s { display: block; font-style: normal; font-size: 10.5px; color: var(--rep-dim); }
.pg-tab-m td, .pg-tab-m th { white-space: nowrap; }
.pg-m-g > td { padding-top: 12px; font-weight: 700; color: var(--rep-ink); text-align: left !important; border-bottom: 0; }
.pg-m-l { color: var(--rep-dim); }
.pg-m-e > td { color: var(--rep-sub); }
.pg-hyp { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--rep-sub); }

.pg-methode { margin: 2px 0 0; font-size: 11.5px; line-height: 1.55; color: var(--rep-dim); }

/* ── 2026-10-13 : la question, l'exemple de démonstration, le principe en trois temps ──────────── */
.pg-q { margin: 6px 0 0; font: 600 14px/1.4 var(--font-family); color: var(--rep-sub); }
.pg-ex-tag {
    display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 3px 10px; border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--rep-warn) 45%, transparent);
    background: color-mix(in srgb, var(--rep-warn) 10%, transparent);
    color: var(--rep-warn); font: 700 11px/1.3 var(--font-family); letter-spacing: .04em; text-transform: uppercase;
}
.pg-ex-tag + .rep-t { margin-top: 8px; }
.pg-ex-note {
    margin: 12px 0 0; padding: 10px 12px; border-radius: var(--rep-r-ctrl);
    border-left: 3px solid color-mix(in srgb, var(--rep-warn) 60%, transparent); background: var(--rep-tint);
    font-size: 12px; line-height: 1.55; color: var(--rep-sub);
}
.pg-lien {
    display: inline; margin-left: 6px; padding: 0; border: 0; background: none; cursor: pointer;
    color: var(--rep-accent); font: 700 12px var(--font-family); text-decoration: underline; text-underline-offset: 2px;
}
.pg-lien:focus-visible { outline: 2px solid var(--rep-accent); outline-offset: 2px; border-radius: 3px; }
.pg-etapes { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pg-etapes li {
    display: flex; gap: 9px; align-items: flex-start; padding: 10px 12px; border-radius: var(--rep-r-ctrl);
    border: 1px solid var(--rep-hair); background: var(--rep-tint); font-size: 12px; line-height: 1.45; color: var(--rep-sub);
}
.pg-etapes b {
    flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%;
    background: color-mix(in srgb, var(--rep-accent) 16%, transparent); color: var(--rep-accent); font: 800 11px/1 var(--font-family);
}
.rep-cta2.pg-ex-b { margin-top: 12px; }
.pg-badge.is-ex { border-color: color-mix(in srgb, var(--rep-warn) 40%, transparent); color: var(--rep-warn); }

/* ── La zone comparée et la lecture sous le graphique ───────────────────────────────────────── */
.pg-ev-z { fill: color-mix(in srgb, var(--rep-accent) 7%, transparent); pointer-events: none; }
.rep-leg i.pg-leg-z { width: 13px; height: 11px; border-radius: 2px; background: color-mix(in srgb, var(--rep-accent) 16%, transparent); }
.pg-lec { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.pg-lec-b {
    display: grid; grid-template-columns: 18px minmax(9rem, auto) minmax(0, 1fr) auto; align-items: baseline; gap: 4px 10px;
    width: 100%; padding: 7px 10px; border: 1px solid transparent; border-radius: var(--rep-r-ctrl); background: var(--rep-tint);
    color: var(--rep-ink); font: 500 12.5px/1.45 var(--font-family); text-align: left; cursor: pointer; font-variant-numeric: tabular-nums;
}
.pg-lec-b:hover { border-color: var(--rep-hair); }
.pg-lec-b.is-on { border-color: color-mix(in srgb, var(--rep-warn) 45%, transparent); background: var(--rep-tint-2); }
.pg-lec-b:focus-visible { outline: 2px solid var(--rep-accent); outline-offset: 1px; }
.pg-lec-sw { align-self: center; width: 18px; height: 0; border-top: 1.5px dashed var(--rep-sub); opacity: var(--a, .6); }
.pg-lec-sw.is-der { border-top: 2px dashed var(--rep-ink); }
.pg-lec-sw.is-sel { border-top: 2.2px dashed var(--rep-warn); opacity: 1; }
.pg-lec-n { font-weight: 700; white-space: nowrap; }
.pg-lec-t { min-width: 0; color: var(--rep-sub); }
.pg-lec-e { white-space: nowrap; color: var(--rep-sub); text-align: right; }
.pg-lec-e b { color: var(--rep-ink); font-weight: 800; }
.pg-lec-e b.is-ok { color: var(--rep-ok); }
.pg-lec-e b.is-bad { color: var(--rep-bad); }

/* ── Écrans étroits ──────────────────────────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
    .pg-tete { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
    .pg-figer-r { flex-direction: column; }
    .pg-figer-i { flex: none; width: 100%; }
    .rep-cta.pg-figer-b { width: 100%; }
    .pg-ev .rep-card-h .rep-leg { font-size: 10.5px; }
    .pg-v-n { min-width: 12rem; }
    .pg-etapes { grid-template-columns: minmax(0, 1fr); }
    .pg-lec-b { grid-template-columns: 18px minmax(0, 1fr) auto; }
    .pg-lec-e { grid-column: 3; grid-row: 1; }
    .pg-lec-t { grid-column: 2 / -1; grid-row: 2; }
}
/*  320 px : la barre du Reporting range ses vues sur deux colonnes ; la cinquième (« Précision ») prend toute la ligne. */
@media (max-width: 359px) {
    .rep-ctrl > .rep-seg .iku-seg-b:nth-child(5) { grid-column: 1 / -1; }
}
