/* Trading Crypto Virtuel - styles (compatibles prosilver et dérivés) */

/* ---- Verrouillage des couleurs ----
   Les couleurs de l'extension sont fixes (!important) : le style du forum
   (clair, sombre ou personnalisé) ne peut plus les modifier.
   Les sélecteurs :where() ont une spécificité nulle, les règles plus bas l'emportent. */
.ct-wrap { padding: 8px !important; border-radius: 8px; background: #ffffff !important; color: #28313b !important; color-scheme: light; }
:where(.ct-wrap) :where(*) { color: inherit !important; border-color: #d5dde5 !important; text-shadow: none !important; }
:where(.ct-wrap) :where(h1, h2, h3, h4) { color: #1d3f63 !important; background: transparent !important; border-color: #d5dde5 !important; }
:where(.ct-wrap) :where(a, a:visited) { color: #105289 !important; }
:where(.ct-wrap) :where(a:hover, a:focus) { color: #d31141 !important; }
:where(.ct-wrap) :where(input, select, textarea) { background: #ffffff !important; color: #28313b !important; border: 1px solid #b4bac0 !important; }
:where(.ct-wrap) :where(option) { background: #ffffff !important; color: #28313b !important; }
:where(.ct-wrap) :where(.button) { background: linear-gradient(to bottom, #ffffff 0%, #e9e9e9 100%) !important; color: #105289 !important; border: 1px solid #c7c3bf !important; box-shadow: 0 0 0 1px #ffffff inset !important; }
:where(.ct-wrap) :where(.button:hover, .button:focus) { background: linear-gradient(to bottom, #e9e9e9 0%, #ffffff 100%) !important; color: #d31141 !important; border-color: #105289 !important; }
:where(.ct-wrap) :where(.button .icon) { color: inherit !important; }
:where(.ct-wrap) :where(table, thead, tbody, tr, th, td) { background: transparent !important; }
:where(.ct-wrap) :where(hr) { border-color: #d5dde5 !important; background: transparent !important; }
:where(.ct-wrap) :where(code, pre) { background: #f3f6f9 !important; color: #28313b !important; }
:where(.ct-postrow, .ct-profile, .ct-index-block) :where(.ct-medal) { color: #34495e !important; }

.ct-wrap { margin-bottom: 10px; }
.ct-title { margin: 6px 0 10px; font-size: 1.6em; }
.ct-muted { color: #6b7785 !important; }
.ct-small { font-size: 0.9em; }
.ct-right { text-align: right; }
.ct-up { color: #13854e !important; }
.ct-down { color: #c62a2a !important; }
.ct-flat { color: #6b7785 !important; }

/* Menu */
.ct-menu { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0 0 10px; padding: 0; border-bottom: 2px solid #105289 !important; }
.ct-menu li a { display: block; padding: 7px 12px; border-radius: 6px 6px 0 0; background: #f3f6f9 !important; color: inherit !important; font-weight: bold; text-decoration: none; }
.ct-menu li a:hover { background: #e2e9f0 !important; }
.ct-menu li.active a { background: #105289 !important; color: #fff !important; }

/* Alertes */
.ct-alert { padding: 8px 12px; margin: 8px 0; border-radius: 6px; background: #fff7e0 !important; border: 1px solid #f0d58a !important; }
.ct-alert-error { background: #fdecec !important; border-color: #f1b0b0 !important; }

/* Barre de championnats */
.ct-seasonbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0; }
.ct-tabs { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.ct-tabs li a { display: inline-block; padding: 5px 10px; border: 1px solid #d5dde5 !important; border-radius: 18px; background: #ffffff !important; color: inherit !important; text-decoration: none; }
.ct-tabs li.active a { border-color: #105289 !important; background: #105289 !important; color: #fff !important; }
.ct-tabs li.active a .ct-tab-type { background: rgba(255,255,255,0.25) !important; color: #fff !important; }
.ct-tabs-small { margin-bottom: 10px; }
.ct-tab-type { display: inline-block; padding: 0 6px; border-radius: 8px; background: #e2e9f0 !important; color: #34495e !important; font-size: 0.85em; font-weight: bold; text-transform: uppercase; }
.ct-season-select { max-width: 100%; }
.ct-season-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; margin: 8px 0 10px; border-radius: 8px; background: #f3f6f9 !important; border: 1px solid #d5dde5 !important; }
.ct-season-head h3 { margin: 0 0 2px; border: 0 !important; padding: 0; font-size: 1.25em; text-transform: none; font-family: inherit; }
.ct-season-status { padding: 4px 10px; border-radius: 14px; background: #dff3e8 !important; color: #13854e !important; font-weight: bold; }
.ct-season-status.finished { background: #e7e7e7 !important; color: #555 !important; }

/* Cartes, grilles */
.ct-card { padding: 10px 12px; margin-bottom: 10px; border: 1px solid #d5dde5 !important; border-radius: 8px; background: #ffffff !important; }
.ct-card h3 { margin: 0 0 8px; padding-bottom: 4px; font-size: 1.1em; text-transform: none; font-family: inherit; }
.ct-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 10px; }
.ct-grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.ct-col-main, .ct-col-side { min-width: 0; }
@media (max-width: 900px) { .ct-grid { grid-template-columns: minmax(0, 1fr); } }

/* Indicateurs */
.ct-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 10px; }
.ct-kpi { display: flex; flex-direction: column; padding: 10px 12px; border: 1px solid #d5dde5 !important; border-radius: 8px; background: #ffffff !important; }
.ct-kpi-label { color: #6b7785 !important; font-size: 0.9em; text-transform: uppercase; letter-spacing: 0.03em; }
.ct-kpi-value { font-size: 1.6em; font-weight: bold; line-height: 1.3; }
.ct-kpi-value small { font-size: 0.55em; color: #6b7785 !important; }
.ct-kpi-sub { font-size: 0.9em; color: #6b7785 !important; }

/* Tableaux */
.ct-table-wrap { overflow-x: auto; }
.ct-table { width: 100%; border-collapse: collapse; }
.ct-table th { padding: 6px; border-bottom: 2px solid #d5dde5 !important; text-align: left; font-size: 0.9em; color: #6b7785 !important; text-transform: uppercase; white-space: nowrap; }
.ct-table td { padding: 6px; border-bottom: 1px solid #edf1f5 !important; vertical-align: middle; }
.ct-table tbody tr:hover td { background: #f8fafc !important; }
.ct-table .ct-num { text-align: right; white-space: nowrap; }
.ct-table.ct-compact td, .ct-table.ct-compact th { padding: 4px 5px; }
.ct-table tr.ct-me td { background: #fff8d6 !important; font-weight: bold; }
.ct-rank-col { width: 40px; text-align: center; }
.ct-share-col { width: 110px; }
.ct-share-col small { color: #6b7785 !important; }
.ct-bar { height: 6px; border-radius: 3px; background: #e8edf2 !important; overflow: hidden; }
.ct-bar span { display: block; height: 100%; background: #105289 !important; }
@media (max-width: 700px) { .ct-hide-sm { display: none; } }

/* Symboles, médailles */
.ct-sym { display: inline-block; min-width: 38px; padding: 1px 6px; border-radius: 4px; background: #eef3ff !important; color: #1d3f8a !important; font-weight: bold; font-family: Consolas, Monaco, monospace; text-align: center; }
.ct-sym.ct-fiat { background: #ecf8ef !important; color: #1c6b3a !important; }
.ct-medal { display: inline-block; width: 22px; height: 22px; line-height: 22px; border-radius: 50%; background: #e8edf2 !important; color: #34495e !important; font-size: 0.85em; font-weight: bold; text-align: center; }
.ct-medal-1 { background: linear-gradient(135deg, #ffe680, #d4a514) !important; color: #5a4300 !important; }
.ct-medal-2 { background: linear-gradient(135deg, #f2f2f2, #a8a8a8) !important; color: #3d3d3d !important; }
.ct-medal-3 { background: linear-gradient(135deg, #f3c299, #b8743c) !important; color: #4a2a0c !important; }
.ct-live { display: inline-block; padding: 0 6px; border-radius: 8px; background: #fdecec !important; color: #c62a2a !important; font-size: 0.8em; font-weight: bold; }

/* Formulaire d'ordre */
.ct-side-switch { display: flex; gap: 0; margin-bottom: 10px; border-radius: 6px; overflow: hidden; border: 1px solid #d5dde5 !important; }
.ct-side { flex: 1; cursor: pointer; text-align: center; }
.ct-side input { position: absolute; opacity: 0 !important; pointer-events: none; }
.ct-side span { display: block; padding: 8px; font-weight: bold; background: #f3f6f9 !important; }
.ct-side-buy input:checked + span { background: #13854e !important; color: #fff !important; }
.ct-side-sell input:checked + span { background: #c62a2a !important; color: #fff !important; }
.ct-form-row { margin-bottom: 10px; }
.ct-form-row > label { display: block; margin-bottom: 3px; font-weight: bold; }
.ct-pair, .ct-amount-row { display: flex; gap: 6px; align-items: center; }
.ct-pair select { flex: 1; min-width: 0; }
.ct-amount-row input { flex: 1; min-width: 0; font-size: 1.2em; padding: 5px; }
.ct-rate, .ct-balance { margin-top: 3px; font-size: 0.9em; color: #6b7785 !important; }
.ct-quick { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.ct-estimate { padding: 8px 10px; border-radius: 6px; background: #f3f6f9 !important; border: 1px dashed #d5dde5 !important; }
.ct-estimate.ct-error { background: #fdecec !important; border-color: #f1b0b0 !important; color: #8f1d1d !important; }
.ct-submit { margin-top: 8px; }
.button.ct-btn-primary { background: #105289 !important; border-color: #0b3d66 !important; color: #fff !important; }
.button.ct-btn-primary:hover { background: #0b3d66 !important; color: #fff !important; }
.ct-join p { margin: 0 0 8px; }

/* Graphiques */
.ct-chart { position: relative; width: 100%; min-height: 220px; }
.ct-chart svg { display: block; width: 100%; height: 260px; }
.ct-chart .ct-grid-line { stroke: #e3e8ee !important; stroke-width: 1; }
.ct-chart .ct-base-line { stroke: #9aa5b1 !important; stroke-dasharray: 4 4; stroke-width: 1; }
.ct-chart text { fill: #6b7785 !important; font-size: 11px; }
.ct-chart-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; font-size: 0.9em; }
.ct-chart-legend i { display: inline-block; width: 12px; height: 3px; margin-right: 4px; vertical-align: middle; }
.ct-chart-tip { position: absolute; pointer-events: none; padding: 4px 8px; border-radius: 4px; background: rgba(20,30,40,0.9) !important; color: #fff !important; font-size: 0.85em; white-space: nowrap; display: none; }

/* Barres horizontales */
.ct-hbars { display: flex; flex-direction: column; gap: 5px; }
.ct-hbar { display: grid; grid-template-columns: 95px 1fr 55px; gap: 6px; align-items: center; }
.ct-hbar-label { font-size: 0.9em; white-space: nowrap; }
.ct-hbar-track { height: 12px; border-radius: 6px; background: #edf1f5 !important; overflow: hidden; }
.ct-hbar-fill { display: block; height: 100%; background: #13854e !important; }
.ct-hbar-fill.neg { background: #c62a2a !important; }
.ct-hbar-val { text-align: right; font-weight: bold; font-size: 0.9em; }

/* Faits marquants, palmarès, joueur */
.ct-facts { list-style: none; margin: 0; padding: 0; }
.ct-facts li { padding: 6px 0; border-bottom: 1px solid #edf1f5 !important; }
.ct-facts li > span:first-child { display: block; color: #6b7785 !important; font-size: 0.85em; text-transform: uppercase; }
.ct-podiums { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.ct-podium-card { padding: 8px 10px; border: 1px solid #d5dde5 !important; border-radius: 8px; background: #f3f6f9 !important; }
.ct-podium-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; }
.ct-podium-head .ct-tab-type { align-self: flex-start; }
.ct-podium-list { list-style: none; margin: 0; padding: 0; }
.ct-podium-list li { display: flex; align-items: center; gap: 6px; padding: 3px 0; }
.ct-podium-val { margin-left: auto; font-size: 0.9em; white-space: nowrap; }
.ct-player-head { display: flex; align-items: center; gap: 14px; }
.ct-player-head h3 { border: 0 !important; margin: 0 0 6px; font-size: 1.4em; }
.ct-avatar img { max-width: 80px; height: auto; border-radius: 8px; }
.ct-medals-big { display: flex; gap: 14px; font-weight: bold; }
.ct-rules ol li { margin-bottom: 6px; line-height: 1.5; }
.ct-footnote { margin-top: 6px; color: #6b7785 !important; font-size: 0.85em; text-align: right; }

/* Bloc index */
.ct-index-seasons { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.ct-index-top { list-style: none; margin: 4px 0 0; padding: 0; }
.ct-index-top li { display: flex; align-items: center; gap: 6px; padding: 2px 0; }
.ct-index-top li > span:last-child { margin-left: auto; }
.ct-index-block .ct-medal { width: 18px; height: 18px; line-height: 18px; font-size: 0.75em; }
.ct-index-block .ct-medal-1 { background: linear-gradient(135deg, #ffe680, #d4a514) !important; }
.ct-index-block .ct-up { color: #13854e !important; }
.ct-index-block .ct-down { color: #c62a2a !important; }
.ct-index-block .ct-muted { color: #6b7785 !important; }

/* Recommandation */
.ct-share-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.ct-share-btn { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border: 0 !important; border-radius: 6px; color: #fff !important; font: inherit; font-weight: bold; text-decoration: none !important; cursor: pointer; }
.ct-share-btn:hover { filter: brightness(1.1) !important; }
.ct-share-whatsapp { background: #25d366 !important; }
.ct-share-telegram { background: #229ed9 !important; }
.ct-share-facebook { background: #1877f2 !important; }
.ct-share-x { background: #14171a !important; }
.ct-share-linkedin { background: #0a66c2 !important; }
.ct-share-reddit { background: #ff4500 !important; }
.ct-share-email { background: #6b7785 !important; }
.ct-share-copy { background: #105289 !important; }
.ct-share-copy.done { background: #13854e !important; }

/* Avertissement */
.ct-disclaimer { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 6px; padding: 12px 14px; border: 2px solid #e0a800 !important; border-radius: 8px; background: #fff8e1 !important; color: #5c4400 !important; }
.ct-disclaimer > .icon { font-size: 1.8em; color: #d48c00 !important; margin-top: 2px; }
.ct-disclaimer strong { display: block; font-size: 1.15em; margin-bottom: 3px; }
.ct-disclaimer p { margin: 0; line-height: 1.5; }

/* Graphique en direct */
.ct-live-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.ct-live-head h3 { margin-bottom: 4px; }
.ct-live-dot { display: inline-block; width: 8px; height: 8px; margin-left: 4px; border-radius: 50%; background: #e53935 !important; vertical-align: middle; animation: ct-pulse 1.6s infinite; }
@keyframes ct-pulse { 0% { box-shadow: 0 0 0 0 rgba(229,57,53,.6); } 70% { box-shadow: 0 0 0 7px rgba(229,57,53,0); } 100% { box-shadow: 0 0 0 0 rgba(229,57,53,0); } }
.ct-live-quote { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin: 4px 0 6px; }
.ct-live-price { font-size: 1.8em; font-weight: bold; border-radius: 4px; padding: 0 4px; }
.ct-live-change { font-weight: bold; }
.ct-live-period { margin-left: auto; display: inline-flex; gap: 3px; }
.ct-live-period .button.active { background: #105289 !important; border-color: #0b3d66 !important; color: #fff !important; }
.ct-live-stats { display: flex; flex-wrap: wrap; gap: 14px; font-size: 0.95em; color: #6b7785 !important; }
.ct-live-msg { padding: 90px 0; text-align: center; }
.ct-live-stamp { margin: 4px 0 0; }
@keyframes ct-flash-up { from { background: rgba(19,133,78,.25); } to { background: transparent; } }
@keyframes ct-flash-down { from { background: rgba(198,42,42,.25); } to { background: transparent; } }
.ct-flash-up { animation: ct-flash-up 1.5s ease-out; }
.ct-flash-down { animation: ct-flash-down 1.5s ease-out; }

/* Marché avec beaucoup d'actifs */
.ct-market-search { width: 100%; box-sizing: border-box; margin-bottom: 6px; padding: 4px 6px; }
.ct-market-scroll { max-height: 480px; overflow-y: auto; }
.ct-market-scroll thead th { position: sticky; top: 0; background: #ffffff !important; z-index: 1; }

/* ---- Version 2.0 ---- */
.ct-badge { display: inline-block; padding: 1px 6px; border-radius: 10px; background: #e8eef5 !important; color: #29435c !important; font-size: 0.75em; font-weight: bold; vertical-align: middle; }
.ct-badge-short { background: #fde7e7 !important; color: #a32121 !important; }
.ct-btn-small { padding: 2px 6px; min-height: 0; }
.ct-short-exposure { margin: 8px 0 0; padding: 6px 8px; border-left: 3px solid #c62a2a !important; background: #fdf2f2 !important; }
.ct-short-note { color: #a35b00 !important; font-weight: bold; }

/* Ordres conditionnels */
.ct-order-type-row select { min-width: 180px; }
.ct-trigger-row { margin-top: 8px; }
.ct-trigger-row label { display: block; font-weight: bold; margin-bottom: 3px; }
.ct-trigger-row input { width: 100%; box-sizing: border-box; }
.ct-order-status-1 td { opacity: .85 !important; }
.ct-order-status-2 td, .ct-order-status-3 td, .ct-order-status-4 td { opacity: .6 !important; }

/* Lien fiche crypto */
.ct-coin-link { color: #6b7785 !important; margin-left: 2px; }
.ct-coin-link:hover { color: #105289 !important; }
.ct-live-info { margin-left: auto; margin-right: 6px; font-size: 0.9em; }

/* Actualités */
.ct-news-list { list-style: none; margin: 0; padding: 0; }
.ct-news-list li { padding: 6px 0; border-bottom: 1px solid rgba(0,0,0,.07) !important; }
.ct-news-list li:last-child { border-bottom: 0 !important; }
.ct-news-list li > a { display: block; font-weight: bold; line-height: 1.35; }
.ct-news-list li > span { display: block; margin-top: 2px; }
.ct-news-full li { padding: 10px 0; }
.ct-news-full p { margin: 4px 0; line-height: 1.5; }

/* Trophées */
.ct-trophy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.ct-trophy-grid-small { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.ct-trophy { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border-radius: 8px; background: #f6f8fb !important; border: 1px solid rgba(0,0,0,.06) !important; }
.ct-trophy > .icon { font-size: 1.6em; margin-top: 2px; }
.ct-trophy-grid-small .ct-trophy { align-items: center; font-weight: bold; font-size: 0.9em; }
.ct-trophy-grid-small .ct-trophy > .icon { font-size: 1.3em; margin: 0; }
.ct-trophy strong, .ct-trophy div > span { display: block; }
.ct-trophy-locked { filter: grayscale(1) !important; opacity: .45 !important; }
.ct-trophy-gold > .icon, .ct-trophy-icon.ct-trophy-gold { color: #c9971a !important; }
.ct-trophy-silver > .icon, .ct-trophy-icon.ct-trophy-silver { color: #8a96a3 !important; }
.ct-trophy-bronze > .icon, .ct-trophy-icon.ct-trophy-bronze { color: #b06a2c !important; }
.ct-trophy-blue > .icon, .ct-trophy-icon.ct-trophy-blue { color: #105289 !important; }
.ct-trophy-green > .icon, .ct-trophy-icon.ct-trophy-green { color: #13854e !important; }
.ct-trophy-purple > .icon, .ct-trophy-icon.ct-trophy-purple { color: #7a3fb0 !important; }
.ct-trophy-red > .icon, .ct-trophy-icon.ct-trophy-red { color: #c62a2a !important; }

/* Fiche crypto */
.ct-coin-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.ct-coin-head h3 { border: 0 !important; margin: 0 0 4px; font-size: 1.4em; }
.ct-coin-title { flex: 1; min-width: 200px; }
.ct-coin-logo { border-radius: 50%; }
.ct-coin-price strong { font-size: 1.5em; }
.ct-coin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.ct-coin-stats > div { padding: 8px 10px; border-radius: 6px; background: #f6f8fb !important; }
.ct-coin-stats span, .ct-coin-stats strong, .ct-coin-stats small { display: block; }
.ct-coin-stats span { color: #6b7785 !important; font-size: 0.85em; }
.ct-coin-desc p { line-height: 1.6; margin: 0 0 8px; }
.ct-dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 0 0 8px; }
.ct-dl dt { color: #6b7785 !important; }
.ct-dl dd { margin: 0; font-weight: bold; text-align: right; }
.ct-coin-links { list-style: none; margin: 6px 0; padding: 0; }
.ct-coin-links li { padding: 2px 0; }
.ct-coin-nav { display: flex; flex-wrap: wrap; gap: 4px; }
.ct-coin-nav a { padding: 2px 7px; border-radius: 4px; background: #eef2f7 !important; font-weight: bold; font-size: 0.85em; text-decoration: none; }
.ct-coin-nav a.active { background: #105289 !important; color: #fff !important; }

/* Sous les messages et dans le profil */
.ct-postrow a { text-decoration: none; }
.ct-postrow-medals { display: inline-flex; gap: 2px; vertical-align: middle; }
.ct-postrow .ct-medal, .ct-profile .ct-medal { width: 18px; height: 18px; line-height: 18px; font-size: 0.75em; display: inline-block; text-align: center; border-radius: 50%; font-weight: bold; }
.ct-postrow-trophies, .ct-postrow-rank { margin-left: 4px; white-space: nowrap; }
.ct-postrow .ct-up, .ct-profile .ct-up { color: #13854e !important; }
.ct-postrow .ct-down, .ct-profile .ct-down { color: #c62a2a !important; }
