/* ============================================================
   Croissance : classements internationaux, Seasons, comparatifs,
   migration, parrainage, intégrations (widgets / API / badge).
   S'appuie sur les jetons de theme.css (clair et sombre).
   ============================================================ */

/* ── Barres de filtres ── */
.g-filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: center; margin: 0 0 1.4rem; }
.g-tabs { display: flex; flex-wrap: wrap; gap: .3rem; padding: .3rem; border-radius: 14px; background: var(--hd-surface); border: 1px solid var(--hd-border); }
.g-tabs a { display: inline-flex; align-items: center; gap: .35rem; padding: .5rem .85rem; border-radius: 10px; font-weight: 650; font-size: .88rem; color: var(--hd-text-muted); white-space: nowrap; }
.g-tabs a:hover { color: var(--hd-text); background: var(--hd-surface-2); }
.g-tabs a.is-active { color: var(--hd-on-brand, #111); background: var(--hd-sunset, var(--hd-brand)); }
.g-select { min-height: 40px; padding: .45rem 2rem .45rem .8rem; border-radius: 12px; border: 1px solid var(--hd-border); background: var(--hd-surface); color: var(--hd-text); font: inherit; font-weight: 600; }

/* ── Podium ── */
.g-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: end; margin-bottom: 1.4rem; }
.g-podium__item { position: relative; text-align: center; padding: 1.3rem 1rem 1.1rem; border-radius: 18px; background: var(--hd-surface); border: 1px solid var(--hd-border); min-width: 0; }
.g-podium__item--1 { order: 2; padding-top: 1.8rem; border-color: rgba(250, 204, 21, .55); box-shadow: 0 18px 46px -26px rgba(250, 204, 21, .55); }
.g-podium__item--2 { order: 1; }
.g-podium__item--3 { order: 3; }
.g-podium__medal { font-size: 2rem; line-height: 1; }
.g-podium__logo { width: 58px; height: 58px; border-radius: 15px; object-fit: cover; margin: .6rem auto .5rem; display: grid; place-items: center; background: var(--hd-surface-2); color: var(--hd-brand); font-weight: 800; font-size: 1.4rem; border: 1px solid var(--hd-border-strong); }
.g-podium__name { font-weight: 800; font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-podium__name a { color: inherit; }
.g-podium__value { margin-top: .3rem; font-family: var(--hd-font-display); font-weight: 800; font-size: 1.35rem; color: var(--hd-brand); }
.g-podium__sub { color: var(--hd-text-faint); font-size: .8rem; }
.g-share-btn { margin-top: .7rem; }

/* ── Tableaux de classement ── */
.g-table-wrap { overflow-x: auto; border-radius: 16px; border: 1px solid var(--hd-border); background: var(--hd-surface); }
.g-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.g-table th, .g-table td { padding: .7rem .85rem; text-align: left; border-bottom: 1px solid var(--hd-hairline); white-space: nowrap; }
.g-table th { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--hd-text-faint); font-weight: 750; }
.g-table tr:last-child td { border-bottom: 0; }
.g-table tr.is-hl td { background: color-mix(in srgb, var(--hd-brand) 10%, transparent); }
.g-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.g-table th.num { text-align: right; }
.g-rank { font-family: var(--hd-font-display); font-weight: 800; color: var(--hd-text-muted); width: 3.2rem; }
.g-vtc { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.g-vtc img, .g-vtc .g-vtc__logo { width: 32px; height: 32px; border-radius: 9px; object-fit: cover; flex: none; background: var(--hd-surface-2); display: grid; place-items: center; font-weight: 800; color: var(--hd-brand); }
.g-vtc a { color: var(--hd-text); font-weight: 700; overflow: hidden; text-overflow: ellipsis; max-width: 22rem; }
.g-vtc small { color: var(--hd-text-faint); }
.g-cert { font-size: .62rem; font-weight: 800; padding: .1rem .38rem; border-radius: 999px; border: 1px solid currentColor; }
.g-cert--verified { color: #60a5fa; } .g-cert--certified { color: #f59e0b; } .g-cert--partner { color: #c084fc; }
.g-up { color: var(--hd-success, #2fd98d); font-weight: 800; } .g-down { color: var(--hd-danger, #ef4444); font-weight: 800; }
.g-note { text-align: center; color: var(--hd-text-muted); font-size: .88rem; margin-top: 1rem; }

/* ── Fenêtre de partage ── */
.g-modal { border: 1px solid var(--hd-border); border-radius: 18px; background: var(--hd-surface); color: var(--hd-text); padding: 1.4rem; width: min(520px, 92vw); }
.g-modal::backdrop { background: rgba(3, 5, 10, .6); backdrop-filter: blur(3px); }
.g-modal img { width: 100%; border-radius: 12px; border: 1px solid var(--hd-border); margin: .6rem 0; }
.g-copy { display: flex; gap: .5rem; }
.g-copy input, .g-copy textarea { flex: 1; min-width: 0; font: inherit; font-size: .82rem; padding: .55rem .7rem; border-radius: 10px; border: 1px solid var(--hd-border); background: var(--hd-bg); color: var(--hd-text); }
.g-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }

/* ── Seasons ── */
.g-season-bar { max-width: 520px; margin: 1rem auto 0; }
.g-season-bar__track { height: 10px; border-radius: 999px; background: var(--hd-surface-2); overflow: hidden; border: 1px solid var(--hd-border); }
.g-season-bar__fill { height: 100%; background: var(--hd-sunset, var(--hd-brand)); }
.g-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.g-list { list-style: none; padding: 0; margin: .4rem 0 0; display: grid; gap: .45rem; }
.g-list li { display: flex; justify-content: space-between; gap: 1rem; font-size: .9rem; padding: .35rem 0; border-bottom: 1px dashed var(--hd-hairline); }
.g-list li:last-child { border-bottom: 0; }
.g-list li b { white-space: nowrap; }
.g-list li.is-boosted b { color: var(--hd-brand); }
.g-banner-note { border: 1px solid color-mix(in srgb, var(--hd-brand) 45%, transparent); background: color-mix(in srgb, var(--hd-brand) 9%, transparent); border-radius: 16px; padding: 1rem 1.2rem; margin-bottom: 1.4rem; }
.g-fame { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.g-fame ol { margin: .5rem 0 0; padding-left: 1.2rem; }

/* ── Comparatif ── */
.g-compare { min-width: 760px; }
.g-compare th:first-child, .g-compare td:first-child { position: sticky; left: 0; background: var(--hd-surface); z-index: 1; white-space: normal; min-width: 210px; }
.g-compare td { white-space: normal; vertical-align: top; font-size: .88rem; }
.g-compare th.is-hd, .g-compare td.is-hd { background: color-mix(in srgb, var(--hd-brand) 7%, var(--hd-surface)); }
.g-compare tr.g-group td { background: var(--hd-surface-2); font-weight: 800; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--hd-text-faint); }
.g-v { display: inline-flex; gap: .4rem; align-items: flex-start; }
.g-v::before { flex: none; font-weight: 900; }
.g-v--yes::before { content: '✓'; color: var(--hd-success, #2fd98d); }
.g-v--partial::before { content: '◐'; color: #f59e0b; }
.g-v--unknown { color: var(--hd-text-faint); }
.g-v--unknown::before { content: '?'; color: var(--hd-text-faint); }
.g-sources { columns: 2 260px; padding-left: 1.1rem; font-size: .86rem; }
.g-sources li { break-inside: avoid; margin: .2rem 0; }

/* ── Étapes / FAQ ── */
.g-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; counter-reset: step; }
.g-step { position: relative; padding: 1.2rem 1.1rem 1.1rem 3.4rem; border-radius: 16px; background: var(--hd-surface); border: 1px solid var(--hd-border); }
.g-step::before { counter-increment: step; content: counter(step); position: absolute; left: 1rem; top: 1.05rem; width: 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--hd-sunset, var(--hd-brand)); color: var(--hd-on-brand, #111); }
.g-step h3 { margin: 0 0 .3rem; font-size: 1rem; }
.g-step p { margin: 0; color: var(--hd-text-muted); font-size: .9rem; }
.g-faq details { border-bottom: 1px solid var(--hd-hairline); padding: .8rem 0; }
.g-faq summary { cursor: pointer; font-weight: 700; }
.g-faq p { color: var(--hd-text-muted); margin: .5rem 0 0; }
.g-cta { text-align: center; padding: 1.6rem 1.2rem; border-radius: 20px; border: 1px solid color-mix(in srgb, var(--hd-brand) 40%, transparent); background: radial-gradient(80% 140% at 50% 120%, color-mix(in srgb, var(--hd-brand) 18%, transparent), transparent 70%), var(--hd-surface); }
.g-cta h2 { margin: 0 0 .4rem; }
.g-cta .hd-btn { margin: .8rem .3rem 0; }

/* ── Trophées sur le profil public ── */
.g-awards { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .9rem; }
.g-award { display: inline-flex; align-items: center; gap: .35rem; padding: .28rem .65rem; border-radius: 999px; font-size: .78rem; font-weight: 750; background: var(--hd-surface); border: 1px solid var(--hd-border); }
.g-award--champion { border-color: rgba(250, 204, 21, .6); background: linear-gradient(90deg, rgba(250, 204, 21, .18), transparent); }
.vtc-hero--champion { box-shadow: 0 0 0 2px rgba(250, 204, 21, .75), 0 24px 60px -30px rgba(250, 204, 21, .6); }
.vtc-hero__ribbon { position: absolute; top: 14px; right: 14px; z-index: 3; padding: .3rem .75rem; border-radius: 999px; font-size: .78rem; font-weight: 800; color: #1b1300; background: linear-gradient(90deg, #fde68a, #f59e0b); box-shadow: 0 8px 20px -8px rgba(245, 158, 11, .8); }

/* ── Dashboard : intégrations ── */
.g-int-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 1rem; }
.g-int-card { display: flex; flex-direction: column; gap: .6rem; min-width: 0; }
.g-int-card h3 { margin: 0; font-size: 1rem; }
.g-int-card p { margin: 0; color: var(--hd-text-muted); font-size: .86rem; }
.g-preview { border-radius: 14px; background: repeating-conic-gradient(var(--hd-surface-2) 0% 25%, transparent 0% 50%) 50% / 16px 16px; padding: .6rem; border: 1px solid var(--hd-border); }
.g-preview iframe { width: 100%; border: 0; display: block; border-radius: 14px; background: transparent; }
.g-code { position: relative; }
.g-code pre { margin: 0; padding: .7rem 4.6rem .7rem .8rem; border-radius: 10px; background: var(--hd-bg); border: 1px solid var(--hd-border); font-size: .76rem; line-height: 1.5; white-space: pre-wrap; word-break: break-all; max-height: 9.5rem; overflow: auto; }
.g-code button { position: absolute; top: .45rem; right: .45rem; }
.g-codetabs { display: flex; gap: .3rem; flex-wrap: wrap; }
.g-codetabs button { border: 1px solid var(--hd-border); background: transparent; color: var(--hd-text-muted); border-radius: 8px; padding: .25rem .6rem; font: inherit; font-size: .78rem; font-weight: 650; cursor: pointer; }
.g-codetabs button.is-active { color: var(--hd-brand); border-color: var(--hd-brand); }
.g-opts { display: flex; flex-wrap: wrap; gap: .8rem; align-items: flex-end; }
.g-opts .hd-field { margin: 0; min-width: 140px; }
.g-kv { display: grid; grid-template-columns: auto 1fr; gap: .4rem .9rem; font-size: .88rem; align-items: center; }
.g-kv code { word-break: break-all; }
.g-stat-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.g-stat { padding: .45rem .7rem; border-radius: 10px; background: var(--hd-surface-2); border: 1px solid var(--hd-border); font-size: .82rem; }
.g-stat b { color: var(--hd-text); }
.g-prog { height: 8px; border-radius: 999px; background: var(--hd-surface-2); overflow: hidden; }
.g-prog > span { display: block; height: 100%; background: var(--hd-sunset, var(--hd-brand)); }
.g-status { font-size: .72rem; font-weight: 800; padding: .15rem .5rem; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.g-status--pending { color: #f59e0b; } .g-status--qualified, .g-status--claimed, .g-status--member { color: var(--hd-success, #2fd98d); }
.g-status--expired, .g-status--rejected, .g-status--none { color: var(--hd-text-faint); } .g-status--link, .g-status--discord { color: #60a5fa; }

@media (max-width: 640px) {
    .g-compare th:first-child, .g-compare td:first-child { min-width: 128px; }
    .g-compare { min-width: 620px; }
    .g-podium { grid-template-columns: 1fr; }
    .g-podium__item--1, .g-podium__item--2, .g-podium__item--3 { order: initial; }
}
