
/* PAGE 4 ACTIONS — STYLES COMPLETEMENT ISOLES */

#actionsPage {
    display: none;
    opacity: 0;
    flex-direction: column;
    width: 100%;
    height: 100vh;
    min-height: 0;
    overflow: hidden;
    box-sizing: border-box;
    padding: 58px 30px 24px;
    gap: 15px;
    color: #f2f6ff;
    background:
        radial-gradient(circle at 15% 0%, #1b3155, transparent 42%),
        linear-gradient(145deg, #101d33, #080f1c);
    font-family: Arial, sans-serif;
}

#actionsPage * {
    box-sizing: border-box;
}

#actionsPage .actions-header {
    display: flex;
    flex: 0 0 auto;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin: 0;
}

#actionsPage .actions-header > div:first-child {
    min-width: 0;
}

#actionsPage .actions-eyebrow {
    font-size: 12px;
    color: #86b7ff;
    letter-spacing: 2px;
    font-weight: bold;
}

#actionsPage .actions-header h1 {
    font-size: 32px;
    line-height: 1.15;
    margin: 5px 0;
    white-space: nowrap;
}

#actionsPage .actions-header p {
    font-size: 14px;
    margin: 0;
    color: #b0bfd4;
}

#actionsPage .actions-clock {
    font-size: 28px;
    font-weight: bold;
    white-space: nowrap;
}

#actionsPage .actions-summary {
    display: grid;
    flex: 0 0 auto;
    width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

#actionsPage .actions-metric {
    min-width: 0;
    padding: 12px 16px;
    border-radius: 14px;
    background: #ffffff0d;
    border: 1px solid #ffffff18;
}

#actionsPage .actions-metric span {
    display: block;
    font-size: 11px;
    color: #9eb2d0;
    margin-bottom: 5px;
}

#actionsPage .actions-metric strong {
    display: block;
    font-size: clamp(15px, 1.5vw, 24px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#actionsPage .actions-grid {
    display: grid;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr) minmax(0, .75fr);
    gap: 14px;
    align-items: stretch;
}

#actionsPage .action-card,
#actionsPage .actions-side {
    min-width: 0;
    min-height: 0;
    padding: 18px;
    border-radius: 18px;
    background: #ffffff0d;
    border: 1px solid #ffffff1b;
    box-shadow: 0 8px 22px #00000025;
    overflow: hidden;
}

#actionsPage .action-card {
    display: flex;
    flex-direction: column;
}

#actionsPage .action-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 12px;
}

#actionsPage .action-symbol {
    font-size: 24px;
    font-weight: bold;
}

#actionsPage .action-name {
    font-size: 13px;
    color: #a9b9d2;
}

#actionsPage .action-badge {
    font-size: 11px;
    padding: 5px 8px;
    border-radius: 12px;
    background: #69aaff22;
    color: #b5d2ff;
    white-space: nowrap;
}

#actionsPage .action-price {
    font-size: clamp(25px, 2.4vw, 39px);
    font-weight: bold;
    margin: 0 0 8px;
}

#actionsPage .action-change {
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 7px;
}

#actionsPage .action-change.positive {
    color: #4be2a2;
}

#actionsPage .action-change.negative {
    color: #ff8192;
}

#actionsPage .action-session {
    font-size: 12px;
    color: #a6b9d4;
    margin: 0 0 10px;
}

#actionsPage .action-chart {
    display: flex;
    flex: 1 1 auto;
    min-height: 65px;
    width: 100%;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #050b16aa;
    overflow: hidden;
}

#actionsPage .action-chart svg {
    width: 100%;
    height: 100%;
}

#actionsPage .actions-side {
    grid-column: 1 / -1;
    padding: 15px 20px;
}

#actionsPage .actions-side h2 {
    font-size: 18px;
    margin: 0 0 12px;
}

#actionsPage .actions-strategies {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

#actionsPage .strategy-card {
    min-width: 0;
    padding: 12px;
    border-radius: 12px;
    background: #080f1cb5;
    border: 1px solid #ffffff15;
}

#actionsPage .strategy-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
}

#actionsPage .strategy-name {
    font-size: 14px;
    font-weight: bold;
}

#actionsPage .strategy-badge {
    font-size: 10px;
    color: #4be2a2;
}

#actionsPage .strategy-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 10px;
}

#actionsPage .strategy-metrics div {
    min-width: 0;
}

#actionsPage .strategy-metrics span {
    display: block;
    font-size: 10px;
    color: #9fb1cb;
}

#actionsPage .strategy-metrics strong {
    display: block;
    font-size: 14px;
    margin-top: 4px;
}

#actionsPage .actions-note {
    font-size: 11px;
    color: #93a7c2;
    margin-top: 10px;
    padding: 0;
    background: none;
    border: 0;
}

