/* CT3 : gamification — anneau de progression, célébration, « Mon année de collection ».
   Feuille autonome (pas de classes Tailwind à recompiler). */

/* ---------- Anneau de progression (pages département et lieu) ---------- */
.cjt-series-ring {
     margin-left: auto;
     flex-shrink: 0;
     display: flex;
     align-items: center;
     gap: .6rem;
     padding: .4rem .8rem .4rem .4rem;
     background: #fff;
     border: 1px solid #e2e8f0;
     border-radius: 1rem;
     box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
}
.cjt-series-ring svg { transform: rotate(-90deg); flex-shrink: 0; }
.cjt-series-ring__track { fill: none; stroke: #e2e8f0; stroke-width: 7; }
.cjt-series-ring__bar {
     fill: none;
     stroke: #2563eb;
     stroke-width: 7;
     stroke-linecap: round;
     transition: stroke-dashoffset .8s ease-out;
}
.cjt-series-ring__text { display: flex; flex-direction: column; line-height: 1.15; }
.cjt-series-ring__count { font-weight: 900; font-size: 1.05rem; color: #0f172a; white-space: nowrap; }
.cjt-series-ring__label { font-size: .7rem; font-weight: 600; color: #64748b; white-space: nowrap; }
.cjt-series-ring.is-complete { border-color: #86efac; background: #f0fdf4; }
.cjt-series-ring.is-complete .cjt-series-ring__bar { stroke: #16a34a; }
.cjt-series-ring.is-complete .cjt-series-ring__count { color: #15803d; }
.cjt-series-ring.is-complete .cjt-series-ring__label { color: #16a34a; }
.cjt-series-ring.is-complete svg { animation: cjt-ring-pop .9s ease-out 1; }

@keyframes cjt-ring-pop {
     0% { transform: rotate(-90deg) scale(.85); filter: drop-shadow(0 0 0 rgba(22, 163, 74, 0)); }
     50% { transform: rotate(-90deg) scale(1.08); filter: drop-shadow(0 0 6px rgba(22, 163, 74, .55)); }
     100% { transform: rotate(-90deg) scale(1); filter: drop-shadow(0 0 0 rgba(22, 163, 74, 0)); }
}

@media (max-width: 640px) {
     .cjt-series-ring { padding: .3rem; }
     .cjt-series-ring svg { width: 48px; height: 48px; }
     .cjt-series-ring__label { display: none; }
}

/* Pastille « 3 / 5 » des lieux d'un département */
.cjt-series-chip {
     flex-shrink: 0;
     font-size: .75rem;
     font-weight: 700;
     color: #1d4ed8;
     background: #eff6ff;
     border-radius: 9999px;
     padding: .125rem .5rem;
     white-space: nowrap;
}
.cjt-series-chip.is-complete { color: #15803d; background: #dcfce7; }

/* ---------- Célébration ---------- */
.cjt-celebration {
     position: fixed;
     right: 1rem;
     bottom: 1rem;
     z-index: 60;
     width: min(22rem, calc(100vw - 2rem));
     padding: .9rem 2.2rem .9rem .9rem;
     background: #fff;
     border: 1px solid #bbf7d0;
     border-radius: 1rem;
     box-shadow: 0 12px 32px rgba(15, 23, 42, .18);
     animation: cjt-celebration-in .45s cubic-bezier(.2, .9, .3, 1.2) both;
     overflow: hidden;
}
.cjt-celebration.is-leaving { animation: cjt-celebration-out .3s ease-in both; }
.cjt-celebration__close {
     position: absolute; top: .35rem; right: .5rem;
     border: 0; background: none; font-size: 1.3rem; line-height: 1; color: #94a3b8; cursor: pointer;
}
.cjt-celebration__close:hover { color: #475569; }
.cjt-celebration__item { display: flex; align-items: center; gap: .7rem; position: relative; }
.cjt-celebration__item + .cjt-celebration__item { margin-top: .6rem; }
.cjt-celebration__icon {
     width: 2.4rem; height: 2.4rem; flex-shrink: 0;
     display: flex; align-items: center; justify-content: center;
     border-radius: .8rem; font-size: 1.05rem;
     background: #fef3c7; color: #d97706;
}
.cjt-celebration__icon--badge { background: #ccfbf1; color: #0f766e; }
.cjt-celebration__icon--discovery { background: #dbeafe; color: #2563eb; }
.cjt-celebration__body { display: flex; flex-direction: column; min-width: 0; }
.cjt-celebration__title { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #16a34a; }
.cjt-celebration__label { font-size: .9rem; font-weight: 700; color: #0f172a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.cjt-celebration__label:hover { color: #2563eb; text-decoration: underline; }
.cjt-celebration__more { display: block; margin-top: .6rem; font-size: .75rem; font-weight: 600; color: #2563eb; }

/* Petite gerbe de confettis, une seule fois */
.cjt-celebration__burst { position: absolute; left: 2.1rem; top: 1.9rem; pointer-events: none; }
.cjt-celebration__burst i {
     position: absolute; width: 6px; height: 6px; border-radius: 2px; opacity: 0;
     animation: cjt-confetti .9s ease-out .25s 1 both;
}
.cjt-celebration__burst i:nth-child(1) { background: #f59e0b; --dx: -26px; --dy: -24px; }
.cjt-celebration__burst i:nth-child(2) { background: #22c55e; --dx: 22px; --dy: -28px; }
.cjt-celebration__burst i:nth-child(3) { background: #3b82f6; --dx: 30px; --dy: 4px; }
.cjt-celebration__burst i:nth-child(4) { background: #f43f5e; --dx: -30px; --dy: 8px; }
.cjt-celebration__burst i:nth-child(5) { background: #14b8a6; --dx: -6px; --dy: -34px; }
.cjt-celebration__burst i:nth-child(6) { background: #a855f7; --dx: 10px; --dy: 26px; }

@keyframes cjt-confetti {
     0% { opacity: 1; transform: translate(0, 0) rotate(0); }
     100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(200deg); }
}
@keyframes cjt-celebration-in {
     from { opacity: 0; transform: translateY(16px) scale(.96); }
     to { opacity: 1; transform: none; }
}
@keyframes cjt-celebration-out {
     to { opacity: 0; transform: translateY(12px); }
}

@media (prefers-reduced-motion: reduce) {
     .cjt-series-ring.is-complete svg,
     .cjt-celebration,
     .cjt-celebration.is-leaving,
     .cjt-celebration__burst i { animation: none; }
     .cjt-celebration__burst { display: none; }
}

/* ---------- Mon année de collection ---------- */
.cjt-myyear__years { display: flex; flex-wrap: wrap; gap: .5rem; }
.cjt-myyear__year {
     padding: .35rem .9rem; border-radius: 9999px; font-size: .85rem; font-weight: 700;
     color: #475569; background: #fff; border: 1px solid #e2e8f0;
}
.cjt-myyear__year:hover { border-color: #93c5fd; color: #1d4ed8; }
.cjt-myyear__year.is-active { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }

.cjt-myyear__hero {
     border-radius: 1.5rem;
     padding: 2rem;
     color: #fff;
     background: linear-gradient(135deg, #1e3a8a, #0f766e);
     box-shadow: 0 10px 30px rgba(30, 58, 138, .25);
}
.cjt-myyear__hero-kicker { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; opacity: .8; }
.cjt-myyear__hero-number { font-size: clamp(3rem, 10vw, 5.5rem); font-weight: 900; line-height: 1; margin-top: .4rem; }
.cjt-myyear__hero-label { font-size: 1.15rem; font-weight: 600; margin-top: .4rem; }
.cjt-myyear__hero-note { font-size: .8rem; opacity: .75; margin-top: .6rem; }

.cjt-myyear__tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (min-width: 1024px) { .cjt-myyear__tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cjt-myyear__tile { padding: 1.1rem 1.25rem; display: flex; flex-direction: column; }
.cjt-myyear__tile-value { font-size: 2rem; font-weight: 900; color: #0f172a; line-height: 1.1; }
.cjt-myyear__tile-label { font-size: .8rem; font-weight: 600; color: #64748b; }

.cjt-myyear__columns { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
@media (min-width: 1024px) { .cjt-myyear__columns { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cjt-myyear__panel { padding: 1.25rem; }
.cjt-myyear__panel-title { font-size: 1rem; font-weight: 800; color: #1e293b; margin-bottom: .8rem; display: flex; align-items: center; gap: .5rem; }
.cjt-myyear__panel-title i { color: #2563eb; }
.cjt-myyear__muted { font-size: .85rem; color: #64748b; }
.cjt-myyear__muted a, .cjt-myyear__list a, .cjt-myyear__chips a { color: #1d4ed8; font-weight: 600; }
.cjt-myyear__muted a:hover, .cjt-myyear__list a:hover, .cjt-myyear__chips a:hover { text-decoration: underline; }

.cjt-myyear__best { display: flex; gap: 1rem; align-items: center; }
.cjt-myyear__best img { width: 72px; height: 72px; object-fit: contain; border-radius: .8rem; background: #f8fafc; border: 1px solid #f1f5f9; flex-shrink: 0; }
.cjt-myyear__best-main { font-size: .95rem; color: #1e293b; }

.cjt-myyear__chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.cjt-myyear__chips li > * { display: inline-block; padding: .25rem .7rem; border-radius: 9999px; background: #eff6ff; font-size: .8rem; }

.cjt-myyear__list { display: flex; flex-direction: column; gap: .45rem; max-height: 18rem; overflow-y: auto; }
.cjt-myyear__list li { display: flex; align-items: baseline; gap: .5rem; font-size: .88rem; color: #1e293b; }
.cjt-myyear__list li > :last-child { margin-left: auto; white-space: nowrap; }
.cjt-myyear__type { font-size: .65rem; font-weight: 800; text-transform: uppercase; color: #16a34a; background: #dcfce7; border-radius: .4rem; padding: .1rem .4rem; flex-shrink: 0; }

.cjt-myyear__badges { display: flex; flex-wrap: wrap; gap: .8rem; }
.cjt-myyear__badges li { display: flex; flex-direction: column; align-items: center; width: 5.5rem; text-align: center; font-size: .72rem; font-weight: 600; color: #334155; }
.cjt-myyear__badge-svg svg { width: 56px; height: 56px; }

.cjt-myyear__share-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .8rem; }
.cjt-myyear__canvas { display: block; margin-top: 1rem; width: 100%; max-width: 360px; height: auto; border-radius: 1rem; box-shadow: 0 6px 20px rgba(15, 23, 42, .2); }
.cjt-myyear__canvas[hidden], .cjt-myyear__share-actions [hidden] { display: none; }
.cjt-myyear__badge-tiers { font-size: .65rem; font-weight: 700; color: #64748b; }
