/* ============================================
   PropFlow - Redesign UI (épuré, cohérent)
   Toutes les fonctionnalités conservées
   ============================================ */

/* --- Fond et conteneur --- */
body,
.app-container {
    background: #f2f4f6 !important;
}

/* --- Cartes unifiées (toutes les pages) --- */
.enhanced-card,
.overview-master-card,
.card {
    background: #fff !important;
    border-radius: 16px !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    padding: 20px !important;
    margin-bottom: 16px !important;
    transition: box-shadow 0.2s ease, border-color 0.2s ease !important;
}

.enhanced-card:hover,
.overview-master-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    transform: none !important;
}

/* --- Header mobile --- */
.header.mobile-only .header-content {
    padding: 12px 16px !important;
}

.header.mobile-only h1 {
    font-size: 1.35rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
}

/* --- Barre de navigation bas --- */
.nav {
    background: #fff !important;
    border-radius: 20px 20px 0 0 !important;
    box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.06) !important;
    border: none !important;
    border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
    padding: 10px 0 max(24px, env(safe-area-inset-bottom)) !important;
}

.nav-tab {
    color: #64748b !important;
    border-radius: 12px !important;
    padding: 8px 6px !important;
    min-height: 60px !important;
}

.nav-tab.active {
    color: #4f46e5 !important;
    background: rgba(79, 70, 229, 0.08) !important;
    box-shadow: none !important;
    transform: none !important;
}

.nav-text {
    font-size: 0.65rem !important;
    font-weight: 600 !important;
}

/* --- FAB --- */
.fab-floating {
    background: #4f46e5 !important;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.35) !important;
}

.fab-floating:hover {
    box-shadow: 0 12px 32px rgba(79, 70, 229, 0.45) !important;
}

/* --- Contenu principal --- */
.content {
    padding: 16px 0 calc(90px + env(safe-area-inset-bottom)) !important;
}

/* --- Métriques accueil --- */
.metric-row {
    border-radius: 12px !important;
    padding: 16px !important;
}

.metric-value-large {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
}

.metric-label-large {
    font-size: 0.8rem !important;
    color: #64748b !important;
    font-weight: 500 !important;
}

/* --- Boutons principaux --- */
.home-settings-button,
.widget-customize-btn,
.submit-btn,
.filter-btn.active {
    border-radius: 12px !important;
    font-weight: 600 !important;
}

.filter-btn {
    border-radius: 10px !important;
    padding: 8px 12px !important;
    font-size: 0.8rem !important;
}

.filter-btn.active {
    background: rgba(79, 70, 229, 0.12) !important;
    color: #4f46e5 !important;
    border-color: rgba(79, 70, 229, 0.25) !important;
}

/* --- Page Stats: barre année --- */
.stats-year-bar {
    padding: 12px 20px !important;
    margin-bottom: 12px !important;
}

.stats-year-filter {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.stats-year-select {
    border-radius: 10px !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    padding: 8px 12px !important;
    font-size: 0.9rem !important;
}

/* --- Onglets internes (métriques, propfirm, rapports) --- */
.metrics-nav-tabs,
.propfirm-nav-tabs,
.reports-nav-tabs {
    margin: 12px 0 !important;
    gap: 6px !important;
}

.metrics-tab,
.propfirm-tab,
.report-tab {
    border-radius: 10px !important;
    padding: 8px 14px !important;
    font-size: 0.8rem !important;
}

.metrics-tab.active,
.propfirm-tab.active,
.report-tab.active {
    background: rgba(79, 70, 229, 0.12) !important;
    color: #4f46e5 !important;
}

/* --- Cartes de données (Export, Import, etc.) --- */
.data-card {
    border-radius: 12px !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    transition: background 0.15s ease !important;
}

.data-card:hover {
    background: #f8fafc !important;
}

/* --- Historique --- */
.month-scroll {
    padding: 10px 0 !important;
}

.month-btn {
    border-radius: 12px !important;
    font-size: 0.85rem !important;
}

/* --- Promos --- */
.promo-card {
    border-radius: 16px !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
}

/* --- Paramètres --- */
.mode-toggle-container {
    border-radius: 12px !important;
}

.toggle-label {
    border-radius: 999px !important;
}

/* --- Titres masqués : garder l’espace cohérent --- */
.enhanced-card > .card-header,
.overview-master-card > .card-header {
    margin-bottom: 0 !important;
    min-height: 0 !important;
}

/* --- Sections stats : espacement entre blocs --- */
#stats .stats-section {
    margin-bottom: 16px !important;
}

#stats .stats-section:last-of-type {
    margin-bottom: 0 !important;
}

/* --- Bloc secondaire accueil (30j, Prop Firm #1) --- */
.stat-item-fluid {
    border-radius: 12px !important;
}

.stat-value-fluid {
    font-weight: 700 !important;
}

/* --- Zone graphique accueil --- */
.chart-section-redesigned,
.chart-container-redesigned {
    border-radius: 12px !important;
}

/* --- Mode sombre : conserver le thème --- */
html[data-theme="dark"] body,
html[data-theme="dark"] .app-container {
    background: #0f172a !important;
}

html[data-theme="dark"] .enhanced-card,
html[data-theme="dark"] .overview-master-card,
html[data-theme="dark"] .card {
    background: #1e293b !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
}

html[data-theme="dark"] .nav {
    background: #1e293b !important;
    border-top-color: rgba(255, 255, 255, 0.06) !important;
}
