Files
xamxam/public/assets/common.css
Pontoporeia b8529f7abe fix: WCAG 2.1 AA contrast, mobile répertoire layout, and pagination accessibility
Contrast failures (WCAG 1.4.3):
- common.css: remove opacity:0.92 from .site-nav__link (was 4.05:1, now 4.87:1 white-on-purple)
- common.css: placeholder colour #aaa → #767676 (2.32:1 → 4.54:1 on white)
- main.css: filter-info and clear-filter text var(--purple) → var(--purple-dark) (#9557b5 → #7b3fa0, 4.08 → 5.7:1)
- index.php: gradient card lighter stop L=65% → L=40%, darker stop L=45% → L=28%; white text now passes 4.5:1 across all hues

Non-text contrast (WCAG 1.4.11):
- search.css: search-filter <select> border #ddd → #949494 (1.6:1 → 3.0:1 on white)
- admin.css: --admin-border #333#555 (input bottom-border on #1a1a1a: 1.8:1 → 3.1:1)
- admin.css: --admin-text-muted #888#969696 (4.38:1 → 4.54:1 on #242424)

Mobile layout (WCAG 1.4.10 Reflow):
- search.css: add @media (max-width:768px) to collapse répertoire 4-column grid to single column;
  columns switch from right-border to bottom-border separators

Keyboard / screen reader (WCAG 2.1.1, 2.4.4):
- index.php: add aria-label (Première/Précédente/Suivante/Dernière page) and aria-disabled+tabindex=-1
  on disabled pagination links
- templates/search-bar.php: add aria-hidden=true and focusable=false to decorative SVG magnifier

Language (WCAG 3.1.1):
- search.php: add lang=fr to <html> in 429 rate-limit response
2026-03-28 16:52:45 +01:00

178 lines
3.5 KiB
CSS

@font-face {
font-family: "police1";
src: url("./fonts/Combinedd.otf");
font-display: swap;
}
/* ============================================================
SHARED VARIABLES & RESET
============================================================ */
:root {
--purple: #9557b5;
--purple-dark: #7b3fa0;
--purple-light: rgba(149, 87, 181, 0.12);
--black: #111;
--white: #fff;
--grey-light: #f5f5f5;
--border-color: #ddd;
--text-muted: #666;
}
*,
*::before,
*::after {
box-sizing: border-box;
}
body {
margin: 0;
padding: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
"Helvetica Neue", Arial, sans-serif;
background: var(--white);
color: var(--black);
}
a {
color: inherit;
text-decoration: none;
}
a:hover {
text-decoration: none;
}
/* ============================================================
NAV BAR (shared across all public pages)
============================================================ */
.site-nav {
background: linear-gradient(to bottom, var(--purple) 0%, rgba(149, 87, 181, 0.0) 100%);
padding: 0.55rem 1.5rem;
display: flex;
align-items: center;
justify-content: space-between;
flex-shrink: 0;
}
.site-nav__logo {
font-family: "police1", sans-serif;
font-size: 0.95rem;
letter-spacing: 0.12em;
text-transform: uppercase;
color: var(--white);
text-decoration: none;
font-weight: 400;
}
.site-nav__links {
display: flex;
gap: 3rem;
align-items: center;
}
.site-nav__link {
font-size: 0.85rem;
letter-spacing: 0.12em;
text-transform: uppercase;
color: var(--white);
text-decoration: none;
font-weight: 400;
transition: opacity 0.15s;
}
.site-nav__link:hover {
opacity: 1;
}
.site-nav__link--active {
opacity: 1;
border-bottom: 1px solid rgba(255, 255, 255, 0.6);
padding-bottom: 1px;
}
/* ============================================================
SEARCH BAR (shared)
============================================================ */
.site-search {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem 1.5rem;
border-bottom: 1px solid var(--border-color);
background: var(--white);
flex-shrink: 0;
}
.site-search__icon {
color: var(--text-muted);
flex-shrink: 0;
width: 16px;
height: 16px;
}
.site-search__input {
flex: 1;
border: none;
font-size: 0.95rem;
color: var(--black);
background: transparent;
padding: 0.15rem 0;
font-family: inherit;
}
.site-search__input::placeholder {
color: #767676;
}
/* ============================================================
ACCESSIBILITY UTILITIES
============================================================ */
/* Visually-hidden but screen-reader-accessible */
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
/* Skip-to-content link (visible only on keyboard focus) */
.skip-link {
position: absolute;
top: -999px;
left: 1rem;
z-index: 9999;
padding: 0.5rem 1rem;
background: var(--purple);
color: var(--white);
font-size: 0.9rem;
font-weight: 600;
text-decoration: none;
border-radius: 0 0 4px 4px;
}
.skip-link:focus {
top: 0;
}
/* Consistent keyboard-focus outline for all interactive elements */
:focus-visible {
outline: 2px solid var(--purple);
outline-offset: 2px;
}
/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
transition-duration: 0.01ms !important;
animation-duration: 0.01ms !important;
}
}