Refonte de l'interface : sauvegarde automatique, menu d'état unique et panneau aujourd'hui

- Chaque heure validée enregistre le jour (plus de bouton ✓), avec un témoin
  « enregistré » et conservation du focus entre les champs
- Les boutons MA/AM/J/F/AS deviennent un bouton d'état unique à pastilles
  ouvrant un menu déroulant (congés, férié, astreinte)
- Panneau Aujourd'hui : sortie cible en grand et progression travaillé/dû
  de la semaine, rafraîchis à chaque saisie
- Polish général : coins arrondis, ombres douces, hiérarchie des soldes,
  états de focus visibles

💘 Generated with Crush

Assisted-by: Crush:glm-5.2
This commit is contained in:
Jacquin Antoine
2026-09-09 20:34:27 +02:00
parent 791b48b320
commit e9983a28c7
8 changed files with 565 additions and 98 deletions

View File

@ -27,6 +27,10 @@
--conge-bd: #E8C97A;
--conge-txt: #7A5300;
--nav-bg: #1C1712;
--r-s: 5px;
--r-m: 8px;
--shadow-s: 0 1px 2px rgba(28,23,18,.05), 0 6px 20px -12px rgba(28,23,18,.12);
--shadow-m: 0 2px 6px rgba(28,23,18,.07), 0 16px 40px -18px rgba(28,23,18,.20);
--mono: 'DM Mono', 'Cascadia Code', ui-monospace, monospace;
--sans: 'DM Sans', system-ui, -apple-system, sans-serif;
}
@ -40,6 +44,8 @@
min-height: 100vh;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* ── Nav ── */
nav {
position: relative;
@ -51,6 +57,7 @@
align-items: center;
gap: 2rem;
border-bottom: 3px solid var(--accent-2);
box-shadow: 0 2px 10px rgba(28,23,18,.18);
}
.nav-brand {
font-family: var(--mono);
@ -177,7 +184,8 @@
font-size: 14px;
color: var(--muted);
text-decoration: none;
transition: border-color .15s, color .15s;
border-radius: var(--r-s);
transition: border-color .15s, color .15s, background .15s;
}
.arrow-btn:hover { border-color: var(--text); color: var(--text); }
.week-id {
@ -197,6 +205,7 @@
color: var(--muted);
text-decoration: none;
border: 1.5px solid var(--rule);
border-radius: var(--r-s);
padding: .4rem .75rem;
transition: border-color .15s, color .15s;
white-space: nowrap;
@ -204,11 +213,16 @@
.export-btn:hover { border-color: var(--accent); color: var(--accent); }
/* ── Soldes ── */
.soldes-wrap {
border: 1.5px solid var(--rule);
border-radius: var(--r-m);
background: var(--surface);
box-shadow: var(--shadow-s);
overflow: hidden;
}
.soldes {
display: grid;
grid-template-columns: repeat(4, 1fr);
border: 1.5px solid var(--rule);
background: var(--surface);
}
@media (max-width: 600px) { .soldes { grid-template-columns: 1fr 1fr; } }
.solde-item {
@ -216,6 +230,10 @@
border-right: 1px solid var(--rule);
}
.solde-item:last-child { border-right: none; }
@media (max-width: 600px) {
.solde-item:nth-child(2n) { border-right: none; }
.solde-item:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
}
.solde-item.item-pos { background: var(--pos-bg); }
.solde-item.item-neg { background: var(--neg-bg); }
.solde-eyebrow {
@ -233,6 +251,7 @@
letter-spacing: -.03em;
line-height: 1;
}
.solde-item:last-child .solde-num { font-size: 1.9rem; }
.solde-num.pos { color: var(--pos); }
.solde-num.neg { color: var(--neg); }
.solde-num.neutral { color: var(--text); }
@ -247,12 +266,92 @@
.reste-info strong { color: var(--text); font-family: var(--mono); font-weight: 500; }
.reste-info strong.reste-extra { color: var(--neg); }
/* ── Panneau aujourd'hui ── */
.today-panel {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: .9rem 2.25rem;
border: 1.5px solid var(--rule);
border-left: 4px solid var(--accent);
border-radius: var(--r-m);
background: var(--surface);
box-shadow: var(--shadow-s);
padding: .9rem 1.25rem;
}
.today-eyebrow {
font-family: var(--mono);
font-size: 9px;
letter-spacing: .12em;
text-transform: uppercase;
color: var(--muted);
margin-bottom: .3rem;
}
.today-cible {
font-family: var(--mono);
font-size: 1.9rem;
font-weight: 500;
letter-spacing: -.03em;
line-height: 1;
color: var(--accent);
}
.today-cible.today-neutral { color: var(--text); font-size: 1.1rem; }
.today-sub { font-size: 11px; color: var(--muted); margin-top: .3rem; }
.today-prog { flex: 1; min-width: 220px; }
.today-prog-head {
display: flex;
justify-content: space-between;
align-items: baseline;
gap: .75rem;
font-family: var(--mono);
font-size: 10px;
color: var(--muted);
margin-bottom: .35rem;
}
.today-prog-head b { color: var(--text); font-weight: 500; font-size: 12px; }
.today-bar {
height: 8px;
border-radius: 999px;
background: var(--ground);
border: 1px solid var(--rule-l);
overflow: hidden;
}
.today-bar-fill {
height: 100%;
background: var(--accent);
border-radius: 999px;
transition: width .4s ease;
}
.today-bar-fill.full-pos { background: var(--pos); }
.today-bar-fill.over { background: var(--accent-2); }
.today-bar-fill.short { background: var(--neg); }
@media (max-width: 700px) {
.today-panel { gap: .6rem; }
.today-prog { flex-basis: 100%; min-width: 0; }
.today-cible { font-size: 1.6rem; }
}
/* ── Table ── */
.table-section { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-section {
overflow-x: auto;
-webkit-overflow-scrolling: touch;
}
/* Rayons sur la table desktop : border-collapse separate, sinon le radius
est ignoré. Le menu d'état s'ouvre en position fixe (voir semaine.html)
pour ne pas être rogné par le scroll horizontal du conteneur. */
@media (min-width: 701px) {
.pointage-table {
border: 1.5px solid var(--rule);
border-radius: var(--r-m);
border-collapse: separate;
border-spacing: 0;
box-shadow: var(--shadow-s);
}
.pointage-table tbody tr:last-child td { border-bottom: none; }
}
table {
width: 100%;
border-collapse: collapse;
border: 1.5px solid var(--rule);
background: var(--surface);
white-space: nowrap;
}
@ -359,16 +458,16 @@
width: 78px;
padding: .28rem .3rem;
border: 1px solid var(--rule);
border-radius: 0;
border-radius: var(--r-s);
font-family: var(--mono);
font-size: 12px;
color: var(--text);
background: transparent;
text-align: left;
transition: border-color .15s;
transition: border-color .15s, background .15s, box-shadow .15s;
}
.time-input:hover { border-color: var(--muted); }
.time-input:focus { outline: none; border-color: var(--accent); background: #fff; }
.time-input:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(47,95,160,.12); }
/* L'icône d'horloge native a une largeur fixe qui, avec un champ centré trop
étroit, empiète sur le dernier chiffre : on aligne le texte à gauche et on
resserre le padding de l'icône plutôt que de lui laisser sa marge par défaut. */
@ -378,6 +477,26 @@
}
tr.htmx-request .time-input { opacity: .4; }
/* Auto-enregistrement : déclenché au changement d'un champ du jour, la
sauvegarde part dès que le champ est validé (blur/picker). Le petit
témoin dans la colonne Jour suit l'état de la requête. */
.autosave {
display: inline-flex;
align-items: center;
font-family: var(--mono);
font-size: 9px;
letter-spacing: .06em;
color: var(--muted);
margin-left: .45rem;
vertical-align: middle;
opacity: 0;
transition: opacity .2s;
pointer-events: none;
}
.autosave.busy, .autosave.ok { opacity: 1; }
.autosave.busy::after { content: 'enregistrement…'; }
.autosave.ok::after { content: '✓ enregistré'; color: var(--pos); }
.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); }
@ -397,47 +516,97 @@
.g-cible { text-align: right; }
.cible-num { font-family: var(--mono); font-size: 12px; color: var(--accent); font-weight: 500; display: inline-block; }
.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; }
/* ── Menu congé / férié / astreinte ──
Un seul bouton par ligne résume l'état (pastilles colorées) et ouvre
le menu des cinq bascules : congé matin / après-midi / journée, férié,
jour d'astreinte. */
.col-conge { text-align: center; }
.conge-btns { display: flex; gap: 3px; justify-content: center; }
.btn-cg {
.cg-cell { position: relative; display: inline-block; }
.cg-menu { position: relative; }
.cg-trigger {
display: inline-flex;
align-items: center;
justify-content: center;
width: 24px; height: 24px;
gap: .3rem;
border: 1.5px solid var(--rule);
border-radius: var(--r-s);
background: transparent;
cursor: pointer;
padding: .22rem .45rem;
min-height: 26px;
transition: border-color .15s, background .15s;
list-style: none;
}
.cg-trigger::-webkit-details-marker { display: none; }
.cg-trigger:hover { border-color: var(--muted); background: var(--ground); }
.cg-state { display: inline-flex; gap: 3px; align-items: center; justify-content: center; min-width: 20px; }
.cg-chip {
font-family: var(--mono);
font-size: 9px;
font-size: 8.5px;
font-weight: 500;
letter-spacing: .04em;
color: var(--muted);
transition: all .15s;
border-radius: 3px;
padding: .12rem .24rem;
line-height: 1;
}
.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; }
.btn-cg.btn-as { border-radius: 4px; }
.btn-cg.as-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-cg.btn-ferie { border-radius: 4px; }
.btn-cg.ferie-on { background: #7B5EA7; border-color: #7B5EA7; color: #fff; }
.cg-chip.st-ma, .cg-chip.st-am { background: var(--conge-bg); border: 1px solid var(--conge-bd); color: var(--conge-txt); }
.cg-chip.st-jour { background: var(--accent-2); color: #fff; }
.cg-chip.st-ferie { background: #7B5EA7; color: #fff; }
.cg-chip.st-as { background: var(--accent); color: #fff; }
.cg-none { color: var(--rule); font-family: var(--mono); font-size: 10px; }
.cg-caret { color: var(--muted); font-size: 9px; transition: transform .15s; }
.cg-menu[open] > .cg-trigger { border-color: var(--accent); }
.cg-menu[open] .cg-caret { transform: rotate(180deg); }
.cg-pop {
position: absolute;
right: 0;
top: calc(100% + .35rem);
z-index: 150;
background: var(--surface);
border: 1.5px solid var(--rule);
border-radius: var(--r-m);
box-shadow: var(--shadow-m);
padding: .35rem;
min-width: 178px;
display: flex;
flex-direction: column;
gap: 2px;
text-align: left;
}
.cg-opt {
display: flex;
align-items: center;
gap: .5rem;
border: none;
background: transparent;
border-radius: var(--r-s);
padding: .38rem .5rem;
font-family: var(--sans);
font-size: 12px;
color: var(--text);
cursor: pointer;
white-space: nowrap;
transition: background .12s;
}
.cg-opt:hover { background: var(--ground); }
.cg-opt-chip {
font-family: var(--mono);
font-size: 8.5px;
font-weight: 500;
letter-spacing: .04em;
border-radius: 3px;
padding: .12rem .26rem;
border: 1px solid var(--rule);
color: var(--muted);
min-width: 22px;
text-align: center;
flex-shrink: 0;
line-height: 1;
}
.cg-opt.on { background: var(--conge-bg); }
.cg-opt.on .cg-opt-chip.ma, .cg-opt.on .cg-opt-chip.am { background: var(--conge-bg); border-color: var(--conge-bd); color: var(--conge-txt); }
.cg-opt.on .cg-opt-chip.jour { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.cg-opt.on .cg-opt-chip.ferie { background: #7B5EA7; border-color: #7B5EA7; color: #fff; }
.cg-opt.on .cg-opt-chip.as { background: var(--accent); border-color: var(--accent); color: #fff; }
.ferie-badge {
display: inline-block;
font-family: var(--mono);
@ -469,6 +638,7 @@
align-items: center;
gap: .35rem;
border: 1px solid var(--rule);
border-radius: var(--r-s);
background: transparent;
padding: .15rem .5rem;
cursor: pointer;
@ -511,7 +681,7 @@
flex: 1;
min-width: 0;
border: 1px solid var(--rule);
border-radius: 0;
border-radius: var(--r-s);
padding: .25rem .3rem;
font-size: 11px;
font-family: var(--sans);
@ -527,6 +697,7 @@
justify-content: center;
width: 18px; height: 18px;
border: 1px solid var(--rule);
border-radius: 4px;
background: transparent;
cursor: pointer;
font-family: var(--mono);
@ -560,7 +731,9 @@
/* ── Décompte astreinte (section soldes) ── */
.as-decompte {
border: 1px solid var(--rule);
border-radius: var(--r-m);
background: var(--surface);
box-shadow: var(--shadow-s);
margin-top: .6rem;
padding: .55rem .75rem;
font-size: 12px;
@ -679,10 +852,9 @@
min-width: 0;
}
.pointage-table td.col-save { text-align: right; }
.pointage-table .btn-valider { width: 40px; height: 40px; font-size: 16px; }
.pointage-table .btn-cg { width: 34px; height: 34px; font-size: 11px; }
.pointage-table .btn-cg.btn-jour { width: 32px; height: 32px; }
.pointage-table td.col-conge { text-align: right; padding-right: .75rem; }
.pointage-table .cg-trigger { min-height: 36px; padding: .3rem .6rem; }
.pointage-table .cg-chip { font-size: 9.5px; padding: .18rem .3rem; }
.pointage-table .as-block { padding: .4rem .75rem .55rem; align-items: stretch; }
.as-grid { grid-template-columns: 82px 82px minmax(90px, 1fr); }
.as-desc { font-size: 13px; padding: .4rem .4rem; }
@ -719,6 +891,7 @@
font-size: 11px;
padding: .18rem .5rem;
border: 1px solid var(--rule);
border-radius: 4px;
color: var(--muted);
text-decoration: none;
letter-spacing: .02em;
@ -765,7 +938,8 @@
z-index: 100;
background: var(--surface);
border: 1.5px solid var(--rule);
box-shadow: 0 4px 20px rgba(28,23,18,.12);
border-radius: var(--r-m);
box-shadow: var(--shadow-m);
padding: .75rem;
min-width: 260px;
max-width: calc(100vw - 2rem);
@ -789,6 +963,7 @@
.cal-nav {
background: none;
border: 1px solid var(--rule);
border-radius: var(--r-s);
width: 24px; height: 24px;
cursor: pointer;
font-size: 12px;
@ -877,7 +1052,9 @@
text-align: center;
padding: .75rem 1.1rem;
border: 1.5px solid var(--rule);
border-radius: var(--r-m);
background: var(--surface);
box-shadow: var(--shadow-s);
flex-shrink: 0;
}
.stats-overall-num {
@ -907,6 +1084,9 @@
gap: 1px;
background: var(--rule);
border: 1.5px solid var(--rule);
border-radius: var(--r-m);
overflow: hidden;
box-shadow: var(--shadow-s);
}
@media (max-width: 520px) { .comp-periods { grid-template-columns: 1fr; } }
@ -966,6 +1146,8 @@
gap: 1px;
background: var(--rule);
border: 1.5px solid var(--rule);
border-radius: var(--r-s);
overflow: hidden;
}
.ptab {
padding: .38rem .9rem;
@ -990,6 +1172,9 @@
gap: 1px;
background: var(--rule);
border: 1.5px solid var(--rule);
border-radius: var(--r-m);
overflow: hidden;
box-shadow: var(--shadow-s);
}
@media (min-width: 800px) { .ts-grid { grid-template-columns: repeat(4, 1fr); } }
@ -1094,6 +1279,8 @@
.wkly-section {
background: var(--surface);
border: 1.5px solid var(--rule);
border-radius: var(--r-m);
box-shadow: var(--shadow-s);
padding: 1rem 1.25rem;
}
.wkly-eyebrow {
@ -1139,6 +1326,7 @@
background: var(--neg);
color: #fff;
border-left: 4px solid #ff6b5b;
border-radius: var(--r-m);
box-shadow: 0 6px 28px rgba(0,0,0,.3);
min-width: 240px;
animation: alerte-slide .35s cubic-bezier(.2,.8,.3,1) both;
@ -1205,6 +1393,8 @@
.login-card {
background: var(--surface);
border: 1.5px solid var(--rule);
border-radius: var(--r-m);
box-shadow: var(--shadow-m);
padding: 2.5rem 3rem;
width: 380px;
max-width: 100%;
@ -1248,6 +1438,7 @@
font-size: 15px;
padding: .6rem .75rem;
border: 1.5px solid var(--rule);
border-radius: var(--r-s);
background: var(--ground);
color: var(--text);
outline: none;
@ -1266,6 +1457,7 @@
background: var(--text);
color: var(--surface);
border: none;
border-radius: var(--r-s);
cursor: pointer;
transition: background .15s;
}
@ -1292,6 +1484,7 @@
position: relative;
background: var(--surface);
border: 1.5px solid var(--rule);
border-radius: var(--r-m);
max-width: 92vw;
max-height: 90vh;
overflow: auto;