/* Score de vigilance : le cadran, la courbe, la console du comportement, la protection autour du compte.
   Même langage que la page Alertes (bandeau sur le dégradé de marque), jetons du design system seulement.
   Le calcul est dans js/vigilance-score.js (assemblage) et moteur/vigilance.py (comportement). */

.vg {
  --vg-sur: var(--signal-sur);
  --vg-correct: var(--action-focus);
  --vg-vigilance: var(--signal-vigilance);
  --vg-critique: var(--signal-critique);
  --vg-neutre: var(--signal-neutre);
  --vg-largeur: var(--largeur-bandeau);
}

/* ═════════════════════════ Bandeau : le cadran, la phrase, la courbe ═════════════════════════ */
.vg-hero {
  --accent: 150, 140, 230;
  --arc: #ddd8fa;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "cadran texte" "courbe courbe";
  gap: var(--space-md) var(--space-lg);
  align-items: center;
  max-width: var(--vg-largeur);
  margin: 0 auto var(--space-xl);
  padding: var(--space-lg) var(--space-lg) var(--space-md);
  border-radius: var(--radius-xl);
  color: var(--on-dark);
  background:
    radial-gradient(70% 120% at 100% 0%, rgba(var(--accent), .5) 0%, rgba(0, 0, 0, 0) 62%),
    radial-gradient(rgba(255, 255, 255, .12) 1px, rgba(255, 255, 255, 0) 1.6px) 0 0 / 22px 22px,
    var(--degrade-marque);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 28px 56px -28px rgba(25, 20, 62, .66);
  transition: background .6s var(--ease-standard);
}
.vg-hero[data-niveau="optimale"]     { --accent: 30, 166, 124;  --arc: #93f2d2; }
.vg-hero[data-niveau="elevee"]       { --accent: 38, 160, 172;  --arc: #8ee9ef; }
.vg-hero[data-niveau="correcte"]     { --accent: 150, 140, 230; --arc: #e1dcfb; }
.vg-hero[data-niveau="renforcer"]    { --accent: 224, 152, 40;  --arc: #ffd698; }
.vg-hero[data-niveau="insuffisante"] { --accent: 232, 74, 110;  --arc: #ffa9bf; }
.vg-hero[data-niveau="chargement"], .vg-hero[data-niveau="attente"], .vg-hero[data-niveau="aucun"] { --accent: 150, 150, 175; --arc: #d9d4f7; }

/* Le cadran : des graduations qui s'allument jusqu'à la valeur, un anneau qui se trace, le chiffre qui monte. */
.vg-cadran { grid-area: cadran; position: relative; width: 176px; height: 176px; display: grid; place-items: center; }
.vg-cadran::before {
  content: ""; position: absolute; inset: 4px; border-radius: 50%; z-index: -1;   /* halo en dégradé doux : pas de filtre flou */
  background: radial-gradient(closest-side, rgba(var(--accent), .34), rgba(var(--accent), 0));
}
.vg-cadran__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.vg-cadran__graduations line { stroke: rgba(255, 255, 255, .2); stroke-width: 2.2; stroke-linecap: round; transition: stroke .5s var(--ease-standard); }
.vg-cadran__graduations line.is-allumee { stroke: var(--arc); }
.vg-cadran__anneau { transform: rotate(-90deg); transform-origin: 110px 110px; }
.vg-cadran__piste { fill: none; stroke: rgba(255, 255, 255, .14); stroke-width: 12; }
.vg-cadran__arc {
  fill: none; stroke: var(--arc); stroke-width: 12; stroke-linecap: round;
  stroke-dasharray: 578; stroke-dashoffset: 578;
  transition: stroke-dashoffset 1.5s cubic-bezier(.22, .8, .24, 1), stroke .5s var(--ease-standard);
}
/* La lueur de l'arc : le même cercle, plus large et translucide. Un filtre SVG (drop-shadow) recalculé à chaque image
   pendant le tracé de l'arc et l'allumage des 60 graduations faisait planter Safari sur iPhone. */
.vg-cadran__lueur {
  fill: none; stroke: var(--arc); stroke-width: 24; stroke-linecap: round; opacity: .22;
  stroke-dasharray: 578; stroke-dashoffset: 578;
  transition: stroke-dashoffset 1.5s cubic-bezier(.22, .8, .24, 1), stroke .5s var(--ease-standard);
}
.vg-cadran.is-trace .vg-cadran__lueur { stroke-dashoffset: calc(578 * (1 - var(--score, 0) / 100)); }
.vg-cadran.is-trace .vg-cadran__arc { stroke-dashoffset: calc(578 * (1 - var(--score, 0) / 100)); }
.vg-cadran__centre { position: relative; display: grid; justify-items: center; gap: 2px; text-align: center; }
.vg-cadran__valeur { font-family: var(--font-display); font-size: 52px; font-weight: 700; line-height: 1; letter-spacing: -2px; font-variant-numeric: tabular-nums; }
.vg-cadran__sur { font-size: 13px; color: var(--on-dark-muted); letter-spacing: .04em; }
.vg-cadran__variation { margin-top: 4px; padding: 2px 9px; border-radius: var(--radius-pill); font-size: 12.5px; font-weight: 700; background: rgba(255, 255, 255, .16); font-variant-numeric: tabular-nums; }
.vg-cadran__variation[hidden] { display: none; }
.vg-cadran__variation--hausse { color: #aef5da; }
.vg-cadran__variation--baisse { color: #ffd0a8; }

.vg-hero__texte { grid-area: texte; display: grid; gap: 8px; min-width: 0; }
.vg-hero__oeil { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark-muted); }
.vg-hero__titre { margin: 0; font-family: var(--font-display); font-size: clamp(22px, 2.6vw, 30px); font-weight: 600; line-height: 1.1; letter-spacing: -.5px; text-wrap: balance; }
.vg-hero__sous { margin: 0; font-size: 15px; line-height: 1.5; color: rgba(255, 255, 255, .92); max-width: 38em; text-wrap: pretty; }
.vg-puces { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.vg-puces li { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: var(--radius-pill); background: rgba(255, 255, 255, .15); border: 1px solid rgba(255, 255, 255, .16); font-size: 12.5px; font-weight: 600; }
.vg-puces li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.vg-puces .vg-p--sur::before { color: #62e0b8; }
.vg-puces .vg-p--attention::before { color: #ffc766; }
.vg-puces .vg-p--neutre::before { color: #c9c4f2; }

/* La courbe : le comportement du compte dans le temps, avec sa fenêtre d'analyse. */
.vg-hero__courbe { grid-area: courbe; display: grid; gap: 6px; padding: 10px 14px 8px; border-radius: var(--radius-lg); background: rgba(25, 20, 62, .28); border: 1px solid rgba(255, 255, 255, .13); }
.vg-courbe__tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.vg-courbe__titre { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .03em; color: rgba(255, 255, 255, .92); }
.vg-periode[hidden] { display: none; }
.vg-periode { display: inline-flex; padding: 3px; border-radius: var(--radius-pill); background: rgba(255, 255, 255, .13); }
.vg-periode button { appearance: none; border: 0; background: transparent; color: rgba(255, 255, 255, .86); font: inherit; font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: var(--radius-pill); cursor: pointer; transition: background var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard); }
.vg-periode button[aria-pressed="true"] { background: #fff; color: var(--action-focus); }
.vg-courbe { position: relative; height: 76px; touch-action: none; cursor: crosshair; }
.vg-courbe svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.vg-courbe__grille { stroke: rgba(255, 255, 255, .12); stroke-width: 1; stroke-dasharray: 2 5; }
.vg-courbe__ligne { fill: none; stroke: var(--arc); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.vg-courbe__point { fill: #fff; stroke: var(--arc); stroke-width: 2.4; }
.vg-courbe__repere { stroke: var(--arc); stroke-width: 2; stroke-dasharray: 3 6; stroke-linecap: round; opacity: .8; }
.vg-courbe__curseur { stroke: rgba(255, 255, 255, .55); stroke-width: 1; }
.vg-courbe__bulle { position: absolute; transform: translate(-50%, -100%); pointer-events: none; padding: 4px 9px; border-radius: 9px; background: #fff; color: var(--brand-1); font-size: 12px; font-weight: 700; white-space: nowrap; box-shadow: 0 8px 18px -8px rgba(25, 20, 62, .6); opacity: 0; transition: opacity .12s; }
.vg-courbe__bulle.is-visible { opacity: 1; }
.vg-courbe__vide { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font-size: 14px; color: rgba(255, 255, 255, .88); padding: 0 12px; }
.vg-courbe__legende { margin: 0; font-size: 12.5px; color: var(--on-dark-muted); display: flex; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; }
.vg-courbe__legende span:nth-child(2) { order: 3; flex-basis: 100%; }

/* ═════════════════════════ Sections ═════════════════════════ */
.vg-section { max-width: var(--vg-largeur); margin: 0 auto var(--space-xl); }
.vg-section__tete { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-md); flex-wrap: wrap; margin-bottom: var(--space-md); }
.vg-section__titre { margin: 0; font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: -.2px; color: var(--brand-1); }
.vg-section__note { margin: 0; font-size: 14px; color: var(--ink-muted-48); max-width: 36em; }

/* ═════════════════════════ La console du comportement ═════════════════════════ */
.vg-console {
  position: relative;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  border-radius: var(--radius-xl);
  background:
    repeating-linear-gradient(0deg, rgba(94, 83, 152, .045) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, rgba(94, 83, 152, .045) 0 1px, transparent 1px 28px),
    linear-gradient(180deg, #fff 0%, #f7f5fe 100%);
  box-shadow: 0 28px 56px -34px rgba(66, 55, 122, .6), 0 0 0 1px rgba(94, 83, 152, .12);
  overflow: hidden;
}
.vg-console::before {            /* un filet de dégradé de marque en tête, comme une barre de statut */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; z-index: 2;
  background: linear-gradient(90deg, var(--brand-3), var(--brand-5) 55%, var(--brand-6));
}
.vg-console--vide { grid-template-columns: 1fr; }
.vg-console--vide .vg-liste { display: none; }
.vg-liste { display: grid; align-content: start; gap: 6px; padding: 18px 12px 14px; border-right: 1px solid rgba(94, 83, 152, .12); background: rgba(255, 255, 255, .5); }
.vg-ligne {
  --couleur: var(--vg-neutre);
  appearance: none; border: 0; background: transparent; font: inherit; color: inherit; text-align: left; cursor: pointer;
  position: relative;
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 16px;
  transition: background var(--dur-fast) var(--ease-standard), box-shadow var(--dur-fast) var(--ease-standard);
}
.vg-ligne[data-etat="sur"]       { --couleur: var(--vg-sur); }
.vg-ligne[data-etat="vigilance"] { --couleur: var(--vg-vigilance); }
.vg-ligne[data-etat="critique"]  { --couleur: var(--vg-critique); }
.vg-ligne:hover { background: rgba(94, 83, 152, .07); }
.vg-ligne[aria-selected="true"] { background: #fff; box-shadow: 0 10px 26px -14px rgba(66, 55, 122, .55), 0 0 0 1px color-mix(in srgb, var(--couleur) 38%, transparent), 0 0 22px -6px color-mix(in srgb, var(--couleur) 45%, transparent); }
.vg-ligne:focus-visible { outline: 2px solid var(--action-focus); outline-offset: 2px; }
.vg-ligne__icone { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--couleur); background: color-mix(in srgb, var(--couleur) 12%, #fff); }
.vg-ligne__nom { display: block; font-size: 15px; font-weight: 600; color: var(--brand-1); line-height: 1.2; }
.vg-ligne__barre { display: block; height: 4px; margin-top: 8px; border-radius: 4px; background: rgba(94, 83, 152, .12); overflow: hidden; }
.vg-ligne__barre i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--couleur); box-shadow: 0 0 8px color-mix(in srgb, var(--couleur) 70%, transparent); transition: width 1s cubic-bezier(.22, .8, .24, 1); transition-delay: calc(var(--i, 0) * 80ms + 200ms); }
.vg.is-trace .vg-ligne__barre i { width: var(--part, 0%); }
.vg-ligne__pts { font-family: var(--font-display); font-size: 19px; font-weight: 700; color: var(--brand-1); letter-spacing: -.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vg-ligne__pts small { font-family: var(--font-body, inherit); font-size: 12px; font-weight: 500; color: var(--ink-muted-48); letter-spacing: 0; }
.vg-liste__pied { margin: 8px 6px 0; padding-top: 12px; border-top: 1px dashed rgba(94, 83, 152, .22); display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--ink-muted-80); }
.vg-liste__pied b { font-family: var(--font-display); font-size: 17px; color: var(--brand-1); font-variant-numeric: tabular-nums; }

.vg-detail { --couleur: var(--vg-neutre); padding: 26px 28px 24px; display: grid; align-content: start; gap: 18px; min-width: 0; }
.vg-detail[data-etat="sur"]       { --couleur: var(--vg-sur); }
.vg-detail[data-etat="vigilance"] { --couleur: var(--vg-vigilance); }
.vg-detail[data-etat="critique"]  { --couleur: var(--vg-critique); }
.vg-detail.is-change { animation: vg-entree .45s var(--ease-standard); }
@keyframes vg-entree { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.vg-detail__tete { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.vg-detail__titre { margin: 0 0 6px; font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted-48); }
.vg-detail__resume { margin: 0; font-family: var(--font-display); font-size: 23px; font-weight: 600; line-height: 1.2; letter-spacing: -.3px; color: var(--brand-1); text-wrap: balance; }
.vg-detail__pts { flex: none; text-align: right; font-family: var(--font-display); font-size: 40px; font-weight: 700; line-height: 1; letter-spacing: -1.5px; color: var(--couleur); font-variant-numeric: tabular-nums; }
.vg-detail__pts small { display: block; margin-top: 4px; font-size: 12px; font-weight: 600; letter-spacing: 0; color: var(--ink-muted-48); }
.vg-lignes { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.vg-lignes li { position: relative; padding-left: 18px; font-size: 15px; line-height: 1.5; color: var(--ink-muted-80); }
.vg-lignes li::before { content: ""; position: absolute; left: 0; top: .6em; width: 7px; height: 7px; border-radius: 2px; transform: rotate(45deg); background: var(--couleur); opacity: .7; }

/* Les petits graphiques : l'habitude d'un côté, ce qui vient de se passer de l'autre. */
.vg-visuel { display: grid; gap: 14px; padding: 16px 18px; border-radius: 16px; background: rgba(94, 83, 152, .05); border: 1px solid rgba(94, 83, 152, .1); }
.vg-visuel__legende { margin: 0; font-size: 12.5px; font-weight: 600; letter-spacing: .04em; color: var(--ink-muted-48); text-transform: uppercase; }
.vg-jauge { display: grid; gap: 6px; }
.vg-jauge__tete { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--ink-muted-80); }
.vg-jauge__tete b { color: var(--brand-1); font-variant-numeric: tabular-nums; }
.vg-jauge__rail { position: relative; height: 12px; border-radius: 12px; background: rgba(94, 83, 152, .12); }
.vg-jauge__habituel, .vg-jauge__actuel { position: absolute; inset: 0 auto 0 0; border-radius: inherit; width: 0; transition: width 1s cubic-bezier(.22, .8, .24, 1) .2s; }
.vg-jauge__habituel { z-index: 1; top: 3px; bottom: 3px; border-radius: 6px; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .85); background: repeating-linear-gradient(45deg, rgba(94, 83, 152, .32) 0 5px, rgba(94, 83, 152, .2) 5px 10px); }
.vg-jauge__actuel { background: linear-gradient(90deg, color-mix(in srgb, var(--couleur) 55%, #fff), var(--couleur)); box-shadow: 0 0 12px -2px color-mix(in srgb, var(--couleur) 70%, transparent); }
.vg-jauge__actuel.is-calme { background: linear-gradient(90deg, #c9c3e6, var(--vg-correct)); box-shadow: none; }
.vg.is-trace .vg-jauge__habituel { width: var(--h, 0%); }
.vg.is-trace .vg-jauge__actuel { width: var(--a, 0%); }
.vg-jauge__repere { z-index: 2; position: absolute; top: -5px; bottom: -5px; width: 2px; background: var(--brand-1); border-radius: 2px; left: var(--h, 0%); opacity: 0; transition: opacity .4s .9s; }
.vg.is-trace .vg-jauge__repere { opacity: .55; }
.vg-compteurs { display: flex; gap: 12px; flex-wrap: wrap; }
.vg-compteur { flex: 1 1 140px; display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px solid rgba(94, 83, 152, .12); }
.vg-compteur b { font-family: var(--font-display); font-size: 30px; line-height: 1; letter-spacing: -1px; color: var(--brand-1); font-variant-numeric: tabular-nums; }
.vg-compteur--accent b { color: var(--couleur); }
.vg-compteur span { font-size: 13px; color: var(--ink-muted-80); }

/* Les opérations concernées : une frise, pas un relevé. */
.vg-ops__titre { margin: 0 0 8px; font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted-48); }
.vg-ops { list-style: none; margin: 0; padding: 0 0 0 18px; position: relative; display: grid; gap: 10px; }
.vg-ops::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: linear-gradient(180deg, var(--couleur), rgba(94, 83, 152, .12)); }
.vg-op { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 14px; padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px solid rgba(94, 83, 152, .12); box-shadow: 0 8px 18px -16px rgba(66, 55, 122, .6); }
.vg-op::before { content: ""; position: absolute; left: -18px; top: 18px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--couleur); box-shadow: 0 0 10px -1px color-mix(in srgb, var(--couleur) 60%, transparent); }
.vg-op__nom { font-size: 15px; font-weight: 600; color: var(--brand-1); overflow-wrap: anywhere; }
.vg-op__montant { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--brand-1); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.vg-op__meta { grid-column: 1 / -1; font-size: 13px; color: var(--ink-muted-80); line-height: 1.45; }
.vg-op__meta time { font-weight: 600; color: var(--ink-muted-48); }
.vg-ops__vide { margin: 0; padding: 12px 14px; border-radius: 14px; background: rgba(18, 135, 111, .07); color: var(--ink-muted-80); font-size: 14px; }
.vg-ref { margin: 0; font-size: 13px; color: var(--ink-muted-48); line-height: 1.5; }

/* ═════════════════════════ La protection autour du compte ═════════════════════════ */
.vg-prochain { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 var(--space-md); padding: 12px 16px; border-radius: var(--radius-lg); background: linear-gradient(90deg, rgba(94, 83, 152, .1), rgba(94, 83, 152, .03)); border: 1px solid rgba(94, 83, 152, .16); font-size: 15px; color: var(--ink); }
.vg-prochain[hidden] { display: none; }
.vg-prochain b { color: var(--brand-1); }
.vg-prochain__plus { padding: 3px 10px; border-radius: var(--radius-pill); background: var(--action-focus); color: #fff; font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.vg-prochain a { margin-left: auto; color: var(--action-focus); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.vg-prochain a:hover { text-decoration: underline; }

.vg-protection { list-style: none; margin: 0; padding: 0; border-radius: var(--radius-xl); background: #fff; box-shadow: 0 18px 40px -30px rgba(66, 55, 122, .55), 0 0 0 1px rgba(94, 83, 152, .12); overflow: hidden; }
.vg-pro { --couleur: var(--vg-neutre); display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 4px 16px; padding: 18px 22px; }
.vg-pro + .vg-pro { border-top: 1px solid rgba(94, 83, 152, .1); }
.vg-pro[data-etat="sur"]       { --couleur: var(--vg-sur); }
.vg-pro[data-etat="vigilance"] { --couleur: var(--vg-vigilance); }
.vg-pro[data-etat="critique"]  { --couleur: var(--vg-critique); }
.vg-pro__etat { grid-row: 1 / span 2; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--couleur); background: color-mix(in srgb, var(--couleur) 12%, #fff); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--couleur) 30%, transparent); }
.vg-pro__nom { margin: 0; font-size: 16px; font-weight: 600; color: var(--brand-1); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vg-pro__puce { padding: 1px 9px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; color: var(--couleur); background: color-mix(in srgb, var(--couleur) 11%, #fff); }
.vg-pro__resume { margin: 0; font-size: 14px; color: var(--ink-muted-80); line-height: 1.45; }
.vg-pro__pts { grid-row: 1 / span 2; grid-column: 3; display: grid; justify-items: end; gap: 6px; font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--brand-1); letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.vg-pro__pts small { font-family: var(--font-body, inherit); font-size: 12px; font-weight: 500; color: var(--ink-muted-48); letter-spacing: 0; }
.vg-pro__mini { width: 74px; height: 4px; border-radius: 4px; background: rgba(94, 83, 152, .12); overflow: hidden; }
.vg-pro__mini i { display: block; height: 100%; width: 0; background: var(--couleur); border-radius: inherit; transition: width 1s cubic-bezier(.22, .8, .24, 1) .3s; }
.vg.is-trace .vg-pro__mini i { width: var(--part, 0%); }
.vg-pro__details { grid-column: 2 / 4; margin-top: 6px; }
.vg-pro__details summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--action-focus); list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.vg-pro__details summary::-webkit-details-marker { display: none; }
.vg-pro__details summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform var(--dur-fast) var(--ease-standard); }
.vg-pro__details[open] summary::after { transform: rotate(-135deg); }
.vg-pro__details ul { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.vg-pro__details li { position: relative; padding-left: 16px; font-size: 14px; line-height: 1.45; color: var(--ink-muted-80); }
.vg-pro__details li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--couleur); opacity: .6; }
.vg-pro__action { grid-column: 2 / 4; justify-self: start; margin-top: 8px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: var(--radius-pill); border: 1.5px solid var(--action-focus); color: var(--action-focus); font-size: 14px; font-weight: 600; text-decoration: none; transition: background var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard); }
.vg-pro__action:hover { background: var(--action-focus); color: #fff; }

/* ═════════════════════════ À venir ═════════════════════════ */
.vg-avenir { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-md); }
.vg-futur { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-content: start; padding: 18px 20px; border-radius: var(--radius-lg); border: 1.5px dashed var(--action-tint-strong); background: rgba(255, 255, 255, .55); }
.vg-futur__icone { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--ink-muted-48); background: var(--action-tint); }
.vg-futur__nom { margin: 0 0 4px; font-size: 15px; font-weight: 600; color: var(--brand-1); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vg-futur__etiquette { padding: 1px 9px; border-radius: var(--radius-pill); background: var(--action-tint); color: var(--action-focus); font-size: 12px; font-weight: 600; }
.vg-futur p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink-muted-80); }
.vg-futur a { color: var(--action-focus); font-weight: 600; font-size: 14px; text-decoration: none; display: inline-block; margin-top: 8px; }
.vg-futur a:hover { text-decoration: underline; }

/* ═════════════════════════ Comment le score est calculé ═════════════════════════ */

/* Mode démonstration : les quatre situations */
.vg-scenes { margin-left: 8px; }
.vg-scenes a { color: #fff; text-decoration: underline; margin-left: 10px; font-weight: 600; }
.vg-scenes a[aria-current="true"] { text-decoration: none; opacity: .75; }

/* ═════════════════════════ Petits écrans ═════════════════════════ */
@media (max-width: 900px) {
  .vg-console { grid-template-columns: 1fr; }
  .vg-liste { border-right: 0; border-bottom: 1px solid rgba(94, 83, 152, .12); }
}
@media (max-width: 620px) {
  .vg-hero { grid-template-columns: 1fr; grid-template-areas: "cadran" "texte" "courbe"; justify-items: center; text-align: center; padding: var(--space-lg) var(--space-md); }
  .vg-hero__texte { justify-items: center; }
  .vg-puces { justify-content: center; }
  .vg-hero__courbe { width: 100%; text-align: left; }
  .vg-cadran { width: 168px; height: 168px; }
  .vg-cadran__valeur { font-size: 50px; }
}
@media (max-width: 700px) {
  .vg-avenir { grid-template-columns: 1fr; }
  .vg-detail { padding: 20px 18px; }
  .vg-detail__resume { font-size: 20px; }
  .vg-detail__pts { font-size: 34px; }
  .vg-pro { padding: 16px; grid-template-columns: 40px minmax(0, 1fr) auto; }
  .vg-pro__etat { width: 40px; height: 40px; }
  .vg-pro__details, .vg-pro__action { grid-column: 1 / -1; }
  .vg-prochain a { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .vg-cadran__arc, .vg-cadran__lueur, .vg-ligne__barre i, .vg-jauge__habituel, .vg-jauge__actuel, .vg-pro__mini i { transition: none; }
  .vg-detail.is-change { animation: none; }
}
