500 lines
15 KiB
HTML
500 lines
15 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="fr">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Décompte Horaire</title>
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link href="https://fonts.googleapis.com/css2?family=DM+Mono:wght@300;400;500&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600&display=swap" rel="stylesheet">
|
|
<script src="/static/htmx.min.js"></script>
|
|
<style>
|
|
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
|
|
|
:root {
|
|
--ground: #F4F0E8;
|
|
--surface: #FDFAF4;
|
|
--text: #1C1712;
|
|
--muted: #6B6152;
|
|
--rule: #D8D0C0;
|
|
--rule-l: #EAE5DA;
|
|
--accent: #2F5FA0;
|
|
--accent-2: #B86A08;
|
|
--pos: #2A5E42;
|
|
--pos-bg: #EBF5EE;
|
|
--neg: #9B3528;
|
|
--neg-bg: #F9EDEB;
|
|
--conge-bg: #FEF6E4;
|
|
--conge-bd: #E8C97A;
|
|
--conge-txt: #7A5300;
|
|
--nav-bg: #1C1712;
|
|
--mono: 'DM Mono', 'Cascadia Code', ui-monospace, monospace;
|
|
--sans: 'DM Sans', system-ui, -apple-system, sans-serif;
|
|
}
|
|
|
|
body {
|
|
font-family: var(--sans);
|
|
background: var(--ground);
|
|
color: var(--text);
|
|
font-size: 14px;
|
|
line-height: 1.5;
|
|
min-height: 100vh;
|
|
}
|
|
|
|
/* ── Nav ── */
|
|
nav {
|
|
background: var(--nav-bg);
|
|
color: var(--ground);
|
|
height: 50px;
|
|
padding: 0 2rem;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 2rem;
|
|
border-bottom: 3px solid var(--accent-2);
|
|
}
|
|
.nav-brand {
|
|
font-family: var(--mono);
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
color: var(--ground);
|
|
text-decoration: none;
|
|
letter-spacing: .1em;
|
|
text-transform: uppercase;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: .55rem;
|
|
}
|
|
.nav-dot {
|
|
width: 7px; height: 7px;
|
|
border-radius: 50%;
|
|
background: var(--accent-2);
|
|
display: inline-block;
|
|
flex-shrink: 0;
|
|
}
|
|
nav .spacer { flex: 1; }
|
|
nav a.nav-link {
|
|
color: rgba(244,240,232,.55);
|
|
text-decoration: none;
|
|
font-size: 12px;
|
|
letter-spacing: .02em;
|
|
transition: color .15s;
|
|
}
|
|
nav a.nav-link:hover { color: var(--ground); }
|
|
|
|
/* ── Layout ── */
|
|
.container {
|
|
max-width: 1100px;
|
|
margin: 0 auto;
|
|
padding: 2rem 1.5rem;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1.75rem;
|
|
}
|
|
|
|
/* ── Week header ── */
|
|
.week-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 1rem;
|
|
border-bottom: 2px solid var(--text);
|
|
padding-bottom: .75rem;
|
|
}
|
|
.week-nav-arrows { display: flex; gap: .4rem; }
|
|
.arrow-btn {
|
|
width: 28px; height: 28px;
|
|
display: flex; align-items: center; justify-content: center;
|
|
border: 1.5px solid var(--rule);
|
|
background: transparent;
|
|
cursor: pointer;
|
|
font-size: 14px;
|
|
color: var(--muted);
|
|
text-decoration: none;
|
|
transition: border-color .15s, color .15s;
|
|
}
|
|
.arrow-btn:hover { border-color: var(--text); color: var(--text); }
|
|
.week-id {
|
|
font-family: var(--mono);
|
|
font-size: 1.75rem;
|
|
font-weight: 500;
|
|
letter-spacing: -.02em;
|
|
line-height: 1;
|
|
}
|
|
.week-id .wk { color: var(--muted); font-size: 1rem; font-weight: 300; }
|
|
.week-id .slash { color: var(--rule); margin: 0 .2em; }
|
|
|
|
/* ── Soldes ── */
|
|
.soldes {
|
|
display: grid;
|
|
grid-template-columns: repeat(3, 1fr);
|
|
border: 1.5px solid var(--rule);
|
|
background: var(--surface);
|
|
}
|
|
@media (max-width: 600px) { .soldes { grid-template-columns: 1fr 1fr; } }
|
|
.solde-item {
|
|
padding: 1rem 1.25rem;
|
|
border-right: 1px solid var(--rule);
|
|
}
|
|
.solde-item:last-child { border-right: none; }
|
|
.solde-item.item-pos { background: var(--pos-bg); }
|
|
.solde-item.item-neg { background: var(--neg-bg); }
|
|
.solde-eyebrow {
|
|
font-family: var(--mono);
|
|
font-size: 9px;
|
|
letter-spacing: .12em;
|
|
text-transform: uppercase;
|
|
color: var(--muted);
|
|
margin-bottom: .45rem;
|
|
}
|
|
.solde-num {
|
|
font-family: var(--mono);
|
|
font-size: 1.9rem;
|
|
font-weight: 500;
|
|
letter-spacing: -.03em;
|
|
line-height: 1;
|
|
}
|
|
.solde-num.pos { color: var(--pos); }
|
|
.solde-num.neg { color: var(--neg); }
|
|
.solde-num.neutral { color: var(--text); }
|
|
|
|
/* ── Table ── */
|
|
.table-section { overflow-x: auto; -webkit-overflow-scrolling: touch; }
|
|
table {
|
|
border-collapse: collapse;
|
|
border: 1.5px solid var(--rule);
|
|
background: var(--surface);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.th-group th {
|
|
padding: .45rem .85rem .25rem;
|
|
font-family: var(--mono);
|
|
font-size: 9px;
|
|
letter-spacing: .12em;
|
|
text-transform: uppercase;
|
|
font-weight: 500;
|
|
color: var(--muted);
|
|
border-bottom: 1px solid var(--rule-l);
|
|
background: var(--ground);
|
|
white-space: nowrap;
|
|
}
|
|
.th-group .g-matin {
|
|
background: rgba(47,95,160,.07);
|
|
color: var(--accent);
|
|
border-left: 3px solid var(--accent);
|
|
text-align: center;
|
|
}
|
|
.th-group .g-aprem {
|
|
background: rgba(184,106,8,.07);
|
|
color: var(--accent-2);
|
|
border-left: 3px solid var(--accent-2);
|
|
text-align: center;
|
|
}
|
|
.th-group .g-calc { text-align: right; }
|
|
.th-group .g-conge { text-align: center; }
|
|
|
|
.th-sub th {
|
|
padding: .25rem .85rem .5rem;
|
|
font-size: 10px;
|
|
color: rgba(107,97,82,.65);
|
|
border-bottom: 2px solid var(--text);
|
|
font-weight: 400;
|
|
background: var(--ground);
|
|
white-space: nowrap;
|
|
}
|
|
.th-sub .s-matin {
|
|
background: rgba(47,95,160,.04);
|
|
border-left: 3px solid var(--accent);
|
|
color: rgba(47,95,160,.75);
|
|
text-align: center;
|
|
font-family: var(--mono);
|
|
font-size: 9px;
|
|
letter-spacing: .04em;
|
|
}
|
|
.th-sub .s-aprem {
|
|
background: rgba(184,106,8,.04);
|
|
border-left: 3px solid var(--accent-2);
|
|
color: rgba(184,106,8,.85);
|
|
text-align: center;
|
|
font-family: var(--mono);
|
|
font-size: 9px;
|
|
letter-spacing: .04em;
|
|
}
|
|
.th-sub .s-calc { text-align: right; }
|
|
.th-sub .s-conge { text-align: center; }
|
|
|
|
tbody tr { transition: background .1s; }
|
|
tbody tr:hover td { background: rgba(47,95,160,.025); }
|
|
tbody tr:hover .td-fill { background: rgba(47,95,160,.025); }
|
|
tbody tr:hover .td-fill.cg { background: var(--conge-bg); }
|
|
tbody tr:not(:last-child) td { border-bottom: 1px solid var(--rule-l); }
|
|
|
|
td {
|
|
padding: .6rem .85rem;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
/* Matin / aprem cells: padding moved to inner .td-fill so OOB can target it */
|
|
td.c-matin, td.c-aprem { padding: 0; }
|
|
.td-fill {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: .6rem .85rem;
|
|
}
|
|
td.c-matin .td-fill { border-left: 3px solid rgba(47,95,160,.2); }
|
|
td.c-aprem .td-fill { border-left: 3px solid rgba(184,106,8,.2); }
|
|
|
|
/* Congé state — applied to the inner div, not the <td> */
|
|
.td-fill.cg {
|
|
background: var(--conge-bg);
|
|
}
|
|
td.c-matin .td-fill.cg,
|
|
td.c-aprem .td-fill.cg { border-left-color: var(--conge-bd); }
|
|
.td-fill.cg .time-input { background: var(--conge-bg); }
|
|
|
|
.col-jour { white-space: nowrap; }
|
|
.jour-nom { display: block; font-weight: 500; font-size: 13px; }
|
|
.jour-date { display: block; font-family: var(--mono); font-size: 11px; color: var(--muted); }
|
|
|
|
.time-pair { display: flex; align-items: center; gap: 4px; justify-content: center; }
|
|
.time-sep { color: var(--rule); font-size: 11px; flex-shrink: 0; }
|
|
.time-input {
|
|
width: 80px;
|
|
padding: .28rem .4rem;
|
|
border: 1px solid var(--rule);
|
|
border-radius: 0;
|
|
font-family: var(--mono);
|
|
font-size: 12px;
|
|
color: var(--text);
|
|
background: transparent;
|
|
text-align: center;
|
|
transition: border-color .15s;
|
|
}
|
|
.time-input:hover { border-color: var(--muted); }
|
|
.time-input:focus { outline: none; border-color: var(--accent); background: #fff; }
|
|
tr.htmx-request .time-input { opacity: .4; }
|
|
|
|
.col-calc { text-align: right; padding-left: .5rem; }
|
|
.calc-num { font-family: var(--mono); font-size: 13px; color: var(--muted); }
|
|
.delta-pos { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--pos); }
|
|
.delta-neg { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--neg); }
|
|
.delta-zero{ font-family: var(--mono); font-size: 13px; color: var(--rule); }
|
|
|
|
/* Warn state: time input violates minimum directive */
|
|
td.c-matin .td-fill.warn,
|
|
td.c-aprem .td-fill.warn { border-left-color: var(--neg); background: var(--neg-bg); }
|
|
.td-fill.warn .time-input { background: transparent; }
|
|
tbody tr:hover .td-fill.warn { background: var(--neg-bg); }
|
|
|
|
/* Cumulative delta and sortie cible columns */
|
|
.col-cumul { text-align: right; padding-left: .5rem; }
|
|
.col-cible { text-align: right; padding-left: .5rem; }
|
|
.g-cumul { text-align: right; }
|
|
.g-cible { text-align: right; }
|
|
.cible-num { font-family: var(--mono); font-size: 12px; color: var(--accent); font-weight: 500; }
|
|
|
|
.col-save { text-align: center; padding: .4rem .3rem; }
|
|
.g-save { background: var(--ground); }
|
|
.btn-valider {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 26px; height: 26px;
|
|
border: 1.5px solid var(--accent);
|
|
background: transparent;
|
|
cursor: pointer;
|
|
font-size: 13px;
|
|
color: var(--accent);
|
|
transition: background .15s, color .15s;
|
|
}
|
|
.btn-valider:hover { background: var(--accent); color: #fff; }
|
|
.btn-valider.htmx-request { opacity: .4; pointer-events: none; }
|
|
.col-conge { text-align: center; }
|
|
.conge-btns { display: flex; gap: 3px; justify-content: center; }
|
|
.btn-cg {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 24px; height: 24px;
|
|
border: 1.5px solid var(--rule);
|
|
background: transparent;
|
|
cursor: pointer;
|
|
font-family: var(--mono);
|
|
font-size: 9px;
|
|
font-weight: 500;
|
|
letter-spacing: .04em;
|
|
color: var(--muted);
|
|
transition: all .15s;
|
|
}
|
|
.btn-cg:hover { border-color: var(--conge-txt); color: var(--conge-txt); background: var(--conge-bg); }
|
|
.btn-cg.on { background: var(--conge-bg); border-color: var(--conge-bd); color: var(--conge-txt); }
|
|
.btn-cg.btn-jour { border-radius: 50%; width: 22px; height: 22px; font-size: 9px; }
|
|
.btn-cg.jour-on { background: var(--accent-2); border-color: #955505; color: #fff; }
|
|
|
|
/* ── Historique ── */
|
|
.history {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: .75rem;
|
|
border-top: 1px solid var(--rule);
|
|
padding-top: 1.25rem;
|
|
}
|
|
.hist-label {
|
|
font-family: var(--mono);
|
|
font-size: 9px;
|
|
letter-spacing: .12em;
|
|
text-transform: uppercase;
|
|
color: var(--muted);
|
|
}
|
|
.hist-body { display: flex; flex-direction: column; gap: .6rem; }
|
|
.hist-year-group { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
|
|
.hist-year {
|
|
font-family: var(--mono);
|
|
font-size: 11px;
|
|
font-weight: 500;
|
|
color: var(--muted);
|
|
width: 36px;
|
|
flex-shrink: 0;
|
|
}
|
|
.hist-chips { display: flex; flex-wrap: wrap; gap: .3rem; }
|
|
.chip {
|
|
font-family: var(--mono);
|
|
font-size: 11px;
|
|
padding: .18rem .5rem;
|
|
border: 1px solid var(--rule);
|
|
color: var(--muted);
|
|
text-decoration: none;
|
|
letter-spacing: .02em;
|
|
transition: all .15s;
|
|
}
|
|
.chip:hover { border-color: var(--text); color: var(--text); }
|
|
.chip.here { background: var(--text); border-color: var(--text); color: var(--ground); }
|
|
|
|
/* ── Calendrier sélecteur ── */
|
|
.cal-trigger-wrap { position: relative; }
|
|
|
|
.cal-trigger {
|
|
display: flex;
|
|
align-items: baseline;
|
|
gap: .1em;
|
|
background: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
font-family: var(--mono);
|
|
font-size: 1.75rem;
|
|
font-weight: 500;
|
|
letter-spacing: -.02em;
|
|
color: var(--text);
|
|
padding: 0;
|
|
line-height: 1;
|
|
}
|
|
.cal-trigger .wk { color: var(--muted); font-size: 1rem; font-weight: 300; }
|
|
.cal-trigger .slash { color: var(--rule); margin: 0 .2em; }
|
|
.cal-trigger .cal-caret {
|
|
font-size: .85rem;
|
|
color: var(--muted);
|
|
margin-left: .35em;
|
|
transition: transform .15s;
|
|
}
|
|
.cal-trigger[aria-expanded="true"] .cal-caret { transform: rotate(180deg); }
|
|
.cal-trigger:hover .cal-caret { color: var(--text); }
|
|
|
|
.cal-popup {
|
|
position: absolute;
|
|
top: calc(100% + .5rem);
|
|
left: 0;
|
|
z-index: 100;
|
|
background: var(--surface);
|
|
border: 1.5px solid var(--rule);
|
|
box-shadow: 0 4px 20px rgba(28,23,18,.12);
|
|
padding: .75rem;
|
|
min-width: 260px;
|
|
}
|
|
.cal-popup[hidden] { display: none; }
|
|
|
|
.cal-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin-bottom: .6rem;
|
|
}
|
|
.cal-month-label {
|
|
font-family: var(--mono);
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
letter-spacing: .04em;
|
|
text-transform: uppercase;
|
|
color: var(--text);
|
|
}
|
|
.cal-nav {
|
|
background: none;
|
|
border: 1px solid var(--rule);
|
|
width: 24px; height: 24px;
|
|
cursor: pointer;
|
|
font-size: 12px;
|
|
color: var(--muted);
|
|
display: flex; align-items: center; justify-content: center;
|
|
transition: border-color .15s, color .15s;
|
|
}
|
|
.cal-nav:hover { border-color: var(--text); color: var(--text); }
|
|
|
|
.cal-grid { width: 100%; border-collapse: collapse; }
|
|
.cal-grid thead th {
|
|
font-family: var(--mono);
|
|
font-size: 9px;
|
|
letter-spacing: .1em;
|
|
text-transform: uppercase;
|
|
color: var(--muted);
|
|
padding: .2rem .3rem;
|
|
text-align: center;
|
|
border-bottom: 1px solid var(--rule);
|
|
}
|
|
.cal-grid thead th.cal-wn {
|
|
color: var(--accent);
|
|
border-right: 1px solid var(--rule-l);
|
|
}
|
|
.cal-grid thead th.cal-we { color: var(--neg); }
|
|
|
|
.cal-grid .cal-row td {
|
|
font-family: var(--mono);
|
|
font-size: 12px;
|
|
text-align: center;
|
|
padding: .3rem .25rem;
|
|
color: var(--text);
|
|
transition: background .1s;
|
|
}
|
|
.cal-grid .cal-row:hover td { background: var(--ground); }
|
|
.cal-grid .cal-row:hover td.cal-wn { background: rgba(47,95,160,.1); }
|
|
|
|
.cal-grid .cal-row td.cal-wn {
|
|
color: var(--accent);
|
|
font-weight: 500;
|
|
font-size: 11px;
|
|
border-right: 1px solid var(--rule-l);
|
|
padding-right: .4rem;
|
|
}
|
|
.cal-grid .cal-row td.cal-out { color: var(--rule); }
|
|
.cal-grid .cal-row td.cal-we { color: var(--muted); }
|
|
|
|
.cal-grid .cal-current td {
|
|
background: var(--ground);
|
|
font-weight: 500;
|
|
}
|
|
.cal-grid .cal-current td.cal-wn {
|
|
background: var(--accent);
|
|
color: #fff;
|
|
}
|
|
.cal-grid .cal-current:hover td { background: rgba(47,95,160,.06); }
|
|
.cal-grid .cal-current:hover td.cal-wn { background: var(--accent); }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<nav>
|
|
<a href="/" class="nav-brand"><span class="nav-dot"></span>Décompte Horaire</a>
|
|
<span class="spacer"></span>
|
|
<a href="/" class="nav-link">Semaine courante</a>
|
|
</nav>
|
|
<div class="container">
|
|
{% block content %}{% endblock %}
|
|
</div>
|
|
</body>
|
|
</html>
|