/* Écran de fin du téléphone (correction-mobile.js) : transition entre deux questions + bilan Résultat · Correction · Classement.
   Palette du jeu (violet #2b1055, accent jaune #ffd23f, cartes blanches). Contrastes AA : texte blanc sur #1b7f4b / #c62f35,
   texte #1d1d2b sur fonds clairs, gris #5d5d73 sur blanc. Animations ≤ 400 ms (sauf la révélation du rang / des trophées). */

.cm {
  --or: #ffd23f; --or-fonce: #e0a800; --ok: #1b7f4b; --ko: #c62f35; --encre: #1d1d2b; --gris: #5d5d73;
  --violet: #6c2bd9; --lilas: #f4f0fb; --verre: rgba(255,255,255,.1); --verre-bord: rgba(255,255,255,.18);
  --ease: cubic-bezier(.2,.8,.2,1);
  width: 100%; text-align: left;
}
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:where(.cm) button { font: inherit; color: inherit; }
.cm :focus-visible { outline: 3px solid var(--or); outline-offset: 2px; border-radius: 8px; }
.cm .cm-main :focus-visible, .cm .cm-recap :focus-visible, .cm-q :focus-visible { outline-color: var(--violet); }
.cm .cm-hero :focus-visible, .cm .cm-tabs :focus-visible, .cm .cm-courbes :focus-visible, .cm .cm-pied :focus-visible { outline-color: var(--or); }

/* ───────────── Transition ───────────── */
#vue-transition { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.cm-trans { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; animation: cm-entree .3s var(--ease) both; }
.cm-anneau { position: relative; width: 112px; height: 112px; margin-bottom: 6px; }
.cm-anneau svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.cm-anneau .fond { fill: rgba(255,255,255,.08); stroke: rgba(255,255,255,.18); stroke-width: 5; }
.cm-anneau .trait { fill: none; stroke: var(--or); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: cm-trace .4s .05s var(--ease) forwards; }
.cm-anneau .coche { fill: none; stroke: #fff; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1;
                    transform: rotate(90deg); transform-origin: 50px 50px; animation: cm-trace .3s .3s var(--ease) forwards; }
