/* Thème Onyx — dérivé du logo style B : graphite #111114 et orange Bitcoin #F7931A */

@font-face {
    font-family: 'Inter';
    src: url(../fonts/Inter-latin.woff2) format('woff2');
    font-weight: 100 900;
    font-display: swap;
}
@font-face {
    font-family: 'SpaceGrotesk';
    src: url(../fonts/SpaceGrotesk-latin.woff2) format('woff2');
    font-weight: 300 700;
    font-display: swap;
}

/* fond et texte ------------------------------------------------------------------------------ */
html {
    background-color: #0B0B0E;
}

body{
    background-color: #0B0B0E;
    background-image: radial-gradient(120% 50% at 50% 0%, #1B1B21 0%, #0B0B0E 70%);
    background-attachment: fixed;
    color: #F2F2F4;
    font-family: 'Inter', 'Roboto', sans-serif;
}

a{
    color: #F7931A;
}
a:hover{
    color: #FFB257;
}

.app-name.crypto-theme, #tl-mdpoublie.crypto-theme, #tl-inscriptionnv.crypto-theme, #appVersion.crypto-theme, #zoneMdpOublie.crypto-theme .btnQuitter, #zoneInscription.crypto-theme .btnQuitter, #tl-mentions.crypto-theme {
    color: #F2F2F4;
}
#tl-mdpoublie.crypto-theme, #tl-inscriptionnv.crypto-theme {
    color: #F7931A;
}
#clickMdpOublie u {
    text-decoration: none;
}
#appVersion.crypto-theme, #tl-mentions.crypto-theme {
    color: #8B8B95;
}

.app-name, .pageTitle, .camphorBold, .robotoBold {
    font-family: 'SpaceGrotesk', 'Inter', sans-serif !important;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.text-secondary {
    color: #8B8B95 !important;
}
.text-muted {
    color: #8B8B95 !important;
}

/* en-tête et pied de page -------------------------------------------------------------------- */
#appHeader.crypto-theme, #appFooter.crypto-theme {
    background-color: #111114 !important;
    color: #A1A1AA !important;
    border-color: #23232A;
    box-shadow: 0 6px 24px rgba(0,0,0,0.45) !important;
}
#appHeader.crypto-theme {
    border-bottom: solid 1px #5d5d68;
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
}
#appFooter.crypto-theme {
    border-top: solid 1px #5d5d68;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
}
#appHeader .app-name {
    color: #F2F2F4;
}
#appHeader #back, #appHeader #option, #appFooter #lastUpdate, #appFooter #aide {
    color: #A1A1AA;
}
#leMiniLogo {
    border-radius: 9px !important;
    box-shadow: none !important;
    border: solid 1px #2A2A31;
    margin-right: .6rem !important;
}
/* titre de l'écran de connexion à la taille de la maquette */
#appliLogin .app-name {
    font-size: 1.9rem;
    letter-spacing: -0.5px;
    position: relative; /* au-dessus de l'ombre (filter) de #leLogo, qui sinon voile le titre */
}
/* « Log » en orange (span posé par header.twig et App.appNameHtml) */
.app-name-accent {
    color: #F7931A;
}

/* tuiles, titres, alertes -------------------------------------------------------------------- */
/* les feuilles des pages (#pageParams, #pageAide, #pageStatistique .tuile {… !important}) sont chargées après le thème : id + 2 classes pour passer devant */
#pageParams .tuile.crypto-theme, #pageAide .tuile.crypto-theme, #pageStatistique .tuile.crypto-theme, #pageStatistique .tuile-admin.crypto-theme, .tuile.crypto-theme, .tuile-admin.crypto-theme {
    background-color: #16161B !important;
    color: #F2F2F4 !important;
    border: solid 1px #23232A !important;
    border-radius: 16px;
}

#pageStatistique .tuile-admin.crypto-theme, .tuile-admin.crypto-theme {
    border-top: solid 3px #F87171 !important;
}

.pageTitle.crypto-theme{
    background-color: #16161B !important;
    color: #F2F2F4;
    border: solid 1px #23232A;
    border-radius: 14px;
    box-shadow: none !important;
}

