Files
HouseHub/mockup_epargne.html
T
FeFeClochette 21c9b37ae0
Deploy HouseHub / deploy (push) Successful in 2s
color select
2026-09-02 19:13:51 +02:00

335 lines
9.4 KiB
HTML

<!doctype html>
<html lang="fr">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Mockup Épargne HouseHub</title>
<style>
:root {
--primary: #3b82f6;
--bg-page: #f8fafc;
--bg-panel: #ffffff;
--text-main: #0f172a;
--text-muted: #64748b;
--border-light: #e2e8f0;
--radius: 12px;
--shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
--focus-ring: rgba(37, 99, 235, 0.1);
}
body {
font-family: system-ui, sans-serif;
background: var(--bg-page);
color: var(--text-main);
padding: 40px;
}
.controls {
margin-bottom: 20px;
display: flex;
gap: 10px;
}
button {
padding: 8px 16px;
cursor: pointer;
border-radius: 8px;
border: 1px solid var(--primary);
background: white;
color: var(--primary);
font-weight: bold;
}
button.active {
background: var(--primary);
color: white;
}
/* BASE GRID (Ta structure actuelle simplifiée) */
.epargne-grid-table {
display: flex;
flex-direction: column;
background: var(--bg-panel);
border-radius: var(--radius);
box-shadow: var(--shadow);
overflow: hidden;
border: 1px solid var(--border-light);
width: 100%;
max-width: 900px;
}
.eg-row,
.eg-header-row {
display: grid;
grid-template-columns: 180px repeat(3, minmax(115px, 1fr));
transition: 0.2s;
}
.eg-cell {
display: flex;
align-items: center;
justify-content: center;
font-size: 0.9rem;
}
.eg-sticky {
position: sticky;
left: 0;
justify-content: flex-start;
z-index: 10;
font-weight: 600;
}
.eg-input {
width: 70px;
text-align: center;
border-radius: 6px;
border: 1px solid transparent;
background: transparent;
font-family: inherit;
font-size: 0.9rem;
padding: 4px;
transition: 0.2s;
}
.eg-input:focus {
background: var(--bg-panel);
border-color: var(--primary);
outline: none;
box-shadow: 0 0 0 3px var(--focus-ring);
}
/* ========================================= */
/* STYLE A : COMPACT & AÉRIEN */
/* ========================================= */
.style-a .eg-row,
.style-a .eg-header-row {
border-bottom: 1px solid var(--border-light);
}
.style-a .eg-cell {
padding: 6px 8px;
}
.style-a .eg-header-row {
background: #f8fafc;
font-size: 0.75rem;
text-transform: uppercase;
color: var(--text-muted);
}
.style-a .eg-header-row .eg-sticky {
background: #f8fafc;
}
.style-a .eg-row .eg-sticky {
background: var(--bg-panel);
border-right: 1px solid var(--border-light);
}
.style-a .eg-row:hover {
background: #f1f5f9;
}
.style-a .eg-row:hover .eg-sticky {
background: #f1f5f9;
}
.style-a .eg-input:hover {
background: #e2e8f0;
}
/* ========================================= */
/* STYLE B : ZÉBRÉ DOUX */
/* ========================================= */
.style-b .eg-cell {
padding: 8px 10px;
border-right: 1px dashed #e2e8f0;
}
.style-b .eg-header-row {
background: #1e293b;
color: white;
font-size: 0.8rem;
text-transform: uppercase;
}
.style-b .eg-header-row .eg-sticky {
background: #1e293b;
border-right: 2px solid #334155;
}
.style-b .eg-row:nth-child(even) {
background: #f8fafc;
}
.style-b .eg-row:nth-child(even) .eg-sticky {
background: #f8fafc;
}
.style-b .eg-row .eg-sticky {
background: var(--bg-panel);
border-right: 2px solid var(--border-light);
}
.style-b .eg-input {
background: #f1f5f9;
border: 1px solid #e2e8f0;
}
.style-b .eg-input:hover {
border-color: #cbd5e1;
}
/* ========================================= */
/* STYLE C : SAAS DASHBOARD */
/* ========================================= */
.style-c .eg-row,
.style-c .eg-header-row {
border-bottom: 1px solid #f1f5f9;
}
.style-c .eg-cell {
padding: 10px 12px;
}
.style-c .eg-header-row {
background: #ffffff;
color: var(--text-muted);
font-size: 0.8rem;
border-bottom: 2px solid var(--border-light);
}
.style-c .eg-header-row .eg-sticky {
background: #ffffff;
}
.style-c .eg-row .eg-sticky {
background: var(--bg-panel);
position: relative;
}
/* Barre de surbrillance au hover */
.style-c .eg-row:hover {
background: #eff6ff;
}
.style-c .eg-row:hover .eg-sticky {
background: #eff6ff;
}
.style-c .eg-row:hover .eg-sticky::before {
content: "";
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 4px;
background: var(--primary);
border-radius: 0 4px 4px 0;
}
.style-c .eg-input {
background: transparent;
border-bottom: 1px dashed #cbd5e1;
border-radius: 0;
padding: 2px 4px;
}
.style-c .eg-input:focus {
border-bottom: 1px solid var(--primary);
border-radius: 4px;
}
</style>
</head>
<body>
<div class="controls">
<button onclick="setStyle('style-a')" id="btn-a" class="active">
Style A : Compact
</button>
<button onclick="setStyle('style-b')" id="btn-b">Style B : Zébré</button>
<button onclick="setStyle('style-c')" id="btn-c">Style C : SaaS</button>
</div>
<!-- Grille Mockup -->
<div class="epargne-grid-table style-a" id="grid-container">
<div class="eg-header-row">
<div class="eg-cell eg-sticky">Poste / Mois</div>
<div class="eg-cell">Août 2026</div>
<div class="eg-cell">Juillet 2026</div>
<div class="eg-cell">Juin 2026</div>
</div>
<div class="eg-row" style="font-weight: bold; background: #f0f9ff">
<div
class="eg-cell eg-sticky"
style="background: #f0f9ff; color: #0369a1"
>
TOTAL BANQUE
</div>
<div class="eg-cell">
<input
type="number"
class="eg-input"
style="color: #0369a1; font-weight: bold"
value="7947"
/>
€
</div>
<div class="eg-cell">
<input
type="number"
class="eg-input"
style="color: #0369a1; font-weight: bold"
value="6807"
/>
€
</div>
<div class="eg-cell">
<input
type="number"
class="eg-input"
style="color: #0369a1; font-weight: bold"
value="7846"
/>
€
</div>
</div>
<div class="eg-row">
<div class="eg-cell eg-sticky">Ecole P&P</div>
<div class="eg-cell">
<input type="number" class="eg-input" value="480" />
</div>
<div class="eg-cell">
<input type="number" class="eg-input" value="480" />
</div>
<div class="eg-cell">
<input type="number" class="eg-input" value="480" />
</div>
</div>
<div class="eg-row">
<div class="eg-cell eg-sticky">Extra casa</div>
<div class="eg-cell">
<input type="number" class="eg-input" value="635" />
</div>
<div class="eg-cell">
<input type="number" class="eg-input" value="635" />
</div>
<div class="eg-cell">
<input type="number" class="eg-input" value="635" />
</div>
</div>
<div class="eg-row">
<div class="eg-cell eg-sticky">Vacances</div>
<div class="eg-cell">
<input type="number" class="eg-input" value="1002" />
</div>
<div class="eg-cell">
<input type="number" class="eg-input" value="1002" />
</div>
<div class="eg-cell">
<input type="number" class="eg-input" value="2002" />
</div>
</div>
<div class="eg-row" style="background: #fffbeb">
<div
class="eg-cell eg-sticky"
style="background: #fffbeb; color: #b45309"
>
NON ALLOUÉ
</div>
<div class="eg-cell" style="color: #10b981; font-weight: bold">
1230 €
</div>
<div class="eg-cell" style="color: #10b981; font-weight: bold">
660 €
</div>
<div class="eg-cell" style="color: #10b981; font-weight: bold">
699 €
</div>
</div>
</div>
<script>
function setStyle(styleClass) {
const grid = document.getElementById("grid-container");
grid.className = "epargne-grid-table " + styleClass;
document
.querySelectorAll(".controls button")
.forEach((btn) => btn.classList.remove("active"));
document
.getElementById("btn-" + styleClass.split("-")[1])
.classList.add("active");
}
</script>
</body>
</html>