.cm-anneau .sablier { position: absolute; inset: 0; display: none; place-items: center; font-size: 2.6rem; }
.cm-etat-temps .cm-anneau .coche { display: none; }
.cm-etat-temps .cm-anneau .trait { stroke: rgba(255,255,255,.55); }
.cm-etat-temps .cm-anneau .sablier { display: grid; animation: cm-flotte 1.8s ease-in-out infinite; }
.cm-etat-neutre .cm-anneau .coche { display: none; }
.cm-etat-neutre .cm-anneau .sablier { display: grid; }
.cm-trans-titre { font-size: 1.7rem; font-weight: 900; margin: 0; line-height: 1.15; }
.cm-trans-sous { margin: 0; max-width: 18em; color: #e6dcff; font-size: 1.02rem; line-height: 1.4; }
.cm-trans-prog { width: min(320px, 82vw); margin-top: 18px; }
.cm-trans-num { margin-top: 8px; font-size: .95rem; color: #e6dcff; font-variant-numeric: tabular-nums; }
.cm-trans-num b { color: var(--or); }
.cm-seg { display: flex; gap: 3px; height: 8px; }
.cm-seg i { flex: 1; min-width: 2px; border-radius: 4px; background: rgba(255,255,255,.2); }
.cm-seg i.fait { background: var(--or); }
.cm-seg i.actuel { background: var(--or); transform-origin: left; animation: cm-remplit .4s .1s var(--ease) both; }
.cm-points i { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: currentColor; margin: 0 1.5px; animation: cm-point 1.2s infinite; }
.cm-points i:nth-child(2) { animation-delay: .2s; } .cm-points i:nth-child(3) { animation-delay: .4s; }
@keyframes cm-trace { to { stroke-dashoffset: 0; } }
@keyframes cm-remplit { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes cm-entree { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes cm-flotte { 50% { transform: translateY(-4px) rotate(8deg); } }
@keyframes cm-point { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }

/* ───────────── Page de fin ───────────── */
#vue-correction { flex: 1; }
.cm-fin { margin: 0 -16px; width: calc(100% + 32px); padding: 0 0 8px; }
.cm-tabs {
  position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 8px 12px;
  background: rgba(43,16,85,.93); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--verre-bord);
}
.cm-tabs button {
  min-height: 46px; border: 0; border-radius: 12px; background: transparent; color: #d9ccf7; font-weight: 800; font-size: .95rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px; transition: background .2s, color .2s;
}
.cm-tabs button[aria-current] { background: var(--or); color: #2b1055; }
.cm-tabs button:not([aria-current]):active { background: var(--verre); }
.cm-main { padding: 0 16px; }
.cm-section { padding-top: 18px; scroll-margin-top: 62px; }
.cm-section + .cm-section { margin-top: 18px; border-top: 1px solid var(--verre-bord); padding-top: 26px; }
.cm-h2 { font-size: 1.15rem; font-weight: 900; margin: 26px 0 12px; letter-spacing: .01em; }
.cm-h2-grand { font-size: 1.7rem; margin: 0 0 16px; line-height: 1.1; scroll-margin-top: 70px; }
.cm-h2-grand .cm-eyebrow { display: block; margin-bottom: 4px; }
.cm-eyebrow { text-transform: uppercase; letter-spacing: .13em; font-size: .78rem; font-weight: 800; color: var(--or); }
.cm-aide-clair { margin: -6px 0 12px; color: #e6dcff; font-size: .95rem; }

.cm-btn { min-height: 52px; width: 100%; border: 0; border-radius: 14px; padding: 12px 22px; font-weight: 900; font-size: 1.1rem; cursor: pointer;
          box-shadow: 0 4px 0 rgba(0,0,0,.28); transition: transform .08s, filter .15s; }
.cm-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,.28); }
.cm-btn-or { background: var(--or); color: #2b1055; }
.cm-btn-or:hover { filter: brightness(1.05); }

/* Héros */
.cm-hero {
  position: relative; text-align: center; padding: 22px 16px 24px; border-radius: 22px; overflow: hidden;
  background: radial-gradient(120% 80% at 50% 0%, rgba(255,210,63,.28), rgba(255,210,63,0) 60%), var(--verre);
  border: 1px solid var(--verre-bord);
}
.cm-medaille {
  position: relative; width: 148px; height: 148px; margin: 14px auto 12px; border-radius: 50%; display: grid; place-content: center; text-align: center;
  background: radial-gradient(circle at 35% 28%, #fff1b0, var(--or) 45%, var(--or-fonce)); color: #2b1055;
  box-shadow: 0 0 0 6px rgba(255,210,63,.22), 0 12px 30px rgba(0,0,0,.35), inset 0 -6px 12px rgba(120,70,0,.25);
}
.cm-medaille-rang { font-size: 3.9rem; font-weight: 900; line-height: .95; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.cm-medaille-rang sup { font-size: .38em; font-weight: 800; letter-spacing: 0; vertical-align: top; position: relative; top: .35em; margin-left: 2px; }
.cm-medaille-sur { font-size: .95rem; font-weight: 800; opacity: .85; }
.cm-medaille-emoji { position: absolute; right: -10px; top: -8px; font-size: 2.2rem; filter: drop-shadow(0 3px 4px rgba(0,0,0,.35)); }
.cm-hero-titre { margin: 4px 0 6px; font-size: 1.85rem; font-weight: 900; line-height: 1.12; }
.cm-hero-titre:focus { outline: none; }
.cm-hero-sous { margin: 0 auto 14px; max-width: 22em; color: #e6dcff; font-size: 1.02rem; line-height: 1.42; }
.cm-score { display: inline-flex; align-items: baseline; gap: 6px; background: rgba(0,0,0,.28); border-radius: 999px; padding: 6px 22px 8px; font-weight: 800; }
.cm-score b { font-size: 2.3rem; font-weight: 900; color: var(--or); font-variant-numeric: tabular-nums; min-width: 2ch; }

/* Étincelles (rang 1-3) */
.cm-etincelles { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.cm-etincelles i { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 2px; opacity: 0; background: #fff; }
.cm-etincelles i:nth-child(3n) { background: #ff7b9c; } .cm-etincelles i:nth-child(3n+1) { background: #7dd3fc; } .cm-etincelles i:nth-child(3n+2) { background: #fff; }
.cm-joue .cm-etincelles i { animation: cm-etincelle .9s var(--r) 1.1s var(--ease) both; }
@keyframes cm-etincelle { 0% { opacity: 1; transform: rotate(var(--a)) translateY(0) scale(1); } 100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(-1 * var(--d))) scale(.4); } }

/* Révélation du héros (moment « wahou ») */
.cm-joue .cm-medaille { animation: cm-pop .75s .5s cubic-bezier(.2,1.5,.4,1) both; }
.cm-joue .cm-eyebrow, .cm-joue .cm-score { animation: cm-entree .4s both; }
.cm-joue .cm-hero-titre { animation: cm-entree .45s 1.05s var(--ease) both; }
.cm-joue .cm-hero-sous { animation: cm-entree .45s 1.25s var(--ease) both; }
@keyframes cm-pop { 0% { opacity: 0; transform: scale(.4) rotate(-12deg); } 100% { opacity: 1; transform: none; } }

/* Podium */
.cm-podium { display: flex; justify-content: center; align-items: flex-end; gap: 8px; margin: 22px 0 4px; }
.cm-pod { flex: 1; min-width: 0; max-width: 130px; text-align: center; }
.cm-pod-nom { display: flex; flex-direction: column; align-items: center; gap: 4px; font-weight: 800; font-size: .92rem; margin-bottom: 6px; }
.cm-pod-nom > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-pod-nom small { font-weight: 600; opacity: .85; }
.cm-pod-bloc { border-radius: 12px 12px 0 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 8px; color: #2b1055; font-weight: 900; }
.cm-pod-bloc span { font-size: 1.7rem; line-height: 1; }
.cm-pod-bloc b { font-size: 1.05rem; font-variant-numeric: tabular-nums; margin-top: 4px; }
.cm-pod-bloc small { font-size: .72rem; font-weight: 800; opacity: .8; }
.cm-pod-1 .cm-pod-bloc { height: 128px; background: linear-gradient(#ffe27a, var(--or)); }
.cm-pod-2 .cm-pod-bloc { height: 100px; background: linear-gradient(#f2f2fa, #cfcfe0); }
.cm-pod-3 .cm-pod-bloc { height: 84px; background: linear-gradient(#f0bd8a, #d69355); }
.cm-pod.moi .cm-pod-nom > span:last-child { color: var(--or); }
.cm-pod.moi .cm-av { box-shadow: 0 0 0 3px var(--or); }
.cm-attend.cm-podium .cm-pod-bloc { transform: scaleY(0); transform-origin: bottom; }
.cm-attend.cm-podium.vu .cm-pod-bloc { animation: cm-monte .5s var(--ease) both; }
.cm-attend.cm-podium.vu .cm-pod-1 .cm-pod-bloc { animation-delay: .25s; } .cm-attend.cm-podium.vu .cm-pod-3 .cm-pod-bloc { animation-delay: .1s; }
@keyframes cm-monte { to { transform: scaleY(1); } }

.cm-av { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; font-weight: 900; font-size: 1rem; color: #fff;
         background: hsl(var(--h) 52% 34%); border: 2px solid hsl(var(--h) 70% 72%); }

/* Ma partie en chiffres */
.cm-carres { display: grid; grid-template-columns: repeat(var(--cols, auto-fill), minmax(44px, 1fr)); gap: 6px; margin-bottom: 12px; }
.cm-carre { height: 44px; border-radius: 10px; border: 0; font-weight: 900; font-size: 1.2rem; cursor: pointer; color: #fff; }
.cm-carre.ok { background: var(--ok); } .cm-carre.ko { background: var(--ko); }
.cm-carre.nr { background: #e8e4f2; color: #4a4a60; }
.cm-carre:active { transform: scale(.94); }
.cm-tuiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cm-tuile { display: flex; align-items: center; gap: 10px; background: #fff; color: var(--encre); border-radius: 16px; padding: 12px; min-height: 76px; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.cm-tuile > div { min-width: 0; display: flex; flex-direction: column; }
.cm-tuile b { font-size: 1.05rem; line-height: 1.15; overflow-wrap: break-word; }
.cm-tuile span { color: var(--gris); font-size: .8rem; line-height: 1.25; }
.cm-tuile-ico { flex: none; width: 40px; height: 40px; display: grid; place-items: center; font-size: 1.6rem; border-radius: 12px; background: var(--lilas); }
.cm-ico-cat { background: color-mix(in srgb, var(--cc) 20%, #fff); }
.cm-donut { flex: none; width: 46px; height: 46px; transform: rotate(-90deg); }
.cm-donut circle { fill: none; stroke-width: 4.2; }
.cm-donut .fond { stroke: #e8e4f2; }
.cm-donut .val { stroke: var(--ok); stroke-linecap: round; stroke-dasharray: var(--p) 100; }

/* Trophées : cartes à collectionner */
.cm-trophees { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; perspective: 900px; }
.cm-trophees.seul { grid-template-columns: minmax(0, 260px); justify-content: center; }
.cm-troph {
  position: relative; border-radius: 18px; padding: 3px; color: var(--encre);
  background: linear-gradient(135deg, var(--teinte), #fff4c2 30%, var(--teinte) 55%, #fff4c2 80%, var(--teinte));
  box-shadow: 0 10px 22px rgba(0,0,0,.28); overflow: hidden;
}
.cm-troph-in { background: #fff; border-radius: 15px; padding: 14px 12px 14px; text-align: center; height: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px;
               background-image: radial-gradient(90% 50% at 50% 0%, color-mix(in srgb, var(--teinte) 22%, #fff), #fff 70%); }
.cm-troph-emoji { font-size: 2.6rem; line-height: 1; filter: drop-shadow(0 3px 3px rgba(0,0,0,.18)); }
.cm-troph-titre { font-size: 1.12rem; line-height: 1.15; }
.cm-troph-cat { display: inline-flex; gap: 4px; align-items: center; border-radius: 999px; padding: 3px 10px; font-weight: 800; font-size: .76rem; line-height: 1.2; }
.cm-troph-desc { margin: 0; color: var(--gris); font-size: .85rem; line-height: 1.3; }
.cm-troph-detail { margin: auto 0 0; font-size: .85rem; font-weight: 800; color: var(--encre); background: var(--lilas); border-radius: 8px; padding: 5px 8px; }
.cm-troph-avec { margin: 0; font-size: .78rem; color: var(--gris); }
.cm-troph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.65) 50%, transparent 65%); transform: translateX(-120%); pointer-events: none; }
.cm-trophees.cm-attend .cm-troph { opacity: 0; transform: translateY(18px) rotateY(-35deg) scale(.92); }
.cm-trophees.cm-attend.vu .cm-troph { animation: cm-carte .55s calc(var(--i) * 170ms) var(--ease) both; }
.cm-trophees.cm-attend.vu .cm-troph::after { animation: cm-reflet .9s calc(var(--i) * 170ms + .45s) ease-out both; }
@keyframes cm-carte { to { opacity: 1; transform: none; } }
@keyframes cm-reflet { to { transform: translateX(120%); } }

/* Partage */
.cm-partage { margin-top: 26px; background: var(--verre); border: 1px solid var(--verre-bord); border-radius: 18px; padding: 14px; }
.cm-partage-apercu { margin: 0 0 12px; background: rgba(0,0,0,.28); border-radius: 12px; padding: 12px; font: inherit; font-size: .95rem; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.cm-toast { min-height: 1.4em; margin-top: 8px; text-align: center; font-weight: 700; color: var(--or); }

/* ───────────── Correction ───────────── */
.cm-filtres { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.cm-chip { min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 2px solid var(--verre-bord); background: var(--verre); color: #fff; font-weight: 800; font-size: .95rem; cursor: pointer; }
.cm-chip b { margin-left: 4px; background: rgba(255,255,255,.2); border-radius: 999px; padding: 1px 8px; font-size: .85rem; }
.cm-chip[aria-pressed="true"] { background: var(--or); border-color: var(--or); color: #2b1055; }
.cm-chip[aria-pressed="true"] b { background: rgba(43,16,85,.14); }

.cm-recap { background: var(--verre); border: 1px solid var(--verre-bord); border-radius: 16px; margin-bottom: 8px; }
.cm-recap summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; padding: 6px 14px; cursor: pointer; font-weight: 800; list-style: none; }
.cm-recap summary::-webkit-details-marker { display: none; }
.cm-recap summary::after { content: "▾"; transition: transform .2s; margin-left: 4px; }
.cm-recap[open] summary::after { transform: rotate(180deg); }
.cm-recap summary small { margin-left: auto; font-weight: 700; color: #e6dcff; }
.cm-recap-liste { list-style: none; margin: 0; padding: 0 6px 8px; }
.cm-recap-liste button { width: 100%; min-height: 44px; display: flex; align-items: center; gap: 8px; border: 0; background: transparent; border-radius: 10px; padding: 4px 8px; text-align: left; cursor: pointer; }
.cm-recap-liste button:active { background: var(--verre); }
.cm-recap-n { flex: none; width: 1.6em; color: #d9ccf7; font-weight: 800; font-variant-numeric: tabular-nums; }
.cm-recap-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; }
.cm-pastille { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-weight: 900; font-size: .95rem; color: #fff; }
.cm-pastille.ok { background: var(--ok); } .cm-pastille.ko { background: var(--ko); } .cm-pastille.nr { background: #5d5d73; }

.cm-outils { display: flex; justify-content: flex-end; gap: 4px; margin: 4px 0 6px; }
.cm-lien { min-height: 44px; padding: 6px 10px; background: none; border: 0; color: var(--or); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cm-vide { text-align: center; padding: 28px 12px; font-weight: 700; background: var(--verre); border-radius: 16px; }

.cm-q { background: #fff; color: var(--encre); border-radius: 18px; margin-bottom: 12px; overflow: hidden; box-shadow: 0 8px 22px rgba(0,0,0,.22); border-left: 6px solid #9a96b0; scroll-margin-top: 62px; }
.cm-q.ok { border-left-color: var(--ok); } .cm-q.ko { border-left-color: var(--ko); }
.cm-q-tete { margin: 0; }
.cm-q-tete button { width: 100%; min-height: 64px; display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "p m c" "t t t"; gap: 6px 10px; align-items: center;
                    padding: 12px 14px; border: 0; background: transparent; text-align: left; cursor: pointer; color: var(--encre); }
.cm-q-tete .cm-pastille { grid-area: p; width: 30px; height: 30px; }
.cm-q-meta { grid-area: m; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: .85rem; color: var(--gris); font-weight: 700; min-width: 0; }
.cm-q-num { color: var(--encre); font-weight: 900; }
.cm-q-pts { margin-left: auto; font-variant-numeric: tabular-nums; }
.cm-q-texte { grid-area: t; font-size: 1.02rem; font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cm-q-tete button[aria-expanded="true"] .cm-q-texte { -webkit-line-clamp: unset; display: block; }
.cm-chev { grid-area: c; transition: transform .25s var(--ease); color: var(--gris); font-size: 1.1rem; }
.cm-q-tete button[aria-expanded="true"] .cm-chev { transform: rotate(180deg); }
.cm-etiq-mini { border-radius: 999px; padding: 1px 8px; font-size: .75rem; font-weight: 800; background: var(--lilas); color: #43216f; }
.cm-etiq-mini.piege { background: #ffe9c7; color: #6a3b00; } .cm-etiq-mini.fastoche { background: #dff5e7; color: #14532d; }

.cm-q-corps { padding: 0 14px 16px; display: flex; flex-direction: column; gap: 12px; animation: cm-deplie .25s var(--ease) both; }
.cm-q-corps[hidden] { display: none; }
@keyframes cm-deplie { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.cm-q .badges-q { justify-content: flex-start; margin: 0; }
.cm-q .badge-niv { background: var(--lilas); color: var(--encre); }
.cm-fig { margin: 0; text-align: center; }
.cm-fig img { max-width: 100%; max-height: 32vh; border-radius: 12px; background: var(--lilas); }

.cm-verdict { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; color: #fff; }
.cm-verdict b { font-size: 1.1rem; } .cm-verdict span { font-size: .92rem; opacity: .95; }
.cm-verdict.ok { background: var(--ok); } .cm-verdict.ko { background: var(--ko); } .cm-verdict.nr { background: #5d5d73; }

.cm-choix { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cm-ch { border: 2px solid #e1dcef; border-radius: 14px; padding: 10px 12px; background: #fff; }
.cm-ch.bon { border-color: var(--ok); background: #eaf7ef; }
.cm-ch.faux-moi { border-color: var(--ko); background: #fdeeee; }
.cm-ch-tete { display: flex; align-items: center; gap: 10px; }
.cm-ch-lettre { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; }
.cm-ch-lettre .forme { font-size: 1.1rem; width: 1.5em; height: 1.5em; }
.cm-ch-txt { flex: 1; min-width: 0; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.cm-ch.bon .cm-ch-txt { font-weight: 900; }
.cm-ch-n { flex: none; min-width: 1.8em; text-align: center; font-weight: 900; color: var(--gris); font-variant-numeric: tabular-nums; }
.cm-ch-marques { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0 44px; }
.cm-marque { border-radius: 999px; padding: 2px 10px; font-size: .8rem; font-weight: 800; color: #fff; }
.cm-marque.bon { background: var(--ok); } .cm-marque.moi { background: var(--violet); }
.cm-ch.faux-moi .cm-marque.moi { background: var(--ko); }
.cm-ch-barre { height: 5px; border-radius: 4px; background: rgba(0,0,0,.07); margin: 8px 0 0 44px; overflow: hidden; }
.cm-ch-barre i { display: block; height: 100%; background: #9a8bc4; border-radius: 4px; }
.cm-ch.bon .cm-ch-barre i { background: var(--ok); } .cm-ch.faux-moi .cm-ch-barre i { background: var(--ko); }
.cm-ch-qui { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 0 44px; }
.cm-nom { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #efeaf8; color: #3a2b5c; font-size: .82rem; font-weight: 700; line-height: 1.5; }
.cm-nom.moi { background: var(--or); color: #2b1055; font-weight: 900; box-shadow: 0 0 0 2px var(--or-fonce); }
.cm-sans { margin: 0; font-size: .88rem; color: var(--gris); display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }

.cm-cible { background: #eaf7ef; border: 2px solid var(--ok); border-radius: 14px; padding: 10px 14px; display: flex; flex-direction: column; }
.cm-cible span { font-size: .8rem; font-weight: 800; color: var(--ok); text-transform: uppercase; letter-spacing: .08em; }
.cm-cible b { font-size: 1.5rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cm-proches { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cm-proches li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--lilas); min-height: 48px; }
.cm-proches li.moi { background: #fff3c2; box-shadow: inset 0 0 0 2px var(--or-fonce); }
.cm-proche-rang { flex: none; width: 1.8em; text-align: center; font-weight: 900; font-size: 1.2rem; }
.cm-proche-qui { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cm-proche-qui small { color: var(--gris); font-size: .78rem; }
.cm-proche-val { font-weight: 900; text-align: right; font-variant-numeric: tabular-nums; }
.cm-proche-val small { font-weight: 700; color: var(--gris); }
.cm-ok { color: var(--ok); }

.cm-etiq { margin: 0; padding: 8px 12px; border-radius: 12px; font-weight: 800; background: var(--lilas); color: #43216f; line-height: 1.35; }
.cm-etiq.piege { background: #ffe9c7; color: #6a3b00; } .cm-etiq.fastoche { background: #dff5e7; color: #14532d; }
.cm-jauge { display: flex; align-items: center; gap: 10px; font-size: .88rem; color: var(--gris); font-weight: 700; }
.cm-jauge-corps { flex: 1; display: flex; gap: 3px; height: 10px; background: #ece8f6; border-radius: 6px; overflow: hidden; }
.cm-jauge.pts .cm-jauge-corps { background: none; overflow: visible; }
.cm-jauge.pts i { flex: 1; border-radius: 5px; background: #d9d3ea; }
.cm-jauge.pts i.on { background: var(--ok); }
.cm-jauge .barre { display: block; height: 100%; background: var(--ok); border-radius: 6px; }
.cm-jauge-lib { flex: none; }
.cm-expl { line-height: 1.5; font-size: 1rem; }
.cm-anecdote { border-left: 5px solid var(--or); background: #fff6cf; color: #2d2400; border-radius: 12px; padding: 10px 14px; }
.cm-anecdote h4 { margin: 0 0 4px; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: #6b5200; }
.cm-anecdote p { margin: 0; line-height: 1.5; }
.cm-source { margin: 0; font-size: .88rem; color: var(--gris); }
.cm-source a { color: #4d1fa8; font-weight: 700; display: inline-block; padding: 8px 0; }

/* ───────────── Classement ───────────── */
.cm-rangs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cm-rangs li { display: flex; align-items: center; gap: 10px; background: #fff; color: var(--encre); border-radius: 14px; padding: 8px 12px; min-height: 56px; }
.cm-rangs li.moi { background: #fff3c2; box-shadow: 0 0 0 3px var(--or); }
.cm-r-pos { flex: none; width: 1.9em; text-align: center; font-weight: 900; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.cm-r-nom { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cm-r-nom b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-r-nom small, .cm-r-score small { color: var(--gris); font-size: .78rem; font-weight: 700; }
.cm-r-score { flex: none; font-weight: 900; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.cm-rangs .cm-av { width: 34px; height: 34px; }

.cm-courbes { background: var(--verre); border: 1px solid var(--verre-bord); border-radius: 18px; padding: 12px 8px 12px; }
.cm-svg { width: 100%; height: auto; display: block; overflow: visible; }
.cm-svg .grille { stroke: rgba(255,255,255,.14); stroke-width: 1; }
.cm-svg .axe { fill: #d9ccf7; font-size: 10px; font-weight: 700; }
.cm-svg .ligne { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.cm-svg .ligne.autre { stroke: hsl(var(--h) 75% 74%); stroke-width: 1.8; opacity: .8; }
.cm-svg .ligne.autre.attenue { opacity: .28; }
.cm-svg .ligne.sel { stroke: hsl(var(--h) 90% 82%); stroke-width: 3.4; }
.cm-svg .ligne.moi { stroke: var(--or); stroke-width: 4.6; }
.cm-svg .point { stroke: #2b1055; stroke-width: 2; } .cm-svg .point.moi { fill: var(--or); } .cm-svg .point.sel { fill: hsl(var(--h) 90% 82%); }
.cm-svg .etiq { fill: #fff; font-size: 10.5px; font-weight: 800; } .cm-svg .etiq.moi { fill: var(--or); }
.cm-courbes.cm-attend .ligne.moi { stroke-dasharray: 1; stroke-dashoffset: 1; }
.cm-courbes.cm-attend.vu .ligne.moi { animation: cm-trace 1.1s .2s ease-out forwards; }
.cm-courbes-aide { margin: 4px 8px 8px; font-size: .85rem; color: #d9ccf7; }
.cm-legende { display: flex; flex-wrap: wrap; gap: 6px; }
.cm-pastille-j { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; border: 2px solid var(--verre-bord); background: transparent; font-weight: 700; font-size: .9rem; cursor: pointer; }
.cm-pastille-j i { width: 12px; height: 12px; border-radius: 50%; background: hsl(var(--h) 75% 74%); }
.cm-pastille-j.moi i { background: var(--or); }
.cm-pastille-j.sel { background: #fff; color: #2b1055; border-color: #fff; }

.cm-tous { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cm-tous li { display: flex; gap: 12px; align-items: flex-start; background: #fff; color: var(--encre); border-radius: 14px; padding: 12px; border-left: 6px solid var(--teinte); }
.cm-tous li.moi { background: #fff3c2; }
.cm-tous-emoji { flex: none; font-size: 1.9rem; line-height: 1; }
.cm-tous li > div { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cm-tous small { color: var(--gris); font-size: .84rem; line-height: 1.3; }
.cm-tous-qui { display: flex; flex-wrap: wrap; gap: 5px; }

.cm-pied { padding: 28px 16px 16px; text-align: center; }
.cm-pied p { margin: 0 0 12px; font-weight: 800; color: #e6dcff; }

/* Mouvement réduit : tout est affiché tout de suite, sans transition */
@media (prefers-reduced-motion: reduce) {
  .cm *, .cm *::before, .cm *::after { animation: none !important; transition: none !important; }
  .cm .cm-anneau .trait, .cm .cm-anneau .coche { stroke-dashoffset: 0; }
  .cm .cm-attend .cm-troph, .cm .cm-attend.cm-podium .cm-pod-bloc { opacity: 1; transform: none; }
  .cm .cm-courbes.cm-attend .ligne.moi { stroke-dashoffset: 0; }
  .cm-tabs button, .cm-chip { transition: none; }
}
@media (min-width: 560px) { .cm-fin { margin: 0; width: 100%; } .cm-tabs { border-radius: 0 0 16px 16px; } }

/* ───────────── Solo : comparaison, stats, avis, pied ───────────── */
.cm-compare { margin-top: 12px; background: var(--verre); border: 1px solid var(--verre-bord); border-radius: 16px; padding: 12px 14px; }
.cm-compare-titre { margin: 0 0 10px; font-weight: 900; line-height: 1.3; }
.cm-compare-ligne { display: grid; grid-template-columns: 8.2em 1fr 3.4em; gap: 8px; align-items: center; font-size: .9rem; font-weight: 700; margin: 6px 0; }
.cm-compare-ligne b { text-align: right; font-variant-numeric: tabular-nums; }
.cm-compare-barre { height: 12px; border-radius: 6px; background: rgba(255,255,255,.14); overflow: hidden; }
.cm-compare-barre i { display: block; height: 100%; border-radius: 6px; background: #b9a7e6; transform-origin: left; animation: cm-remplit .5s var(--ease) both; }
.cm-compare-barre i.moi { background: var(--or); }
.cm-compare-note { margin: 8px 0 0; font-size: .82rem; color: #d9ccf7; }

.cm-stats-cats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cm-stats-cats li { display: grid; grid-template-columns: 1fr 3.2em; grid-template-areas: "n v" "b b"; gap: 6px 8px; align-items: center; background: #fff; color: var(--encre);
                    border-radius: 14px; padding: 10px 12px; border-left: 6px solid var(--cc); }
.cm-stat-nom { grid-area: n; font-weight: 800; min-width: 0; }
.cm-stats-cats b { grid-area: v; text-align: right; font-variant-numeric: tabular-nums; }
.cm-stat-barre { grid-area: b; height: 10px; border-radius: 6px; background: #ece8f6; overflow: hidden; }
.cm-stat-barre i { display: block; height: 100%; border-radius: 6px; background: var(--cc); transform-origin: left; animation: cm-remplit .45s var(--ease) both; }
.cm-niv-carte { background: #fff; color: var(--encre); border-radius: 16px; padding: 6px 8px; overflow-x: auto; }
.cm-niv { width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
.cm-niv th, .cm-niv td { padding: 10px 6px; text-align: right; border-bottom: 1px solid #ece8f6; }
.cm-niv thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--gris); }
.cm-niv th:first-child { text-align: left; white-space: nowrap; }
.cm-niv tbody tr:last-child th, .cm-niv tbody tr:last-child td { border-bottom: 0; }
.cm-niv small { color: var(--gris); font-weight: 600; }
.cm-niv td.bon { color: var(--ok); font-weight: 900; } .cm-niv td.mauvais { color: var(--ko); font-weight: 900; }
.cm-niv-pt { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }

.cm-avis { border-top: 1px dashed #cfc7e6; padding-top: 10px; }
.cm-avis-titre { display: block; font-size: .8rem; font-weight: 800; color: var(--gris); margin-bottom: 6px; }
.cm-avis-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.cm-avis-btns button { min-height: 44px; padding: 6px 12px; border-radius: 999px; border: 2px solid #d5d0e5; background: #fff; color: var(--encre); font-weight: 700; font-size: .88rem; cursor: pointer; }
.cm-avis-btns button.fait { background: var(--violet); border-color: var(--violet); color: #fff; }
.cm-avis-etat { min-height: 1.3em; margin-top: 4px; font-size: .84rem; font-weight: 700; color: var(--ok); }

.cm-pied .cm-btn { margin-top: 10px; }
.cm-btn-clair { background: #fff; color: #2b1055; }
.cm-btn-fantome { background: transparent; color: #fff; box-shadow: none; border: 2px solid var(--verre-bord); }

/* Solo, mode « correction à la fin » : progression neutre (aucun ✓/✗), score et série masqués */
.solo-progres i.fait { background: var(--or); }
#vue-transition .cm-trans-sous { min-height: 1.4em; }
.cm-jauge.solo { flex-direction: column; align-items: stretch; gap: 6px; }
.cm-jauge.solo .cm-jauge-corps { flex: none; width: 100%; }
.cm-niv { font-size: .84rem; }
.cm-niv th, .cm-niv td { padding: 9px 3px; }
.cm-niv-nom { display: none; }
@media (min-width: 420px) { .cm-niv-nom { display: inline; } }