#actionsPage .actions-footer {
    display: flex;
    flex: 0 0 auto;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
    color: #a9bbd3;
    margin: 0;
}

@media (max-width: 950px) {
    #actionsPage {
        overflow: auto;
        height: auto;
        min-height: 100vh;
    }

    #actionsPage .actions-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #actionsPage .actions-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    #actionsPage .actions-side {
        grid-column: auto;
    }

    #actionsPage .actions-strategies {
        grid-template-columns: 1fr;
    }
}


/* INDICATEUR WALL STREET — PAGE ACTIONS UNIQUEMENT */

#actionsPage .actions-market-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 7px;
    flex-shrink: 0;
}

#actionsPage .actions-market-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #d4deed;
    white-space: nowrap;
}

#actionsPage .actions-market-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff7585;
    box-shadow: 0 0 9px #ff758577;
    flex-shrink: 0;
}

#actionsPage .actions-market-status.is-open
.actions-market-dot {
    background: #38e69b;
    box-shadow: 0 0 11px #38e69b99;
}

#actionsPage .actions-last-quote {
    font-size: 11px;
    color: #9eb1ce;
    text-align: right;
    max-width: 330px;
}



/* COURBES ACTIONS — AFFICHAGE RENFORCE */

#actionsPage .actions-grid {
    grid-template-rows:
        minmax(350px, 1fr)
        minmax(160px, .65fr);
}

#actionsPage .action-card {
    gap: 3px;
}

#actionsPage .action-chart {
    display: block;
    flex: 1 1 auto;
    width: 100%;
    height: 170px;
    min-height: 145px;
    padding: 5px;
    border: 1px solid #ffffff24;
    border-radius: 14px;
    background: #060d19;
    overflow: hidden;
}

#actionsPage .action-chart svg {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 130px;
}

#actionsPage .action-session {
    font-size: 13px;
    color: #bdd1e9;
    font-weight: 600;
}

@media (max-width: 950px) {
    #actionsPage .actions-grid {
        grid-template-rows: auto;
    }

    #actionsPage .action-chart {
        height: 190px;
    }
}


/* ACTIONS FIT SCREEN V1 */

/* Dimensions strictement limitees a l'ecran */
#actionsPage {
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 0 !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
    padding: 54px 26px 18px !important;
    gap: 10px !important;
}

/* En-tete compact */
#actionsPage .actions-header {
    flex: 0 0 auto !important;
    margin: 0 !important;
}

#actionsPage .actions-header h1 {
    font-size: 28px !important;
}

/* Resume compact */
#actionsPage .actions-summary {
    flex: 0 0 auto !important;
    gap: 10px !important;
    margin: 0 !important;
}

#actionsPage .actions-metric {
    padding: 9px 13px !important;
}

/* Les graphiques et strategies partagent l'espace restant */
#actionsPage .actions-grid {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    height: auto !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-template-rows:
        minmax(0, 1.35fr)
        minmax(0, 1fr) !important;
    gap: 10px !important;
}

/* Cartes compactes */
#actionsPage .action-card {
    min-height: 0 !important;
    padding: 12px 15px !important;
    gap: 0 !important;
}

#actionsPage .action-top {
    margin-bottom: 7px !important;
}

#actionsPage .action-symbol {
    font-size: 20px !important;
}

#actionsPage .action-price {
    font-size: 29px !important;
    margin-bottom: 5px !important;
}

#actionsPage .action-change {
    margin-bottom: 5px !important;
}

#actionsPage .action-session {
    margin-bottom: 7px !important;
}

/* Courbes visibles sans agrandir la page */
#actionsPage .action-chart {
    flex: 1 1 0 !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 4px !important;
    margin: 0 !important;
}

#actionsPage .action-chart svg {
    height: 100% !important;
    min-height: 0 !important;
}

/* Strategies sur une ligne compacte */
#actionsPage .actions-side {
    min-height: 0 !important;
    padding: 12px 15px !important;
    overflow: hidden !important;
}

#actionsPage .actions-side h2 {
    margin-bottom: 8px !important;
}

#actionsPage .actions-strategies {
    gap: 10px !important;
}

#actionsPage .strategy-card {
    padding: 9px !important;
}

#actionsPage .strategy-metrics {
    margin-top: 7px !important;
}

#actionsPage .actions-note {
    margin-top: 7px !important;
}

/* Pied de page toujours visible */
#actionsPage .actions-footer {
    flex: 0 0 auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Ecrans en orientation portrait */
@media (max-width: 950px) {
    #actionsPage {
        height: auto !important;
        max-height: none !important;
        min-height: 100vh !important;
        overflow-y: auto !important;
    }

    #actionsPage .actions-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        grid-template-rows: auto !important;
    }

    #actionsPage .action-chart {
        min-height: 130px !important;
    }
}