.bg-success.crypto-theme, .bg-danger.crypto-theme, .bg-info.crypto-theme, .bg-primary.crypto-theme, .bg-warning.crypto-theme, .bg-secondary.crypto-theme, .alert-success.crypto-theme, .alert-danger.crypto-theme, .alert-info.crypto-theme, .alert-primary.crypto-theme, .alert-warning.crypto-theme, .alert-secondary.crypto-theme{
    background-color: #16161B !important;
    color: #F2F2F4 !important;
}
span.bg-warning.crypto-theme{
    background-color: rgba(247,147,26,0.16) !important;
    color: #FFB257 !important;
}

.alert-success.crypto-theme, .alert-danger.crypto-theme, .alert-info.crypto-theme, .alert-primary.crypto-theme, .alert-warning.crypto-theme, .alert-secondary.crypto-theme{
    border: solid 1px #23232A;
    border-radius: 16px;
}

/* alertes Bootstrap hors thème (descriptif de l'écran de connexion, messages) */
.alert-info, .alert-light {
    background-color: #16161B;
    color: #D4D4D8;
    border-color: #23232A;
    border-radius: 16px;
}
.alert-secondary {
    background-color: #42424263;
    color: #D4D4D8;
    border-color: #e5e5ef;
}
.alert-primary {
    background-color: #30309969;
    color: #c9c9ff;
    border-color: #4646ff;
}
.alert-warning {
    background-color: rgba(247,147,26,0.12);
    color: #FFB257;
    border-color: rgba(247,147,26,0.35);
}
.alert-success {
    background-color: rgba(52,211,153,0.12);
    color: #34D399;
    border-color: rgba(52,211,153,0.35);
}
.alert-danger {
    background-color: rgba(248,113,113,0.12);
    color: #F87171;
    border-color: rgba(248,113,113,0.35);
}

#my-wallet-history.crypto-theme {
    background-color: #16161B !important;
}

