/* ============================================================
   Bananasdaq — main.css
   Styles communs à toutes les pages.
   Import Satoshi variable font (fontshare) : toutes les
   graisses de 1 à 900 disponibles sans restriction.
   ============================================================ */

@import url('https://api.fontshare.com/v2/css?f[]=satoshi@1,300,400,500,600,700,800,900&display=swap');

/* --- Variables ------------------------------------------------ */
:root {
    --green:  #1D9E75;
    --red:    #E24B4A;
    --yellow: #EFAE10;
    --border: #eee;
    --muted:  #aaa;
}

/* --- Reset minimal -------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Satoshi', system-ui, sans-serif;
    background: #fff;
    color: #111;
    margin: 0;
}

/* Les éléments de formulaire n'héritent pas la police par défaut */
input, button, select, textarea {
    font-family: inherit;
}

a { text-decoration: none; color: inherit; }

/* --- Conteneur centré ----------------------------------------- */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 24px;
}

/* --- Header / Nav --------------------------------------------- */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    margin-bottom: 28px;
}

.logo {
    font-weight: 600;
    font-size: 20px;
}

.nav-right {
    display: flex;
    gap: 18px;
    align-items: center;
    font-size: 13px;
    font-weight: 700;
    color: #555;
}

.nav-right a { color: #555; }
.nav-right a.active { color: #111; }

.signin-btn {
    background: #111;
    color: #fff !important;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 800;
}

.signout-btn {
    background: #f2f2f2;
    color: #111 !important;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 800;
}

/* --- Utilitaires couleurs ------------------------------------- */
.up   { color: var(--green); }
.down { color: var(--red);   }

/* --- Titre de section ----------------------------------------- */
.section-title {
    font-weight: 900;
    font-size: 15px;
    margin-bottom: 12px;
}

/* --- État vide ------------------------------------------------- */
.empty-state {
    font-size: 13px;
    color: var(--muted);
    padding: 12px 0 32px;
}

/* --- Onglets de plage temporelle (graphiques) ----------------- */
.range-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.range-tab {
    font-size: 12px;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 14px;
    cursor: pointer;
    color: #999;
    user-select: none;
}

.range-tab.active {
    background: #111;
    color: #fff;
}

/* --- Stats bar (index + portfolio) ----------------------------- */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 28px 0 0;
}

.stat-card {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
}

.stat-label { font-size: 11px; font-weight: 800; color: var(--muted); margin-bottom: 4px; }
.stat-value { font-size: 20px; font-weight: 900; }
.stat-value.up  { color: var(--green); }
.stat-value.down { color: var(--red); }
.stat-sub  { font-size: 12px; font-weight: 700; color: var(--muted); margin-top: 2px; }

/* --- Hamburger (masqué sur desktop) ---------------------------- */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    padding: 2px 6px;
    color: #111;
}

/* ============================================================
   Responsive — mobile first à partir de 700 px
   ============================================================ */

@media (max-width: 700px) {

    /* Conteneur : moins de padding sur petits écrans */
    .container { padding: 16px; }

    /* Header : wrap en deux lignes (logo | burger → nav en dessous) */
    .header {
        flex-wrap: wrap;
        margin-bottom: 16px;
    }

    .hamburger { display: flex; align-items: center; }

    /* Nav cachée par défaut, visible quand .open */
    .nav-right {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 16px;
        font-size: 15px;
        padding-top: 16px;
        margin-top: 14px;
        border-top: 1px solid var(--border);
    }
    .nav-right.open { display: flex; }

    .nav-right span { color: var(--muted); font-size: 13px; }
    .signin-btn, .signout-btn { margin-top: 4px; }

    /* Graphiques plus courts sur mobile */
    .chart-wrap { height: 180px; }

    /* Stats bar : 2 colonnes sur mobile */
    .stats-bar { grid-template-columns: 1fr 1fr; }
    .stat-value { font-size: 17px; }
}

@media (max-width: 420px) {
    /* Stats bar : 1 colonne sur très petits écrans */
    .stats-bar { grid-template-columns: 1fr; }
}
