Fix biome lint errors: remove duplicate CSS properties, apply safe auto-fixes

CSS:
- Remove duplicate 'background' fallbacks in base.css, header.css, search.css
  (solid color declared before gradient — gradient always wins)
- Remove duplicate 'padding' in admin.css .admin-import-log

JS (biome --write safe fixes applied):
- function() → arrow functions in all IIFEs and callbacks
- forEach/callback → arrow functions
- evaluePtrn → parseInt(x, 10) in admin-contacts-form.js
- Cleaned label text in build.mjs lint step

Remaining warnings are intentional: !important overrides, descending
specificity (admin.css cascade), noUnusedVariables (functions exported
to window/onclick), useTemplate style preference.
This commit is contained in:
Pontoporeia
2026-06-24 13:21:04 +02:00
parent 82d3dcb084
commit 6ecd3d4540
31 changed files with 336 additions and 348 deletions

View File

@@ -8,7 +8,6 @@
header {
vertical-align: center;
flex-shrink: 0;
background: #c05de1;
background: linear-gradient(
0deg,
rgba(192, 93, 225, 1) 0%,

View File

@@ -21,7 +21,6 @@ form[role="search"]:not(.header-search-form) {
.header-search-wrap {
padding: 0;
flex-shrink: 0;
background: #C05DE1;
background: linear-gradient(180deg, rgba(192, 93, 225, 1) 0%, rgba(255, 255, 255, 1) 100%);
}

View File

@@ -0,0 +1,141 @@
/* ============================================================
SHARED TOC — sidebar table-of-contents for admin + public pages.
Both use <details class="toc"> markup.
Public: server-rendered links (about, charte, licence)
Admin: JS-populated links (contenus, accès, paramètres — admin-toc.js)
============================================================ */
/* ── Shared list styles (.toc-list) ─────────────────────────────────────── */
.toc-list,
.toc ul {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: var(--space-3xs);
}
.toc-list a,
.toc ul a {
display: block;
font-family: var(--font-body);
font-size: var(--step-0);
font-weight: 300;
color: var(--text-primary);
text-decoration: none;
padding: var(--space-3xs) 0;
transition: color 0.15s;
}
.toc-list a:hover {
color: var(--accent-primary);
}
.toc-list a.toc-active,
.toc ul a.toc-active {
color: var(--accent-primary);
font-weight: 400;
}
/* ── Public TOC (details/summary block) ─────────────────────────────────── */
.toc {
border: none;
border-radius: 0;
background: transparent;
overflow: visible;
}
.toc[open] {
padding-bottom: 0;
}
.toc > :not(summary) {
padding-left: 0;
padding-right: 0;
}
.toc summary {
font-family: var(--font-display);
font-size: var(--step-1);
font-weight: 400;
color: var(--text-primary);
padding: 0 0 var(--space-2xs) 0;
border-bottom: 1px solid var(--text-primary);
display: flex;
align-items: center;
gap: var(--space-2xs);
background: transparent;
cursor: pointer;
list-style: none;
}
.toc summary::-webkit-details-marker {
display: none;
}
.toc summary:hover {
color: inherit;
background: transparent;
}
/* Caret icon inside summary — visible only on mobile */
.toc-caret {
flex-shrink: 0;
transition: transform 0.2s ease;
}
.toc[open] > summary .toc-caret {
transform: rotate(180deg);
}
/* Sidebar links (about page — custom links below TOC) */
.toc-sidebar-link:first-of-type {
padding-top: var(--space-s);
border-top: 1px solid var(--border-primary);
}
.toc-sidebar-link + .toc-sidebar-link {
padding-top: var(--space-xs);
}
.toc-sidebar-link a {
font-size: var(--step--2);
color: var(--accent-primary);
text-decoration: none;
transition: opacity 0.15s;
}
.toc-sidebar-link a:hover {
opacity: 0.8;
}
/* ── Desktop: sticky sidebar ───────────────────────────────────────────── */
@media (min-width: 768px) {
.toc {
position: sticky;
top: var(--space-l);
grid-column: 1;
}
.toc summary {
pointer-events: none;
}
.toc-caret {
display: none;
}
}
/* ── Mobile: collapsible TOC ────────────────────────────────────────────── */
@media (max-width: 767px) {
.toc {
position: static;
grid-column: 1;
}
.toc summary {
cursor: pointer;
list-style: revert;
}
}