/* ===== GLOBAL ===== */ 
body {
    -webkit-tap-highlight-color: transparent;
    margin: 0;
    font-family: system-ui, sans-serif;
    background: radial-gradient(circle at top, #0f172a, #020617);
    color: #e5e7eb;
    overscroll-behavior: none;
}


.container {
    max-width: 900px;
    margin: auto;
    padding: 12px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;  /* 🔥 ESPACE GLOBAL ENTRE TOUS LES BLOCS */
}

h3 {
    margin-bottom: 6px;
}

/* ===== TEXT UTILS ===== */
.text-muted { color: #9ca3af; }
.text-small { font-size: 12px; }

.positive {
    color: #22c55e;
    text-shadow: 0 0 6px rgba(34,197,94,0.4);
}

.negative {
    color: #ef4444;
    text-shadow: 0 0 6px rgba(239,68,68,0.4);
}





.gold { color: #facc15; }

/* ===== HEADER ===== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 4px;
}

.header-left {
    display: flex;
    flex-direction: column;
}

.header-left h2 {
    margin: 0;
    font-size: 20px;
}

.header-left small {
    font-size: 11px;
    color: #9ca3af;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-right {
    display: flex;
    align-items: center;
}

.refresh {
    font-size: 18px;
    opacity: 0.7;
    cursor: pointer;
    transition: 0.2s;
}

.refresh:active {
    transform: scale(0.9);
}



/* Badge perf style app */
.badge-perf {
    font-size: 13px;
    padding: 5px 10px;

    border-radius: 999px;
    font-weight: 500;   /* 🔥 moins agressif */

    opacity: 0.95;       /* 🔥 un peu plus soft */
transform: translateY(-1px);
transition: all 0.3s ease;
}

/* 🔥 effet glow */
.badge-perf.positive {
    color: #22c55e;
    text-shadow: 0 0 6px rgba(34,197,94,0.4);
}

.badge-perf.negative {
    color: #ef4444;
    text-shadow: 0 0 6px rgba(239,68,68,0.4);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

.badge-perf.flash {
    animation: pulse 0.4s ease;
}




.badge {
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 14px;
    background: #111827;
}

/* ===== CARDS ===== */
.card {
    touch-action: manipulation;
    background: linear-gradient(145deg, #0f172a, #0b0f1a);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 12px;
    margin-top: 0px;
    transition: 0.2s;
    box-shadow: 
        0 8px 30px rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.03);
}

.card.repartition {
    padding: 8px;
}

.card.repartition h3 {
    margin-bottom: 2px;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 10px 40px rgba(0,0,0,0.6),
        inset 0 1px 0 rgba(255,255,255,0.04);
}

.card:active {
    transform: scale(0.98);
}

.card table {
    margin-bottom: -6px;
}




/* ===== Total Global ===== */

.highlight {
     box-shadow: 
        0 0 20px rgba(250, 204, 21, 0.08),
        0 0 60px rgba(250, 204, 21, 0.03);
    border: 1px solid rgba(250, 204, 21, 0.4);
    padding: 8px 14px;   /*  AVANT: 12px 16px */
    border-radius: 16px;
    background: linear-gradient(145deg, #0b1220, #020617);
    margin-bottom: 10px;  /*  espace sous le total */
}


.highlight small {
   font-size: 11px;
    margin-bottom: 2px;
    letter-spacing: 1px;
    color: #9ca3af;
}

.highlight h2 {
    margin: 2px 0 0;   /*  réduit espace */
    font-size: 26px;   /*  AVANT: 30px */
    font-weight: 700;
    letter-spacing: 1px;
}


/* ===== KPI ===== */
.kpi-grid {
    margin-top: 0; /* éviter conflits */
    margin-bottom: 8px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.kpi {
    height: 65px;
    padding: 8px;
    border-radius: 14px;
    background: linear-gradient(145deg, #0b1220, #020617);
    border: 1px solid rgba(255,255,255,0.08);
    transition: 0.2s ease;
}

.kpi small {
   font-size: 10px;
    color: #9ca3af;
}

.kpi h3 {
    margin-top: 2px;
    font-size: 18px;   /* AVANT: 20px */
    font-weight: 600;
}

.kpi:nth-child(1),
.kpi:nth-child(3) {
    border: 1px solid rgba(250, 204, 21, 0.15); /* or + ratio */
}

.kpi:active {
    transform: scale(0.97);
}

/* ===== ALERT ===== */
.alert-box {
    margin-top: 6px;
    margin-bottom: 2px; /* 🔥 resserre vers le bas */
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    text-align: center;
    background: rgba(59, 130, 246, 0.1);
    color: #93c5fd; 
}

#zone-action {
    font-size: 11px;
    opacity: 0.75;
    display: block;
    margin-top: 2px;
}


/* ===== DONUT ===== */
@keyframes donutEnter {
    0% {
        transform: rotate(-120deg) scale(0.8);
        opacity: 0;
    }
    60% {
        transform: rotate(10deg) scale(1.05);
        opacity: 1;
    }
    100% {
        transform: rotate(0deg) scale(1);
    }
}

.donut.enter {
    animation: donutEnter 0.8s ease-out;
}



.repartition-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.bloc {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.donut {
    margin: 4px auto;
    isolation: isolate;
    opacity: 0;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    position: relative;
    transition: transform 1s ease;
}


.donut-label {
    text-align: center;
    font-size: 10px;
    color: #cbd5f5;
    line-height: 1.2;
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;

    z-index: 3; /* 🔥 AU-DESSUS du donut */
}

.donut-label span {
display: block;
    font-size: 13px;/* valeur € un peu plus visible */
    font-weight: 600;
    color: #fff;

    

}

.donut-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 
        0 0 0 1px rgba(255,255,255,0.06),
        0 8px 20px rgba(0,0,0,0.5),
        0 0 40px rgba(250, 204, 21, 0.18);
    animation: donutBreath 6s ease-in-out infinite;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 14px;
    font-weight: 600;
    color: #e2e8f0;

    text-align: center;
    pointer-events: none;
    z-index: 2;
}

/* 🔥 DOIT être en dehors */
.donut-inner span {
    font-size: 13px;  /* 🔽 valeur € */
    font-weight: 600;
    text-shadow: 0 0 6px rgba(255,255,255,0.15);
}




.donut.show {
    transform: scale(1);
    opacity: 1;
}


/* micro effet “respiration” */
@keyframes donutBreath {
    0% { transform: scale(1); }
    50% { transform: scale(1.015); }
    100% { transform: scale(1); }
}





/* 🔥 effet lumière (haut) */
.donut::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;

    background: radial-gradient(
        circle at 50% 0%,
        rgba(255,255,255,0.25),
        transparent 60%
    );

    opacity: 0.5;
    pointer-events: none;
}

/* 🔥 centre travaillé (profondeur réelle) */
.donut::after {
    content: "";
    position: absolute;
    inset: 22px;
    border-radius: 50%;

    background: radial-gradient(
        circle at 50% 50%,
        #020617 50%,
        #000 100%
    );

    z-index: 1;

    box-shadow:
        inset 0 10px 20px rgba(0,0,0,0.9),
        inset 0 -2px 4px rgba(255,255,255,0.06),
        0 0 0 1px rgba(255,255,255,0.03);
}


/* 🔥 hover subtil */
.donut:hover {
    transform: scale(1.05) rotate(2deg);
}


/* 🔵 ETF glow cohérent */
.donut.etf {
    box-shadow: 
        0 0 0 1px rgba(255,255,255,0.06),
        0 8px 20px rgba(0,0,0,0.5),
        0 0 25px rgba(56,189,248,0.20);
}






/* ===== TABLE ===== */
table {
    margin: 0;
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    table-layout: fixed;
}

/* lignes */
table tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background: rgba(255,255,255,0.03);
}

/* headers */
th {
    color: #94a3b8;
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 500;
    padding: 6px;
    padding-bottom: 8px; /* 🔥 respiration */
}

/* cellules */
td {
    text-align: right;
    padding: 6px;
    border-bottom: 1px solid #1f2937;
    transition: color 0.3s ease; /* 🔥 smooth update */
}

td:first-child {
    text-align: left;
}

/* éviter retour ligne */
th, td {
    white-space: nowrap;
}

/* ===== ALIGNEMENTS PAR COLONNE ===== */

/* Type */
th:nth-child(1), td:nth-child(1) {
    text-align: left;
}

/* Stockage */
th:nth-child(2), td:nth-child(2) {
    text-align: center;
}

/* Qté */
th:nth-child(3), td:nth-child(3) {
    text-align: right;
}

/* Prix / Spot */
th:nth-child(4), td:nth-child(4) {
    text-align: right;
}


td:nth-child(5) {
    text-align: right;
    font-weight: 700;
}

td:nth-child(5).positive {
    text-shadow: 0 0 6px rgba(34,197,94,0.25);
}

td:nth-child(5).negative {
    text-shadow: 0 0 6px rgba(239,68,68,0.25);
}

td:nth-child(5),
td:nth-child(6) {
    font-variant-numeric: tabular-nums;
}

td:nth-child(6) {
    font-weight: 600;
}

td, th {
    padding-left: 6px;
    padding-right: 6px;
}

/* ===== GRAPH ===== */
#chart-10j {
    width: 100% !important;
    height: 220px !important;
}


/* ===== Total des 2 derniers blocs Metaux et ETF ===== */
.total-line {
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.08);

    display: flex;
    justify-content: space-between;
    align-items: center;

    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.3px;

    color: #facc15;
}

.total-line span:last-child {
    color: #fff;
    font-weight: 700;
}


/* ===== RÉDUIRE L’ESPACE ENTRE DONUT ET LÉGENDE ===== */
.legend {
    margin-top: 6px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}



.legend-item {
     display: flex;
    align-items: center;
    justify-content: space-between;
    width: 160px;
    font-size: 13px;
    margin: 4px 0;
}

.legend-item span {
    opacity: 0.9;
}

.legend-item:hover {
    transform: translateX(4px);
    transition: 0.2s;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;   /* 🔥 IMPORTANT */
}

/* couleurs EXACTEMENT comme tes donuts */
.dot-or-suisse { background: #facc15; }
.dot-or-belgique { background: #f59e0b; }
.dot-argent { background: #9ca3af; }

.dot-monde { background: #38bdf8; }
.dot-seniors { background: #22c55e; }

.legend div::before {
    display: none !important;
}

.legend {
    list-style: none;
    padding-left: 0;
}

.legend div {
    display: block !important;
}

.legend-item::before {
    display: none !important;
    content: none !important;
}

.legend-item span:nth-child(2){
    opacity: 0.85;
}

.legend-item span:last-child {
    font-variant-numeric: tabular-nums;
}

.legend-item {
    letter-spacing: 0.2px;
}

.alert-nord-tempere {
    background: linear-gradient(
        135deg,
        rgba(30, 58, 95, 0.6),
        rgba(14, 165, 233, 0.5)
    );
    color: #e0f2fe;
}


.refresh.spin {
    animation: spin 0.8s ease-in-out;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}


/* ===== BPGDM ===== */
.etf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bpgdm-badge {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 999px;

    opacity: 0.8;
    font-weight: 500;

    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);

    letter-spacing: 0.2px;
}

@keyframes flashStrong {
    0% {
        transform: scale(1);
        opacity: 1;
        text-shadow: 0 0 0px rgba(34,197,94,0.4);
    }
    50% {
        transform: scale(1.25);
        opacity: 0.6;
        text-shadow: 0 0 12px rgba(34,197,94,0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
        text-shadow: 0 0 0px rgba(34,197,94,0.4);
    }
}

.flash-strong {
    animation: flashStrong 0.9s ease-in-out infinite;
}


/* 🔥 glow dynamique alert */
.alert-glow-soft {
    box-shadow: 
        0 0 10px rgba(251,146,60,0.25),
        0 0 30px rgba(251,146,60,0.12);
}

.alert-glow-strong {
    box-shadow: 
        0 0 12px rgba(34,197,94,0.5),
        0 0 40px rgba(34,197,94,0.25),
        0 0 80px rgba(34,197,94,0.12);
}

.timeframe {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    margin-bottom: 10px;
}

.tf {
    flex: 1;
    padding: 10px 0;
    border-radius: 10px;
    background: #020617;
    color: #94a3b8;
    border: 1px solid rgba(148,163,184,0.15);
    font-size: 12px;
    font-weight: 500;
    transition: all 0.25s ease;
}

/* 🔥 actif */
.tf.active {
    background: #38bdf8;
    color: #020617;
    border-color: #38bdf8;
    box-shadow: 0 0 10px rgba(56,189,248,0.4);
}

/* ✨ hover subtil */
.tf:not(.active):hover {
    color: #cbd5f5;
    border-color: rgba(148,163,184,0.3);
}

/* 👇 micro interaction (effet app) */
.tf:active {
    transform: scale(0.97);
}


/* 🔥 Rendre ratio vivant */
#ratio {
    cursor: pointer;
    position: relative;
    transition: all 0.25s ease;
}

#ratio:hover {
    color: #38bdf8;
    text-shadow: 0 0 8px rgba(56,189,248,0.6);
}

#ratio:active {
    transform: scale(0.96);
}

.ratio-hint {
    font-size: 12px;
    opacity: 0.5;
    margin-left: 4px;
    transition: 0.2s;
}

#ratio:hover .ratio-hint {
    opacity: 1;
    transform: scale(1.2);
}


/* ===== BOUSSOLE ===== */

/* container */
.boussole-container {
    position: relative;
    max-width: 360px;
    margin: 60px auto 20px;
}

/* image */
.boussole-img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}


/* aiguille */
.needle {
    position: absolute;

    top: 38.8%;
    left: 50%;

    width: 3px;
    height: 28.9%;

    /* 🎯 dégradé plus lisible */
    background: linear-gradient(to top, #b45309, #facc15 70%, #fff);

    transform-origin: bottom center;

    border-radius: 2px;

    /* 🔥 contraste + profondeur */
    box-shadow: 
        0 0 10px rgba(250,204,21,0.7),
        0 0 2px rgba(0,0,0,0.8),
        0 0 4px rgba(0,0,0,0.6);

    /* 🎯 contour léger pour détacher du fond */
    border: 1px solid rgba(0,0,0,0.5);
}


/* centre de l’aiguille */
.needle::after {
    content: "";
    position: absolute;

    bottom: 0;
    left: 50%;
    transform: translate(-50%, 50%);

    width: 12px;
    height: 12px;

    background: radial-gradient(circle, #facc15, #f59e0b);
    border-radius: 50%;

    box-shadow: 0 0 14px rgba(250,204,21,0.9);
}

/* texte zone */
.boussole-zone {
    margin-top: 20px;
    font-size: 13px;
    opacity: 0.7;
}

/* valeur ratio */
.boussole-value {
    font-size: 26px;
    font-weight: 600;
}


.boussole-center {
    position: absolute;

    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%);

    text-align: center;

    font-size: 14px;
    color: #e2e8f0;

    pointer-events: none;
}


.boussole-zone,
.boussole-value {
    text-align: center;
}

.zone-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}


.boussole-info {
    position: relative;
    text-align: center;
    font-size: 11px;
    opacity: 0.7;
    cursor: pointer;
}

.tooltip {
    opacity: 0;
    pointer-events: none;

    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);

    background: #020617;
    color: #e2e8f0;
    padding: 6px 10px;
    border-radius: 6px;

    font-size: 11px;
    white-space: nowrap;

    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);

    transition: opacity 0.2s ease;
}

.tooltip.show {
    opacity: 1;
    pointer-events: auto;
}


.tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);

    border-width: 5px;
    border-style: solid;
    border-color: #020617 transparent transparent transparent;
}




/*
.etf-name {
    position: relative;
    cursor: pointer;
}
*/
