Files
xamxam/public/assets/search.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

348 lines
6.2 KiB
CSS

/* ============================================================
RÉPERTOIRE / SEARCH PAGE (search.php)
============================================================ */
html, body {
margin: 0;
padding: 0;
height: 100%;
}
.search-body {
display: flex;
flex-direction: column;
height: 100vh;
overflow: hidden;
background: var(--white);
}
.search-main {
flex: 1;
overflow-y: auto;
overflow-x: hidden;
}
/* ---- 4-column index layout ---- */
.repertoire-index {
display: grid;
grid-template-columns: 1fr 2fr 2fr 1.5fr;
gap: 0;
padding: 0 1.5rem;
min-height: 100%;
}
@media (max-width: 768px) {
.repertoire-index {
grid-template-columns: 1fr;
padding: 0 1rem;
min-height: auto;
}
.repertoire-col {
border-right: none;
border-bottom: 1px solid var(--border-color);
padding: 1rem 0 1.25rem;
}
.repertoire-col:last-child {
border-bottom: none;
}
}
.repertoire-col {
padding: 0.75rem 0.5rem 2rem;
border-right: 1px solid var(--border-color);
}
.repertoire-col:last-child {
border-right: none;
}
.repertoire-col__header {
font-size: 0.72rem;
letter-spacing: 0.1em;
text-transform: uppercase;
color: var(--text-muted);
font-weight: 400;
margin: 0 0 0.5rem 0;
padding-bottom: 0.4rem;
border-bottom: 1px solid var(--border-color);
}
/* Years column - big bold numbers */
.year-index-item {
display: block;
font-size: 2.2rem;
font-weight: 700;
line-height: 1.1;
color: var(--black);
text-decoration: none;
padding: 0.1rem 0;
transition: color 0.15s;
letter-spacing: -0.02em;
}
.year-index-item:hover,
.year-index-item.active {
color: var(--purple);
}
/* Categories column */
.cat-index-group {
margin-bottom: 0.6rem;
}
.cat-index-label {
font-size: 0.72rem;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--text-muted);
font-weight: 400;
display: block;
margin-bottom: 0.15rem;
margin-top: 0.75rem;
}
.cat-index-item {
display: block;
font-size: 0.95rem;
color: var(--black);
text-decoration: none;
padding: 0.1rem 0;
line-height: 1.4;
transition: color 0.15s;
}
.cat-index-item:hover,
.cat-index-item.active {
color: var(--purple);
}
/* Students column */
.student-index-item {
display: block;
font-size: 0.95rem;
color: var(--black);
text-decoration: none;
padding: 0.1rem 0;
line-height: 1.4;
transition: color 0.15s;
}
.student-index-item:hover {
color: var(--purple);
}
/* Keywords column */
.keyword-index-item {
display: block;
font-size: 0.95rem;
color: var(--black);
text-decoration: none;
padding: 0.1rem 0;
line-height: 1.4;
transition: color 0.15s;
}
.keyword-index-item:hover,
.keyword-index-item.active {
color: var(--purple);
}
/* ---- Search results view (grid) ---- */
.search-results-view {
padding: 1rem 1.5rem;
}
.search-results-header {
font-size: 0.85rem;
color: var(--text-muted);
margin-bottom: 1rem;
}
.results-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: 1.5rem;
}
.result-card {
text-decoration: none;
color: inherit;
display: flex;
flex-direction: column;
gap: 0.4rem;
}
.result-card__authors {
font-size: 0.9rem;
font-weight: 500;
color: var(--black);
}
.result-card__title {
font-size: 0.85rem;
color: var(--text-muted);
line-height: 1.35;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.result-card__meta {
font-size: 0.78rem;
color: var(--purple);
}
/* Toggle button (index/results) */
.view-toggle {
display: flex;
gap: 0;
border: 1px solid var(--border-color);
border-radius: 3px;
overflow: hidden;
flex-shrink: 0;
}
.view-toggle__btn {
padding: 0.25rem 0.75rem;
font-size: 0.78rem;
background: var(--white);
color: var(--text-muted);
border: none;
cursor: pointer;
text-decoration: none;
display: inline-flex;
align-items: center;
transition: all 0.15s;
}
.view-toggle__btn.active,
.view-toggle__btn:hover {
background: var(--purple);
color: var(--white);
}
/* Search controls bar */
.search-controls {
display: flex;
align-items: center;
gap: 1rem;
padding: 0.4rem 1.5rem;
border-bottom: 1px solid var(--border-color);
flex-shrink: 0;
flex-wrap: wrap;
}
.search-filter-group {
display: flex;
align-items: center;
gap: 0.4rem;
}
.search-filter-label {
font-size: 0.78rem;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.06em;
white-space: nowrap;
}
.search-filter-select {
font-size: 0.82rem;
border: 1px solid #949494;
border-radius: 3px;
padding: 0.2rem 0.5rem;
background: var(--white);
color: var(--black);
font-family: inherit;
cursor: pointer;
}
.search-filter-select:focus {
border-color: var(--purple);
}
.search-apply-btn {
font-size: 0.82rem;
padding: 0.2rem 0.8rem;
background: var(--purple);
color: var(--white);
border: none;
border-radius: 3px;
cursor: pointer;
font-family: inherit;
transition: background 0.15s;
}
.search-apply-btn:hover {
background: var(--purple-dark);
}
.search-reset-link {
font-size: 0.82rem;
color: var(--text-muted);
text-decoration: underline;
cursor: pointer;
}
/* Search results pagination — reuses same token names as main.css */
.pagination-wrap {
display: flex;
justify-content: center;
align-items: center;
gap: 0.5rem;
padding: 1.5rem 0;
}
.pagination-btn {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 2rem;
height: 2rem;
padding: 0 0.5rem;
border: 1px solid var(--border-color);
border-radius: 3px;
color: var(--black);
font-size: 0.9rem;
text-decoration: none;
transition: all 0.15s;
}
.pagination-btn:hover:not(.disabled) {
border-color: var(--purple);
color: var(--purple);
}
.pagination-btn.disabled {
opacity: 0.3;
cursor: not-allowed;
pointer-events: none;
}
.pagination-info {
font-size: 0.9rem;
color: var(--text-muted);
padding: 0 0.5rem;
}
.search-empty {
padding: 3rem 1.5rem;
color: var(--text-muted);
font-size: 1rem;
text-align: center;
}
/* Error message */
.search-error {
background: #fff0f0;
border-left: 3px solid #c00;
color: #c00;
padding: 0.5rem 1rem;
font-size: 0.88rem;
margin: 0.5rem 1.5rem;
flex-shrink: 0;
}