/* couleurs de hausse / baisse ---------------------------------------------------------------- */
.text-success.crypto-theme, .text-success.crypto-theme-dark { color: #34D399 !important; }
.text-danger.crypto-theme, .text-danger.crypto-theme-dark { color: #F87171 !important; }
.text-warning.crypto-theme, .text-warning.crypto-theme-dark { color: #F7931A !important; }
.text-info.crypto-theme, .text-info.crypto-theme-dark, .text-primary.crypto-theme, .text-primary.crypto-theme-dark { color: #60A5FA !important; }
.text-secondary.crypto-theme, .text-secondary.crypto-theme-dark { color: #8B8B95 !important; }
.text-success { color: #34D399 !important; }
.text-danger { color: #F87171 !important; }
.text-warning { color: #F7931A !important; }
.text-info, .text-primary { color: #60A5FA !important; }

/* badges : pastilles teintées */
.badge {
    border-radius: 999px;
    font-weight: 600;
    padding: .3em .6em;
}
.badge-success { background-color: rgba(52,211,153,0.16); color: #34D399; }
.badge-danger { background-color: rgba(248,113,113,0.16); color: #F87171; }
.badge-warning { background-color: rgba(247,147,26,0.16); color: #F7931A; }
.badge-info { background-color: rgba(96,165,250,0.16); color: #60A5FA; }
.badge-secondary { background-color: #26262E; color: #D4D4D8; }
.badge-light { background-color: #26262E; color: #F2F2F4; }
.badge-dark { background-color: #0B0B0E; color: #D4D4D8; border: solid 1px #2A2A31; }
/* période sélectionnée des graphiques (8H…TOUT) */
.badge-primary { background-color: #F7931A; color: #111114; }
/* « Premium Offer » */
.badge-warning.text-dark { background-color: #F7931A; color: #111114 !important; }
.badge.bg-light { background-color: #26262E !important; }

/* fonds clairs Bootstrap hors thème (listes, convertisseur…) */
.bg-dark {
    background-color: #1C1C22 !important;
}
/* encadrés gris (formulaire de création d'alerte…) */
.bg-secondary.text-light, .bg-secondary.text-white {
    background-color: #16161B !important;
    border: solid 1px #23232A;
    border-radius: 16px !important;
}
.bg-light, .bg-white {
    background-color: #16161B !important;
    color: #F2F2F4;
}
.bg-light.text-dark, .bg-light .text-dark, .bg-white .text-dark {
    color: #F2F2F4 !important;
}
.border-secondary {
    border-color: #2A2A31 !important;
}
pre {
    color: #A1A1AA;
}

.wallet-indicator {
    border-color: #23232A !important;
}

/* onglets ------------------------------------------------------------------------------------- */
.nav-tabs {
    border-bottom-color: #23232A;
}
.nav-tabs .nav-link {
    color: #A1A1AA !important;
    background-color: #0F0F13 !important;
    border-color: #23232A;
}
.nav-tabs.crypto-theme .nav-link.active, .nav-tabs .nav-link.active {
    color: #F2F2F4 !important;
    background-color: #16161B !important;
    border-color: #23232A #23232A #16161B;
    box-shadow: inset 0 -2px 0 #F7931A;
}

/* tableaux ------------------------------------------------------------------------------------ */
.table, .table-dark {
    color: #F2F2F4;
    background-color: #111114;
}
.table td, .table th, .table thead th, .table-dark td, .table-dark th, .table-dark thead th {
    border-color: #23232A;
}
.thead-dark th, .table .thead-dark th {
    background-color: #16161B;
    color: #A1A1AA;
    border-color: #23232A;
}
.thead-light th, .table .thead-light th {
    background-color: #16161B;
    color: #A1A1AA;
    border-color: #23232A;
}
.bg-light.crypto-theme-dark, .table .bg-light {
    background-color: #16161B !important;
}
.table-striped tbody tr:nth-of-type(odd), .table-dark.table-striped tbody tr:nth-of-type(odd) {
    background-color: #141418;
}
.table-hover tbody tr:hover, .table-dark.table-hover tbody tr:hover {
    color: #F2F2F4;
    background-color: #1C1C22;
}

/* boutons ------------------------------------------------------------------------------------- */
.btn {
    border-radius: 12px;
}
.btn-warning.crypto-theme{
    background-color: transparent !important;
    color: #F7931A !important;
    border-color: transparent !important;
}
.btn-warning.crypto-theme:focus, .show>.btn-warning.crypto-theme.dropdown-toggle:focus {
    box-shadow: 0 0 0 0.2rem rgba(247,147,26,0.35) !important;
}
.btn-info, .btn-primary, .btn-warning {
    background-color: #F7931A;
    border-color: #F7931A;
    color: #111114;
    font-weight: 600;
}
.btn-info:hover, .btn-primary:hover, .btn-warning:hover, .btn-info:focus, .btn-primary:focus, .btn-warning:focus {
    background-color: #FFB257;
    border-color: #FFB257;
    color: #111114;
}
.btn-secondary, .btn-dark, .btn-light {
    background-color: transparent;
    border-color: #2A2A31;
    color: #F2F2F4;
}
.btn-secondary:hover, .btn-dark:hover, .btn-light:hover {
    background-color: #1C1C22;
    border-color: #3A3A42;
    color: #F2F2F4;
}
.btn-success { background-color: #34D399; border-color: #34D399; color: #0B0B0E; }
.btn-danger { background-color: #F87171; border-color: #F87171; color: #0B0B0E; }

/* formulaires --------------------------------------------------------------------------------- */
.form-control, .custom-select, select.form-control {
    background-color: #0F0F13;
    color: #F2F2F4;
    border: solid 1px #2A2A31;
    border-radius: 12px;
}
.form-control:focus, .custom-select:focus {
    background-color: #0F0F13;
    color: #F2F2F4;
    border-color: #F7931A;
    box-shadow: 0 0 0 0.2rem rgba(247,147,26,0.2);
}
.form-control:disabled, .form-control[readonly], .custom-select:disabled {
    background-color: #1C1C22;
    color: #8B8B95;
}
.form-control::placeholder {
    color: #71717A;
}
.input-group-text, .input-group-text.crypto-theme {
    background-color: #1C1C22;
    color: #A1A1AA;
    border-color: #2A2A31;
}
input[type=radio], input[type=checkbox], input[type=range] {
    accent-color: #F7931A;
}
.custom-control-input:checked ~ .custom-control-label::before {
    background-color: #F7931A;
    border-color: #F7931A;
}
.bootstrap-select button.btn {
    background-color: #0F0F13;
    color: #F2F2F4;
    border: solid 1px #2A2A31;
}

/* écran de connexion (index.html) ------------------------------------------------------------- */
#appliLogin .bg-warning {
    background-color: #16161B !important;
    border: solid 1px #23232A;
    border-radius: 16px !important;
    color: #F2F2F4;
}
#appliLogin #selectLang, #appliLogin .bg-secondary {
    background-color: #0F0F13 !important;
    color: #F2F2F4;
    border: solid 1px #2A2A31;
    border-radius: 8px;
}
#leLogo {
    filter: drop-shadow(0 18px 40px rgba(0,0,0,0.55));
}

/* écrans Créer un compte / Mot de passe oublié (pageInscription, pageMdpOublie de l'API) --------- */
#zoneInscription .bg-warning.crypto-theme, #zoneMdpOublie .bg-warning.crypto-theme {
    background-color: #16161B !important;
    border: solid 1px #23232A !important;
    border-radius: 14px !important;
    padding: .5rem;
    font-family: 'SpaceGrotesk', 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
}
#zoneInscription .bg-info, #zoneMdpOublie .bg-info {
    background-color: #16161B !important;
    border: solid 1px #23232A;
    border-radius: 16px !important;
    padding: .75rem !important;
}
#zoneInscription .cguPdf, #zoneInscription .cguPdf u {
    color: #F7931A !important;
    text-decoration: none;
}
#zoneInscription .btnQuitter, #zoneMdpOublie .btnQuitter {
    color: #A1A1AA !important;
}
#zoneInscription .btnQuitter u, #zoneMdpOublie .btnQuitter u {
    text-decoration: none;
}
#btnGoInscription, #btnGoMdp {
    background-color: #F7931A;
    border-color: #F7931A;
    color: #111114;
    font-weight: 600;
}
#btnGoInscription:hover, #btnGoMdp:hover, #btnGoInscription:focus, #btnGoMdp:focus {
    background-color: #FFB257;
    border-color: #FFB257;
    color: #111114;
}

/* toasts (Engine.toast) ---------------------------------------------------------------------- */
.toastify.toast-primary, .toastify.toast-info, .toastify.toast-warning, .toastify.toast-success, .toastify.toast-danger {
    background: #16161B !important;
    color: #F2F2F4 !important;
    border: solid 1px #2A2A31;
    box-shadow: 0 12px 32px rgba(0,0,0,0.5);
}
.toastify.toast-primary { border-top: solid 3px #F7931A; }
.toastify.toast-warning { border-top: solid 3px #F7931A; }
.toastify.toast-success { border-top: solid 3px #34D399; }
.toastify.toast-danger { border-top: solid 3px #F87171; }
.toastify.toast-info { border-top: solid 3px #60A5FA; }
.toastify .btn-light {
    background-color: #F7931A;
    border-color: #F7931A;
    color: #111114;
    font-weight: 600;
}
.toastify .toast-close {
    color: #A1A1AA;
}

/* menus, modales, toasts ---------------------------------------------------------------------- */
.dropdown-menu {
    background-color: #16161B;
    border: solid 1px #2A2A31;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.5);
}
.dropdown-item {
    color: #F2F2F4;
}
.dropdown-item:hover, .dropdown-item:focus {
    background-color: #26262E;
    color: #F2F2F4;
}
.dropdown-item i {
    color: #F7931A;
}
.dropdown-divider {
    border-top-color: #23232A;
}

.modal-content {
    background-color: #16161B;
    color: #F2F2F4;
    border: solid 1px #2A2A31;
    border-radius: 16px;
}
.modal-header, .modal-footer {
    border-color: #23232A;
}
.modal-title {
    font-family: 'SpaceGrotesk', 'Inter', sans-serif;
    font-weight: 700;
}
.close {
    color: #F2F2F4;
    text-shadow: none;
    opacity: .7;
}
.close:hover {
    color: #F7931A;
}

.toastify {
    border-radius: 12px;
}

/* calculatrice (pageCalculator.css est chargée après le thème : !important) ------------------ */
#calculatorBody .calculator__display {
    background-color: #0B0B0E !important;
}
#calculatorBody .calculator__keys {
    background-color: #23232A !important;
}
#calculatorBody .calculator__keys > * {
    background-color: #16161B !important;
    color: #F2F2F4 !important;
}
#calculatorBody .calculator__keys > .key--operator {
    background-color: #1C1C22 !important;
    color: #F7931A !important;
}
#calculatorBody .calculator__keys > .key--equal, #calculatorBody .calculator__operation {
    background-color: #F7931A !important;
    color: #111114 !important;
}
#calculatorBody .calculator__keys > .key--paste {
    background-color: #26262E !important;
    color: #F7931A !important;
}

/* barre de répartition ------------------------------------------------------------------------ */
.progress {
    background-color: #1C1C22;
}
.progress.crypto-theme .progress-bar.bg-danger{
    background-color: #3D2610 !important;
}
.progress.crypto-theme .progress-bar.bg-warning{
    background-color: #7A4A0E !important;
}
.progress.crypto-theme .progress-bar.bg-info{
    background-color: #C7741A !important;
}
.progress.crypto-theme .progress-bar.bg-success{
    background-color: #F7931A !important;
}

/* barres de progression hors thème (barre animée du marché, indicateur du portefeuille) */
.progress-bar.bg-success { background-color: #F7931A !important; }
.progress-bar.bg-info { background-color: #C7741A !important; }
.progress-bar.bg-warning { background-color: #7A4A0E !important; }
.progress-bar.bg-danger { background-color: #3D2610 !important; }

/* graphiques Google Charts : le CSS l'emporte sur les attributs SVG --------------------------- */
#walletChart, #currencyChart, #bigChart, #volumeChart {
    background-color: #16161B !important;
    border-radius: 16px;
}
/* fonds blancs (zone de tracé, étiquettes) puis lignes de repère grises (1 px) */
#appli svg rect[fill="#ffffff"] {
    fill: #16161B;
}
#appli svg rect[fill="#cccccc"], #appli svg rect[fill="#ebebeb"] {
    fill: #2A2A31;
}
#appli svg path[fill="#ffffff"] {
    fill: #16161B;
}
#appli svg text {
    fill: #A1A1AA;
}
#appli svg text[fill="#ffffff"] {
    fill: #F2F2F4;
}
#appli svg [stroke="#ffffff"] {
    stroke: #16161B;
}
/* infobulle HTML (page détail d'une crypto : tooltip {isHtml:true}), même rendu que l'infobulle SVG de l'accueil */
.google-visualization-tooltip {
    background-color: #16161B !important;
    border: 1px solid #2A2A31 !important;
    border-radius: 4px;
    box-shadow: none !important;
    color: #F2F2F4 !important;
}
.google-visualization-tooltip, .google-visualization-tooltip * {
    color: #F2F2F4 !important;
}
#pieChartWallet, #appli .tuile [id$="Chart"], #appli .tuile [id*="Chart"] {
    background-color: #16161B !important;
}
#walletChart [stroke="#ffffff"], #currencyChart [stroke="#ffffff"], #bigChart [stroke="#ffffff"], #volumeChart [stroke="#ffffff"] {
    stroke: #2A2A31;
}
#walletChart text, #currencyChart text, #bigChart text, #volumeChart text {
    fill: #A1A1AA;
}
/* séries : bleu Bootstrap, bleu Google par défaut, vert du volume -> orange ; jaune du cash-in -> bleu clair #60A5FA (courbe et légende), zone sous la courbe grise */
#walletChart [stroke="#007bff"], #currencyChart [stroke="#007bff"], #bigChart [stroke="#3366cc"], #volumeChart [stroke="#28a745"] {
    stroke: #F7931A;
}
#walletChart [fill="#007bff"], #currencyChart [fill="#007bff"], #bigChart [fill="#3366cc"], #volumeChart [fill="#28a745"] {
    fill: #F7931A;
}
#walletChart [stroke="#f5b600"] {
    stroke: #60A5FA;
}
#walletChart [fill="#f5b600"] {
    fill: #52525B;
}
/* chiffres de l'accueil : CashIn en bleu clair, Portefeuille en orange (les autres thèmes gardent jaune / bleu) */
#walletStatus td.wallet-ci { color: #60A5FA !important; }
#walletStatus td.wallet-pf { color: #F7931A !important; }
