/* modules/budget/budget.css */ /* --- 1. VARIABLES & BASE --- */ /* Le root garde les couleurs sémantiques dont le JS/PHP a besoin localement */ .budget-view { font-family: "Segoe UI", system-ui, -apple-system, sans-serif; color: var(--text-main); animation: fadeIn 0.4s ease-out; } @keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } } .view-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; margin-bottom: 24px; gap: 16px; } .view-header h2 { font-size: 1.5rem; font-weight: 800; color: #0f172a; margin: 0; letter-spacing: -0.025em; } .nens-title.theme-pol { color: #1e3a8a !important; background: #eaf2ff !important; border-left: 4px solid #1e3a8a !important; border-radius: 0 8px 8px 0; padding: 8px 12px; } .nens-table.theme-pol thead th { background: #f5f9ff !important; color: #1e3a8a !important; } .nens-table.theme-pol { border-top: 2px solid #bcd3ff !important; } .nens-title.theme-pep { color: #14532d !important; background: #eaf7ea !important; border-left: 4px solid #14532d !important; border-radius: 0 8px 8px 0; padding: 8px 12px; } .nens-table.theme-pep thead th { background: #f6fdf6 !important; color: #14532d !important; } .nens-table.theme-pep { border-top: 2px solid #b9e3b9 !important; } /* --- 2. NAVIGATION TABS (Pills) --- */ .budget-tabs-container { display: inline-flex; background: var(--bg-panel); padding: 6px; border-radius: 50px; box-shadow: var(--shadow); gap: 8px; position: relative; z-index: 10; } .tab-item { display: flex; align-items: center; gap: 8px; padding: 10px 24px; border-radius: 40px; text-decoration: none; color: var(--text-muted); font-weight: 600; font-size: 0.95rem; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); border: 1px solid transparent; } .tab-item:hover { background-color: var(--bg-page); color: var(--text-main); } .tab-item.active { background: var(--primary); color: white; box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3); transform: scale(1.02); } .tab-icon { font-size: 1.1em; line-height: 1; } .owner-tabs { display: inline-flex; background: #e2e8f0; border-radius: 8px; padding: 4px; } .owner-tab { padding: 6px 20px; border-radius: 6px; text-decoration: none; color: var(--text-muted); font-weight: 600; transition: 0.2s; } .owner-tab.active { background: var(--bg-panel); color: var(--primary); box-shadow: var(--shadow-sm); } /* --- 3. BOUTONS SPÉCIFIQUES & ACTIONS --- */ .pf-btn { border-radius: 50px; /* Surcharge le global pour le budget */ } .btn-icon { background: transparent; border: none; cursor: pointer; padding: 6px; border-radius: var(--radius); transition: background 0.2s; font-size: 1.1rem; } .btn-icon:hover { background: #e2e8f0; transform: scale(1.1); } .btn-safe-click { position: relative; z-index: 10 !important; pointer-events: auto !important; } .month-actions { display: flex; gap: 4px; opacity: 0.5; transition: opacity 0.2s ease; } .month-header-container:hover .month-actions { opacity: 1; } .month-actions .btn-icon-small { font-size: 0.75rem; padding: 2px 6px; height: 24px; width: 28px; display: flex; align-items: center; justify-content: center; background: white; border: 1px solid #cbd5e1; border-radius: 4px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); cursor: pointer; transition: all 0.2s; } .month-actions .btn-icon-small:hover { background: #f8fafc; border-color: #94a3b8; } /* --- 4. TABLEAU MÉTIER --- */ .row-income td:first-child { border-left: 4px solid var(--success); } .row-expense td:first-child { border-left: 4px solid var(--danger); } .row-estimate td:first-child { border-left: 4px solid var(--warning); } .row-estimate td { color: var(--text-muted); font-style: italic; } .table-responsive { overflow-x: auto; } .sticky-col { position: sticky !important; left: 0 !important; background: var(--bg-panel) !important; z-index: 20 !important; border-right: 1px solid var(--bg-page); min-width: 150px; } th.sticky-col { z-index: 30 !important; background: #f8fafc !important; } .cell-amount { font-family: "Consolas", "Monaco", monospace; font-weight: 700; } .cell-content { position: relative; display: flex; align-items: center; justify-content: center; gap: 5px; height: 100%; } .savings-table .row-extres td { background: #fffbeb; border-top: 2px solid #e2e8f0; } .btn-cell-delete { display: none; background: rgba(239, 68, 68, 0.1); color: var(--danger); border: none; border-radius: 4px; width: 24px; height: 24px; font-size: 1.1rem; line-height: 1; cursor: pointer; padding: 0; align-items: center; justify-content: center; position: absolute; right: 5px; top: 50%; transform: translateY(-50%); text-decoration: none; transition: all 0.2s; } .btn-cell-delete:hover { background: var(--danger); color: white; } td:hover .btn-cell-delete { display: flex; } .pf-table tfoot { background: #f8fafc; border-top: 2px solid #e2e8f0; } .pf-table tfoot td { padding: 18px 16px; border-top: 1px solid #e2e8f0; } /* Inputs modifiés */ .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; } input[type="number"]::-webkit-outer-spin-button, input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; } input[type="number"] { -moz-appearance: textfield; appearance: textfield; } /* --- 5. MODALES (Extras Budget) --- */ .pf-modal-content.modal-large { max-width: 900px; transition: max-width 0.3s ease; } .import-table-wrapper { max-height: 45vh; overflow-y: auto; overflow-x: auto; -webkit-overflow-scrolling: touch; background: white; border: 1px solid #e2e8f0; border-radius: 8px; box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02); } .import-dropzone { border: 2px dashed #cbd5e1; padding: 40px 20px; text-align: center; border-radius: 12px; background: #f8fafc; } /* --- 6. UTILITAIRES & BADGES --- */ .text-success { color: var(--success); } .text-danger { color: var(--danger); } .text-muted { color: var(--text-muted); } .font-bold { font-weight: 700; } .badge-type { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; } .badge-type.mensuel { background: #eff6ff; color: var(--primary); } .badge-type.annuel { background: #f3e8ff; color: #9333ea; } .budget-note { margin-top: 15px; font-size: 0.85em; opacity: 0.8; color: var(--text-muted); } /* --- 7. BUDGET PREVISIONNEL (TIMELINE) --- */ .prev-container { display: flex; flex-direction: column; gap: 30px; } .prev-section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid #e2e8f0; } .prev-section-header h2 { margin: 0; font-size: 1.5rem; font-weight: 800; color: #0f172a; letter-spacing: -0.025em; } .prev-input { width: 100%; border: 1px solid transparent; background: transparent; text-align: center; font-family: inherit; font-size: 0.9rem; color: var(--text-main); font-weight: 500; padding: 4px 0; border-radius: 4px; transition: all 0.2s; } .prev-input:hover, .prev-input:focus { background: #eef2ff; border-color: #6366f1; outline: none; } .prev-input.bold-blue { color: #0284c7; font-weight: 700; } .prev-section-header, .view-header, .budget-view > div[style*="justify-content: space-between"] { display: flex !important; flex-direction: row !important; justify-content: space-between !important; align-items: center !important; float: none !important; position: relative !important; width: 100% !important; gap: 15px !important; } .prev-salary-table { width: 100%; max-width: 900px; background: var(--bg-panel); border-radius: var(--radius); box-shadow: var(--shadow-sm); border-collapse: separate; border-spacing: 0; overflow: hidden; border: 1px solid #e2e8f0; } .prev-salary-table th { background: #f8fafc; color: var(--text-muted); font-weight: 600; text-transform: uppercase; font-size: 0.8rem; padding: 12px; text-align: center; border-bottom: 1px solid #e2e8f0; } .prev-salary-table th:first-child { text-align: left; } .prev-salary-table td { padding: 8px 12px; border-bottom: 1px solid var(--border-light); text-align: center; } .prev-timeline-wrapper { overflow-x: auto; border: 1px solid #e2e8f0; border-radius: var(--radius); background: var(--bg-panel); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); margin-top: 15px; } .prev-alloc-table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 100%; } .prev-alloc-table th { padding: 6px 10px; border-right: 1px solid var(--border-light); white-space: nowrap; text-align: center; font-size: 0.9rem; } .prev-alloc-table td { padding: 3px 10px; border-bottom: 1px solid var(--border-light); border-right: 1px solid var(--border-light); white-space: nowrap; text-align: center; font-size: 0.9rem; } .col-sticky { position: sticky !important; left: 0 !important; z-index: 10; background-color: var(--bg-panel); border-right: 2px solid #e2e8f0; text-align: left !important; min-width: 220px; font-weight: 600; color: var(--text-main); } .col-sticky.header-cell { top: 0; z-index: 30 !important; background-color: #f8fafc; color: var(--text-muted); } .col-sticky small { display: block; font-weight: normal; color: var(--text-muted); font-style: italic; font-size: 0.75rem; } .th-month { background: #1e293b !important; color: white !important; font-size: 0.85rem !important; border-left: 2px solid white; padding: 8px !important; } .th-month.current { background: var(--primary) !important; } .th-sub { font-size: 0.7rem !important; text-transform: uppercase; background: #f8fafc; color: var(--text-muted); } .row-total td { background: #f8fafc; font-weight: 700; color: #334155; border-top: 2px solid #e2e8f0; } .row-restant td { background: #eff6ff; font-weight: 700; border-bottom: 2px solid #bfdbfe; } .txt-alex { color: #0891b2; } .txt-laia { color: #f59e0b; } .txt-global { color: var(--text-muted); font-weight: 700; background: #f8fafc; } .val-ok { color: var(--success); } .val-ko { color: var(--danger); } .nav-group { display: flex; gap: 5px; } .btn-nav { background: white; border: 1px solid #cbd5e1; padding: 4px 10px; border-radius: 6px; text-decoration: none; color: var(--text-muted); font-size: 0.85rem; font-weight: 500; transition: 0.2s; } .btn-nav:hover { background: #f1f5f9; color: var(--text-main); border-color: #94a3b8; } .row-actions { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); z-index: 50 !important; opacity: 0; pointer-events: none; display: flex; gap: 8px; transition: opacity 0.2s ease-in-out; } tr:hover .row-actions { opacity: 1; pointer-events: auto !important; } /* --- 8. RÉCAPITULATIF VIREMENTS --- */ .recap-wrapper { margin-top: 30px; padding-top: 20px; border-top: 1px solid #e2e8f0; display: flex; justify-content: center; } .recap-card { background: white; border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); overflow: hidden; width: 100%; max-width: 600px; } .recap-header { background: #1e293b; color: white; padding: 12px 20px; font-size: 1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; text-align: center; } .recap-table { width: 100%; border-collapse: collapse; } .recap-table th, .recap-table td { padding: 10px 15px; border-bottom: 1px solid var(--border-light); text-align: center; font-size: 0.95rem; } .recap-table th { font-weight: 700; text-transform: uppercase; font-size: 0.8rem; color: #64748b; background: #f8fafc; border-bottom: 2px solid #e2e8f0; } .recap-table td:first-child { text-align: left; font-weight: 600; color: #1e293b; } .col-alex { background-color: #ecfeff; color: #0891b2; border-left: 1px solid #cffafe; } th.col-alex { background-color: #cffafe; border-bottom-color: #a5f3fc; } .col-laia { background-color: #fffbeb; color: #d97706; border-left: 1px solid #fef3c7; } th.col-laia { background-color: #fef3c7; border-bottom-color: #fde68a; } .col-global { background-color: #f8fafc; color: #475569; font-weight: 700; border-left: 2px solid #e2e8f0; } .row-grand-total td { background-color: #1e293b; color: white; font-weight: 800; border: none; padding: 12px 15px; } .row-grand-total .col-alex { background: #164e63; color: #67e8f9; border: none; } .row-grand-total .col-laia { background: #78350f; color: #fcd34d; border: none; } .row-grand-total .col-global { background: #334155; color: white; border: none; } /* --- 9. STYLES SPÉCIFIQUES AU SUIVI MENSUEL --- */ .cat-card { background: var(--bg-panel); border-radius: var(--radius); border: 1px solid #e2e8f0; display: flex; flex-direction: column; overflow: hidden; position: relative; } .cat-card-header { display: flex; justify-content: space-between; align-items: center; padding: 15px; /* Padding interne à l'encart coloré */ width: 100%; } .cat-card-title-group { display: flex; flex-direction: column; } .cat-card-subtitle { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; margin-top: 2px; } .btn-add-item { background: rgba(255, 255, 255, 0.6); color: inherit; border: 1px solid rgba(0, 0, 0, 0.1); width: 28px; height: 28px; border-radius: 50%; font-size: 18px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); } .btn-add-item:hover { background: var(--bg-panel); transform: rotate(90deg) scale(1.1); box-shadow: var(--shadow-sm); border-color: currentColor; } .progress-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-top: 20px; } .fade-pulse { animation: pulseText 2s infinite; } @keyframes pulseText { 0% { opacity: 0.8; } 50% { opacity: 1; } 100% { opacity: 0.8; } } .suivi-nav-group { display: flex; background: #e2e8f0; border-radius: 6px; overflow: hidden; } .suivi-btn-nav { padding: 6px 12px; color: var(--text-muted); text-decoration: none; font-size: 0.85rem; font-weight: bold; border-right: 1px solid #cbd5e1; transition: background 0.2s, color 0.2s; } .suivi-btn-nav:last-child { border-right: none; } .suivi-btn-nav:hover { background: var(--bg-panel); color: var(--primary); } input[type="month"].pf-input { font-family: inherit; color: var(--text-main); background: white; border: 1px solid #cbd5e1; border-radius: 6px; } /* --- 10. EPARGNE --- */ .epargne-inline-input { width: 100%; min-width: 60px; max-width: 85px; border: 1px solid transparent; background: transparent; text-align: center; padding: 2px 4px; border-radius: 4px; transition: 0.2s; font-size: 0.85rem; margin: 0 auto; } .epargne-inline-input:hover { border-color: #cbd5e1; background: #f8fafc; } .epargne-inline-input:focus { border-color: var(--primary); background: #fff; outline: none; box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1); } /* --- 11. CALCULATRICE FLOTTANTE --- */ .pf-fab-sum { position: fixed; right: 30px; bottom: 30px; width: 56px; height: 56px; border-radius: 50%; background-color: #2563eb; color: white; font-size: 1.5rem; display: flex; align-items: center; justify-content: center; border: none; box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4); cursor: pointer; z-index: 9000; transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275); } .pf-fab-sum:hover { transform: scale(1.1); background-color: #1d4ed8; } .pf-fab-sum.active { background-color: #10b981; transform: scale(1.1); box-shadow: 0 4px 20px rgba(16, 185, 129, 0.5); } .pf-sum-bar { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(100px); opacity: 0; background: white; padding: 12px 24px; border-radius: 30px; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15); display: flex; align-items: center; gap: 15px; z-index: 8999; border: 1px solid #e2e8f0; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); font-family: inherit; } .pf-sum-bar.visible { transform: translateX(-50%) translateY(0); opacity: 1; } .pf-sum-label { font-size: 0.9rem; color: #64748b; font-weight: 600; } .pf-sum-value { font-size: 1.2rem; color: #0f172a; font-weight: bold; } .pf-sum-close { background: none; border: none; color: #94a3b8; font-size: 1.5rem; cursor: pointer; margin-left: 10px; padding: 0; line-height: 1; transition: color 0.2s; } .pf-sum-close:hover { color: #ef4444; } body.sum-mode-active { cursor: cell !important; } body.sum-mode-active input, body.sum-mode-active .sum-target { cursor: cell !important; } .sum-selected { outline: 2px dashed #10b981 !important; outline-offset: -2px; background-color: #ecfdf5 !important; color: #065f46 !important; transition: background-color 0.2s; } /* --- 12. RESPONSIVE MOBILE BUDGET --- */ @media (max-width: 768px) { .budget-view { padding: 10px !important; max-width: 100vw !important; box-sizing: border-box; } .budget-tabs-container { display: flex !important; flex-wrap: nowrap !important; overflow-x: auto !important; justify-content: flex-start !important; -webkit-overflow-scrolling: touch; width: 100%; padding-bottom: 5px; scrollbar-width: none; } .budget-tabs-container::-webkit-scrollbar { display: none; } .tab-item { flex: 0 0 auto !important; padding: 8px 16px !important; } .budget-view > div[style*="display:grid"] { gap: 10px !important; margin-bottom: 15px !important; } .budget-view > div[style*="display:grid"] > div { padding: 12px 10px !important; } .budget-view .categories-grid > .cat-card { padding: 0 !important; } .budget-view > div[style*="justify-content: space-between"]:not(.view-header) { flex-direction: column !important; align-items: stretch !important; } .budget-view > div[style*="justify-content: space-between"]:not(.view-header) { flex-direction: column !important; align-items: stretch !important; gap: 12px !important; margin-top: 20px !important; } .budget-view > div[style*="justify-content: space-between"]:not(.view-header) > div:first-child { width: 100% !important; } .budget-view > div[style*="justify-content: space-between"]:not(.view-header) > div:last-child { display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; width: 100% !important; gap: 10px !important; } .budget-view > div[style*="justify-content: space-between"]:not(.view-header) > div:last-child .pf-btn { flex: 1 1 50% !important; padding: 0 5px !important; font-size: 0.8rem !important; justify-content: center; } .prev-section-header { flex-direction: column !important; align-items: stretch !important; gap: 12px !important; } .prev-section-header > div { display: flex !important; flex-direction: row !important; flex-wrap: wrap !important; width: 100% !important; gap: 10px !important; } .prev-section-header .nav-group { display: flex !important; width: 100% !important; justify-content: space-between !important; } .prev-section-header .nav-group .btn-nav { flex: 1; text-align: center; } .prev-section-header .pf-btn { flex: 1 1 calc(50% - 10px) !important; width: auto !important; padding: 0 5px !important; margin: 0 !important; font-size: 0.85rem !important; } .prev-salary-table, .prev-alloc-table, .pf-table, .savings-table, .recap-wrapper { display: block !important; width: 100% !important; overflow-x: auto !important; -webkit-overflow-scrolling: touch; white-space: nowrap; border-radius: 8px !important; margin-bottom: 15px; } .recap-card { min-width: 100% !important; width: 100% !important; } .recap-table th, .recap-table td { padding: 8px 4px !important; font-size: 0.8rem !important; } .recap-header { font-size: 0.9rem !important; padding: 8px 10px !important; } .row-grand-total td { padding: 10px 4px !important; } .row-actions { position: static !important; display: inline-flex !important; opacity: 1 !important; box-shadow: none !important; background: transparent !important; border-left: none !important; padding: 1px 0 !important; transform: none !important; justify-content: flex-start; width: auto !important; } .col-sticky, .sticky-col { min-width: 120px !important; position: sticky !important; left: 0; z-index: 20 !important; white-space: normal !important; background: white !important; } th.sticky-col, th.col-sticky { z-index: 30 !important; background: #f8fafc !important; } .action-toolbar { flex-wrap: wrap !important; width: 100% !important; } .suivi-nav-group { width: 100%; justify-content: space-between; } .suivi-btn-nav { flex: 1; text-align: center; } .month-actions { opacity: 1 !important; } .btn-cell-delete { display: flex !important; opacity: 0.7; position: static; transform: none; right: auto; top: auto; } .cat-card-header { padding: 12px 10px; /* Plus serré sur mobile */ } }