monregistraire/static/index.html
2026-06-21 22:25:47 -04:00

234 lines
13 KiB
HTML

<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
<title>Mon Registraire — Gestionnaire d'immobilisations fiscales</title>
<script src="/static/vendor/react.production.min.js"></script>
<script src="/static/vendor/react-dom.production.min.js"></script>
<style>
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, Segoe UI, Roboto, sans-serif; background: #0f172a; color: #e2e8f0; }
#root { display: flex; height: 100vh; height: 100dvh; }
/* ── Main column ── */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.topbar { padding: 12px 16px; border-bottom: 1px solid #334155; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #0b1220; }
.crumb { color: #60a5fa; cursor: pointer; font-size: 14px; }
.crumb:hover { text-decoration: underline; }
.crumb.current { color: #e2e8f0; cursor: default; }
.crumb-sep { color: #475569; }
.spacer { flex: 1; }
button.bar { border: none; padding: 8px 12px; border-radius: 6px; cursor: pointer; font-size: 13px; color: white; white-space: nowrap; }
.btn-new { background: #16a34a; }
.btn-export { background: #7c3aed; }
.btn-ghost { background: #334155; }
/* ── Grid ── */
.grid-wrap { flex: 1; overflow-y: auto; padding: 20px 16px; }
.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: #64748b; margin: 0 0 10px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-bottom: 28px; }
.card { background: #1e293b; border: 1px solid #334155; border-radius: 10px; padding: 14px 16px; cursor: pointer; transition: border-color .15s, transform .1s; position: relative; }
.card:hover { border-color: #2563eb; }
.card.selected { border-color: #facc15; }
.card-type { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; padding: 2px 8px; border-radius: 999px; display: inline-block; margin-bottom: 8px; }
.t-parent { background: #1d4ed8; }
.t-piece { background: #15803d; }
.t-piece-free { background: #b45309; }
.card-name { font-weight: 600; font-size: 15px; margin-bottom: 3px; }
.card-sub { font-size: 12px; color: #94a3b8; }
.card-foot { margin-top: 10px; font-size: 11px; color: #64748b; display: flex; justify-content: space-between; align-items: center; }
.badge-status { font-size: 10px; padding: 2px 6px; border-radius: 4px; background: #334155; }
.drill { position: absolute; bottom: 12px; right: 14px; font-size: 11px; color: #60a5fa; }
.empty { color: #64748b; padding: 14px 0; }
/* ── Side panel (desktop) ── */
.panel { width: 410px; background: #0b1220; border-left: 1px solid #334155; display: flex; flex-direction: column; overflow: hidden; }
.panel-head { padding: 14px 16px; border-bottom: 1px solid #334155; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.panel-head h3 { margin: 0 0 3px; font-size: 16px; }
.panel-head .sub { font-size: 12px; color: #64748b; }
.icon-btn { background: #1e293b; border: 1px solid #334155; color: #e2e8f0; border-radius: 6px; padding: 7px 11px; cursor: pointer; font-size: 12px; white-space: nowrap; }
.tabs { display: flex; gap: 4px; padding: 10px 14px 0; }
.tab { flex: 1; padding: 9px; text-align: center; background: #1e293b; border: 1px solid #334155; cursor: pointer; font-size: 12px; border-radius: 6px 6px 0 0; }
.tab.active { background: #2563eb; border-color: #2563eb; }
.panel-body { flex: 1; overflow-y: auto; padding: 14px; }
.field { margin-bottom: 10px; font-size: 13px; }
.field b { color: #94a3b8; display: block; font-size: 11px; text-transform: uppercase; margin-bottom: 2px; }
.kpi { display: flex; gap: 8px; margin-bottom: 12px; }
.kpi > div { flex: 1; background: #1e293b; border: 1px solid #334155; border-radius: 8px; padding: 10px; }
.kpi .v { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: 10px; color: #94a3b8; text-transform: uppercase; }
.actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
button.act { flex: 1; min-width: 90px; padding: 10px 8px; border: none; border-radius: 6px; cursor: pointer; font-size: 13px; color: white; }
.btn-free { background: #475569; } .btn-stock { background: #0891b2; } .btn-scrap { background: #dc2626; }
.btn-attach { background: #2563eb; } .btn-save { background: #16a34a; } .btn-cancel { background: #475569; }
.btn-delete { background: #991b1b; }
select, input { width: 100%; padding: 8px; background: #1e293b; border: 1px solid #334155; color: #e2e8f0; border-radius: 6px; font-size: 13px; margin-bottom: 8px; }
label.fl { font-size: 11px; color: #94a3b8; text-transform: uppercase; display: block; margin-bottom: 2px; }
.locked { font-size: 11px; color: #64748b; font-style: italic; }
.journal { margin-top: 14px; background: #1e293b; border: 1px solid #334155; border-radius: 8px; padding: 12px; font-size: 12px; }
.journal table { width: 100%; border-collapse: collapse; }
.journal td { padding: 4px; border-bottom: 1px solid #334155; vertical-align: top; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.note { font-size: 11px; color: #64748b; margin-top: 8px; line-height: 1.4; }
.note.cpa { color: #f59e0b; border-left: 2px solid #f59e0b; padding-left: 6px; margin-top: 10px; }
.audit-item { font-size: 11px; border-left: 2px solid #334155; padding-left: 8px; margin-bottom: 6px; }
/* ── Welcome modal ── */
.welcome-modal { width: 620px; }
.welcome-logo { font-size: 36px; margin-bottom: 4px; }
.welcome-title { font-size: 20px; font-weight: 700; margin: 0 0 2px; }
.welcome-sub { font-size: 13px; color: #64748b; margin-bottom: 20px; }
.welcome-section { margin-bottom: 16px; }
.welcome-section h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #60a5fa; margin: 0 0 6px; }
.welcome-section p, .welcome-section li { font-size: 13px; color: #cbd5e1; line-height: 1.6; margin: 0; }
.welcome-section ul { margin: 4px 0; padding-left: 18px; }
.welcome-section li { margin-bottom: 3px; }
.welcome-warn { background: #1e293b; border-left: 3px solid #f59e0b; border-radius: 0 6px 6px 0; padding: 10px 14px; margin-top: 4px; }
.welcome-warn li { color: #fbbf24; }
.welcome-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid #334155; }
.welcome-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #94a3b8; cursor: pointer; }
.welcome-check input[type=checkbox] { width: auto; margin: 0; accent-color: #60a5fa; cursor: pointer; }
/* ── Modals ── */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.65); display: flex; align-items: center; justify-content: center; z-index: 60; }
.modal { background: #0f172a; border: 1px solid #334155; border-radius: 12px; padding: 22px; width: 760px; max-width: 94vw; max-height: 90vh; overflow-y: auto; }
.modal h3 { margin: 0 0 14px; }
.modal-actions { display: flex; gap: 8px; margin-top: 14px; }
.fmt { color: #facc15; }
table.export { width: 100%; border-collapse: collapse; font-size: 13px; }
table.export th, table.export td { padding: 7px 9px; border-bottom: 1px solid #334155; text-align: left; }
table.export th { color: #94a3b8; font-size: 11px; text-transform: uppercase; }
table.export tr.total td { font-weight: 700; background: #1e293b; }
/* ── Sheet handle (mobile only, invisible on desktop) ── */
.sheet-handle { display: none; }
/* ── Bottom nav & FAB (mobile only) ── */
.bottom-nav { display: none; }
.fab, .fab-menu { display: none; }
.sheet-backdrop { display: none; }
.desktop-btns { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
/* ════════════════════════════════════════
MOBILE (≤ 767 px)
════════════════════════════════════════ */
@media (max-width: 767px) {
#root { flex-direction: column; height: 100dvh; overflow: hidden; }
/* main takes full width */
.main { width: 100%; }
.grid-wrap { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px) + 16px); }
/* hide desktop side panel & buttons */
.desktop-btns { display: none; }
.panel {
position: fixed; bottom: 0; left: 0; right: 0;
width: 100%; max-height: 82dvh;
border-left: none; border-top: 1px solid #334155;
border-radius: 20px 20px 0 0;
transform: translateY(102%);
transition: transform .32s cubic-bezier(.32,.72,0,1);
z-index: 45; overflow-y: auto;
padding-bottom: env(safe-area-inset-bottom, 0px);
}
.panel.open { transform: translateY(0); }
/* drag handle */
.sheet-handle { display: block; width: 38px; height: 4px; border-radius: 2px; background: #475569; margin: 10px auto 4px; flex-shrink: 0; }
/* backdrop */
.sheet-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.52); z-index: 44; }
/* bottom navigation */
.bottom-nav {
display: flex; position: fixed; bottom: 0; left: 0; right: 0;
height: calc(60px + env(safe-area-inset-bottom, 0px));
padding-bottom: env(safe-area-inset-bottom, 0px);
background: #0b1220; border-top: 1px solid #334155; z-index: 50;
}
.nav-item {
flex: 1; display: flex; flex-direction: column;
align-items: center; justify-content: center; gap: 2px;
color: #64748b; cursor: pointer; font-size: 10px; min-height: 44px;
-webkit-tap-highlight-color: transparent;
transition: color .15s;
}
.nav-item:active, .nav-item.active { color: #60a5fa; }
.nav-icon { font-size: 20px; line-height: 1.1; }
.nav-spacer { flex: 1; pointer-events: none; } /* center gap for FAB */
/* FAB */
.fab {
display: flex; position: fixed;
bottom: calc(36px + env(safe-area-inset-bottom, 0px));
left: 50%; transform: translateX(-50%);
width: 54px; height: 54px; border-radius: 27px;
background: #16a34a; border: 3px solid #0f172a;
color: white; font-size: 26px; font-weight: 300; cursor: pointer;
box-shadow: 0 4px 18px rgba(0,0,0,.55);
z-index: 51; align-items: center; justify-content: center;
transition: background .2s, transform .2s;
-webkit-tap-highlight-color: transparent;
}
.fab.fab-open { background: #7c3aed; }
/* FAB menu */
.fab-menu {
display: flex; position: fixed;
bottom: calc(102px + env(safe-area-inset-bottom, 0px));
left: 50%; transform: translateX(-50%);
flex-direction: column; gap: 10px; z-index: 51; align-items: center;
}
.fab-opt {
background: #1e293b; border: 1px solid #475569; color: #e2e8f0;
border-radius: 12px; padding: 14px 22px; font-size: 15px; cursor: pointer;
white-space: nowrap; display: flex; gap: 12px; align-items: center;
min-width: 210px; box-shadow: 0 6px 20px rgba(0,0,0,.45);
-webkit-tap-highlight-color: transparent;
}
/* tool sheet (fiscal / plus menus) */
.tool-sheet {
position: fixed;
bottom: calc(60px + env(safe-area-inset-bottom, 0px));
left: 0; right: 0; z-index: 46;
background: #0b1220; border: 1px solid #334155; border-bottom: none;
border-radius: 20px 20px 0 0;
animation: sheetUp .22s ease;
}
.tool-sheet-handle { width: 38px; height: 4px; border-radius: 2px; background: #475569; margin: 10px auto 2px; }
.tool-opt {
display: flex; align-items: center; gap: 16px;
padding: 17px 22px; font-size: 16px; cursor: pointer;
border: none; background: none; color: #e2e8f0; width: 100%; text-align: left;
-webkit-tap-highlight-color: transparent;
}
.tool-opt:active { background: #1e293b; }
.tool-icon { font-size: 22px; width: 30px; text-align: center; }
.tool-sep { height: 1px; background: #334155; margin: 0 22px; }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
/* larger tap targets in panels */
button.act { padding: 13px 8px; font-size: 14px; min-height: 46px; }
.icon-btn { padding: 10px 14px; font-size: 13px; min-height: 40px; }
.tab { padding: 11px; font-size: 13px; min-height: 44px; }
/* cards: 1 column, bigger */
.grid { grid-template-columns: 1fr; gap: 10px; }
.card { padding: 14px 16px; min-height: 78px; }
.card-name { font-size: 16px; }
/* modals full-screen on mobile */
.modal-bg { align-items: flex-end; }
.modal { width: 100% !important; max-width: 100vw !important; border-radius: 20px 20px 0 0; border-left: none; border-right: none; border-bottom: none; max-height: 94dvh; padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
/* topbar minimal */
.topbar { padding: 10px 14px; }
}
</style>
</head>
<body>
<div id="root"></div>
<script src="/static/app.js"></script>
</body>
</html>