Refactor CSS architecture per css-methodology-spec.md

Split CSS into named layers: reset → colors → typography → base →
components → utilities. Each component has one unique root class in
its own file. No cross-component overrides.

New files:
- reset.css (modern-normalize base — matches project's prior reset)
- colors.css (all colour variables)
- typography.css (font faces, size/space scale, font-family vars)
- base.css (≤ 5 site-wide rules: layout, headings)
- utilities.css (sr-only, skip-link, reduced-motion)
- style.css (root @import file loading all layers)
- components/{links,focus,forms,tables,dialog,details,media,
  buttons,badges,toasts,pagination,header,search}.css

Existing files:
- variables.css → backward-compat wrapper (imports colors + typography)
- common.css → backward-compat wrapper (imports style.css)
- Page files (admin, public, form, tfe, apropos, repertoire, system,
  file-access) → removed redundant @import url(./variables.css)
- head.php → loads style.css instead of modern-normalize + common.css
- partage pages → load style.css

Fixes vs initial refactoring:
- reset.css: use modern-normalize base (not Tailwind Preflight) to
  avoid border/list/heading regressions from aggressive defaults
- components/search.css: restore !important flags on input styles
  (needed to override forms.css base input selectors)
- acces.php: add toast feedback on password copy button

Cleaned up duplicate status-badge/toast definitions from admin.css
(now live in components/badges.css and components/toast.css).
This commit is contained in:
Pontoporeia
2026-05-19 14:55:10 +02:00
parent 7c30d1c55d
commit 7cf020c7bd
36 changed files with 1254 additions and 1052 deletions

16
TODO.md
View File

@@ -46,6 +46,22 @@
- [x] Add Créer button to jury supervisor autocomplete (removed guard in pill-search-fragment.php)
- [x] Fix: UNIQUE constraint on authors.email — findOrCreateAuthor now checks for existing author by email before inserting; prevents crash when two authors share an email
# CSS Refactoring (css-methodology-spec.md)
- [x] Split variables.css into colors.css + typography.css
- [x] Create reset.css (Tailwind Preflight)
- [x] Create base.css (≤ 5 site-wide rules)
- [x] Create utilities.css (sr-only, skip-link, reduced-motion)
- [x] Create components/ (links, focus, forms, tables, dialog, details, media, buttons, badges, toasts, pagination, header, search)
- [x] Create style.css root @import file
- [x] Remove redundant @import url("./variables.css") from page files
- [x] Clean up duplicate status-badge / toast definitions from admin.css (now in components/)
- [x] Update head.php + partage pages to load style.css
- [x] Common.css → backward-compat wrapper importing style.css
- [x] Variables.css → backward-compat wrapper importing colors.css + typography.css
- [x] Update comment references from common.css → component files
- [ ] Verify no visual regressions
# Current tasks
- [x] Mandatory auto-generated passwords on share links (no custom passwords, regenerate-only in edit, rate limit on password gate)

View File

@@ -116,7 +116,7 @@
margin-top: var(--space-l);
}
/* ── Admin button aliases — see common.css .btn base class ────────────── */
/* ── Admin button aliases — see components/buttons.css .btn base class ─── */
.admin-btn {
/* deprecated alias for .btn--primary; kept for backward-compat */
@@ -138,67 +138,7 @@
/* deprecated alias for .btn--danger; kept for backward-compat */
}
/* ── Toast messages (bottom-center, CSS-only auto-fade) ─────────────── */
#toast-region {
position: fixed;
bottom: var(--space-l);
left: 50%;
transform: translateX(-50%);
z-index: 10000;
display: flex;
flex-direction: column;
align-items: center;
gap: var(--space-xs);
pointer-events: none;
width: max-content;
max-width: min(560px, calc(100vw - 2 * var(--space-l)));
}
.toast {
padding: var(--space-s) var(--space-m);
border-radius: var(--radius);
font-size: var(--step-0);
border-left: 4px solid;
box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
pointer-events: auto;
/* enter then fade out — total visible ~6.35 s */
animation: toast-enter 0.35s ease-out,
toast-exit 0.5s ease-in 6s forwards;
}
.toast--error {
background: var(--bg-secondary);
border-color: var(--error);
color: var(--text-primary);
}
.toast--success {
background: var(--bg-secondary);
border-color: var(--success);
color: var(--text-primary);
}
.toast--warning {
background: var(--bg-secondary);
border-color: var(--warning);
color: var(--text-primary);
animation: toast-enter 0.35s ease-out; /* no fade-out — stays until dismissed */
}
.toast--warning a {
color: inherit;
text-decoration: underline;
}
@keyframes toast-enter {
from { opacity: 0; transform: translateY(12px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes toast-exit {
from { opacity: 1; }
to { opacity: 0; pointer-events: none; }
}
/* ── Toast messages — styles in components/toast.css ───────────────── */
/* ── Stats cards ────────────────────────────────────────────────────────── */
.admin-stats {
@@ -352,7 +292,7 @@
}
/* ── Table ──────────────────────────────────────────────────────────────── */
/* Base table/th/td styles live in common.css */
/* Base table/th/td styles live in components/tables.css */
.admin-body main > table {
margin-top: var(--space-m);
}
@@ -406,52 +346,10 @@ th.admin-ap-col {
}
/* ── Status badges ──────────────────────────────────────────────────────── */
.status-badge {
display: inline-block;
padding: var(--space-3xs) var(--space-2xs);
border-radius: var(--radius);
font-size: var(--step--2);
font-weight: 500;
letter-spacing: 0.04em;
}
/* ── Status badges — base styles in components/badges.css ─────────── */
.status-published {
background: var(--green-muted-bg);
color: var(--accent-green);
}
.status-pending {
background: var(--warning-muted-bg);
color: var(--warning);
}
.status-access {
display: inline-block;
font-size: var(--step--2);
padding: var(--space-3xs) var(--space-3xs);
border-radius: var(--radius);
background: var(--bg-tertiary);
color: var(--text-secondary);
letter-spacing: 0.03em;
}
.status-access--libre {
background: var(--green-muted-bg);
color: var(--accent-green);
}
.status-access--interne {
background: var(--blue-muted-bg);
color: var(--accent-blue);
}
.status-access--interdit {
background: var(--error-muted-bg);
color: var(--error);
}
/* ── Compact table badges ─────────────────────────────────────────── */
.status-badge {
/* ── Compact table badges (admin-only override) ──────────────────── */
.admin-body .status-badge {
font-size: 0.7rem;
padding: 2px var(--space-3xs);
}
@@ -541,7 +439,7 @@ th.admin-ap-col {
border-color: var(--yellow-muted-border);
}
/* ── Action buttons in table — see common.css .btn base class ──────────── */
/* ── Action buttons in table — see components/buttons.css .btn base class ─ */
.admin-actions {
display: flex;
gap: var(--space-3xs);
@@ -1030,7 +928,7 @@ th.admin-ap-col {
}
/* ── Dialog ───────────────────────────────────────────────────────────── */
/* Base dialog/::backdrop styles live in common.css */
/* Base dialog/::backdrop styles live in components/dialog.css */
.admin-dialog {
max-width: 680px;
width: 100%;

View File

@@ -1,9 +1,8 @@
/* ============================================================
À PROPOS PAGE (apropos.php)
Root class: .apropos-main
============================================================ */
@import url("./variables.css");
/* ------------------------------------------------------------------ */
/* Page shell */
/* ------------------------------------------------------------------ */

View File

@@ -0,0 +1,44 @@
/* ============================================================
BASE — Minimal site-wide rules. Keep this extremely small
(≤ 5 rules). Promote a pattern from a component to base
only once it's clearly universal.
============================================================ */
/* Full-height flex layout: header → main → (optional footer) */
html, body {
height: 100%;
overflow: hidden;
}
body {
font-family: var(--font-body);
background: var(--bg-primary);
color: var(--text-primary);
background: linear-gradient(
180deg,
rgba(0, 0, 0, 0) 92%,
rgba(149, 87, 181, 1) 100%
);
display: flex;
flex-direction: column;
}
main {
flex: 1;
min-height: 0;
overflow-wrap: anywhere;
}
main * {
overflow-wrap: anywhere;
word-break: break-word;
}
/* Global heading scale — used by admin + public pages */
:where(h1, h2, h3, h4, h5, h6) {
font-family: var(--font-display);
font-size: var(--step-2);
font-weight: 400;
margin: 0 0 var(--space-l) 0;
line-height: 1.15;
}

View File

@@ -0,0 +1,83 @@
/* ============================================================
COLOURS — All colour values in one place. No colour value
should appear anywhere else. Add new colours here first.
============================================================ */
:root {
/* Backgrounds */
--bg-primary: #ffffff;
--bg-secondary: #f5f5f5;
--bg-tertiary: #e8e8e8;
--bg-active: #d0d0d0;
/* Text */
--text-primary: #111111;
--text-secondary: #666666;
--text-tertiary: #999999;
/* Borders */
--border-primary: #dddddd;
--border-secondary: #cccccc;
/* Border radius */
--radius: 10px;
/* Status */
--success: #5cd69d;
--error: #f25a5a;
--warning: #fbca51;
/* Accent */
--accent-primary: #9557b5;
--accent-secondary: #683d7f;
--accent-foreground: #ffffff;
--accent-muted: rgba(149, 87, 181, 0.12);
--accent-blue: #41adff;
--accent-green: #4caf50;
--accent-yellow: #f39c12;
--accent-red: #f25a5a;
/* Gradient (header) */
--gradient-1: #3c856c;
--gradient-2: #60ecb4;
--gradient-3: #e390ff;
--gradient-4: #9557b5;
/* Header decorative */
--header-gradient-fade: rgba(149, 87, 181, 0);
--header-shadow-strong: rgba(119, 70, 145, 1);
--header-shadow-soft: rgba(119, 70, 145, 0.8);
--header-nav-active-border: rgba(255, 255, 255, 0.6);
/* Search error block */
--search-error-bg: #fff0f0;
--search-error-border: #cc0000;
--search-error-color: #cc0000;
/* System page — log/config syntax highlight */
--sys-syntax-comment: #999999;
--sys-syntax-directive: #1a6fb5;
--sys-syntax-block: #7a2fa0;
--sys-syntax-value: #a05c00;
--sys-syntax-location: #1a7a6b;
--sys-syntax-notice: #3a6ea8;
--sys-syntax-crit: #c0392b;
/* Muted alpha overlays — derived from semantic tokens */
--success-muted-bg: rgba(92, 214, 157, 0.12);
--success-muted-border: rgba(92, 214, 157, 0.35);
--warning-muted-bg: rgba(251, 202, 81, 0.12);
--warning-muted-border: rgba(251, 202, 81, 0.35);
--error-muted-bg: rgba(242, 90, 90, 0.12);
--error-muted-border: rgba(242, 90, 90, 0.35);
--blue-muted-bg: rgba(65, 173, 255, 0.12);
--blue-muted-border: rgba(65, 173, 255, 0.3);
--blue-muted-bg-hover: rgba(65, 173, 255, 0.22);
--yellow-muted-bg: rgba(243, 156, 18, 0.12);
--yellow-muted-border: rgba(243, 156, 18, 0.3);
--yellow-muted-bg-hover: rgba(243, 156, 18, 0.22);
--green-muted-bg: rgba(76, 175, 80, 0.12);
--green-muted-border: rgba(76, 175, 80, 0.3);
--green-muted-bg-hover: rgba(76, 175, 80, 0.22);
--danger-border-muted: rgba(242, 90, 90, 0.35);
}

View File

@@ -1,760 +1,7 @@
@import url("./variables.css");
*,
*::before,
*::after {
box-sizing: border-box;
}
html,
body {
margin: 0;
padding: 0;
height: 100%;
overflow: hidden;
}
body {
font-family: var(--font-body);
background: var(--bg-primary);
color: var(--text-primary);
background: linear-gradient(
180deg,
rgba(0, 0, 0, 0) 92%,
rgba(149, 87, 181, 1) 100%
);
display: flex;
flex-direction: column;
}
a {
color: inherit;
text-decoration: none;
}
a:hover {
text-decoration-line: underline;
text-decoration-style: wavy;
text-decoration-thickness: 1px;
}
header {
vertical-align: center;
flex-shrink: 0;
background: linear-gradient(
180deg,
var(--gradient-1) 0%,
var(--gradient-2) 33%,
var(--gradient-3) 66%,
var(--gradient-4) 100%
);
.nav-logo {
text-decoration: none;
}
.nav-left-links,
.nav-right-links {
display: flex;
gap: var(--space-l);
align-items: center;
list-style: none;
margin: 0;
padding: 0;
}
nav {
padding: var(--space-s) var(--space-s);
display: flex;
align-items: center;
justify-content: space-between;
font-size: var(--step-0);
a {
font-family: var(--font-display);
letter-spacing: 0.12em;
text-transform: uppercase;
color: var(--accent-foreground);
text-decoration: none;
padding: var(--space-3xs) var(--space-xs);
border-radius: var(--radius);
text-shadow:
0 0 16px var(--header-shadow-strong),
0 0 32px var(--header-shadow-soft);
}
ul {
display: flex;
gap: var(--space-l);
align-items: center;
list-style: none;
margin: 0;
padding: 0;
}
ul a {
transition: opacity 0.15s;
}
ul a:hover {
opacity: 1;
}
}
ul a[aria-current="page"] {
opacity: 1;
border-bottom: 1px solid var(--header-nav-active-border);
padding-bottom: 1px;
}
/* nav-top-row: transparent wrapper at desktop - children become
direct flex items of nav, preserving the existing layout */
.nav-top-row {
display: contents;
}
/* nav-mobile-links: mobile-only dropdown, hidden at desktop */
.nav-mobile-links {
display: none; /* overridden to block inside the mobile media query */
}
}
/* ============================================================
HAMBURGER MENU - public nav (pure CSS, checkbox trick)
DOM order inside <header> (public only):
input.menu-btn ← off-screen checkbox
nav
div.nav-top-row ← always-visible row
ul.nav-left-links ← logo + Répertoire
ul.nav-right-links ← Licences, À Propos
label.menu-icon ← burger icon trigger
ul.nav-mobile-links ← full dropdown (hidden by default)
At desktop: .menu-icon and .nav-mobile-links are display:none.
.nav-top-row is display:contents so its children
participate directly in nav's flex row.
At mobile: nav becomes a flex column. .nav-top-row is a real
flex row (logo | burger). .nav-mobile-links expands
via max-height on checkbox:checked.
COMMON — Backward-compat wrapper. All styles now live in
style.css and the component/page files it imports.
Kept so any direct references still work.
============================================================ */
/* Off-screen checkbox - triggered by its label */
.menu-btn {
position: absolute;
top: -9999px;
left: -9999px;
}
/* Burger label - takes no space at desktop */
.menu-icon {
display: none;
cursor: pointer;
padding: var(--space-2xs) var(--space-s);
align-items: center;
justify-content: center;
}
/* Middle bar of the burger icon */
.navicon {
background: var(--accent-foreground);
display: block;
height: 2px;
width: 24px;
position: relative;
transition: all 0.3s ease-out;
}
/* Top and bottom bars */
.navicon::before,
.navicon::after {
content: "";
background: var(--accent-foreground);
display: block;
height: 2px;
width: 100%;
position: absolute;
transition: all 0.3s ease-out;
}
.navicon::before {
top: -7px;
}
.navicon::after {
bottom: -7px;
}
/* ---- Mobile ---- */
@media screen and (max-width: 640px) {
/* Nav becomes a flex column: top-row on row 1, dropdown on row 2 */
header nav[aria-label="Navigation principale"] {
display: flex;
flex-direction: column;
align-items: stretch;
padding: 0;
}
/* Top row: logo left, hamburger right */
header nav[aria-label="Navigation principale"] .nav-top-row {
display: flex;
align-items: center;
justify-content: space-between;
padding: var(--space-s);
}
/* Hide desktop link lists inside the top row, but keep the logo visible */
header nav[aria-label="Navigation principale"] .nav-right-links {
display: none;
}
header nav[aria-label="Navigation principale"] .nav-left-links {
display: flex;
gap: 0;
}
header nav[aria-label="Navigation principale"]
.nav-left-links
li:not(:first-child) {
display: none;
}
/* Reveal the hamburger icon */
.menu-icon {
display: flex;
}
/* Dropdown: shown as block but clipped to zero height by default */
header nav[aria-label="Navigation principale"] .nav-mobile-links {
display: block; /* override the desktop display:none */
list-style: none;
margin: 0;
padding: 0;
max-height: 0;
overflow: hidden;
transition: max-height 0.2s ease-out;
}
/* ---- Open state ---- */
.menu-btn:checked
~ nav[aria-label="Navigation principale"]
.nav-mobile-links {
max-height: 300px;
}
/* Dropdown link rows */
header nav[aria-label="Navigation principale"] .nav-mobile-links li {
border-top: 1px solid var(--header-nav-active-border);
text-align: left;
}
header nav[aria-label="Navigation principale"] .nav-mobile-links li a {
display: block;
width: 100%;
padding: var(--space-s) var(--space-s);
text-align: left;
}
/* ---- Animate burger → X ---- */
.menu-btn:checked
~ nav[aria-label="Navigation principale"]
.menu-icon
.navicon {
background: transparent;
}
.menu-btn:checked
~ nav[aria-label="Navigation principale"]
.menu-icon
.navicon::before {
transform: rotate(-45deg);
top: 0;
}
.menu-btn:checked
~ nav[aria-label="Navigation principale"]
.menu-icon
.navicon::after {
transform: rotate(45deg);
bottom: 0;
}
}
main {
flex: 1;
min-height: 0;
overflow-wrap: anywhere;
}
main * {
overflow-wrap: anywhere;
word-break: break-word;
}
/* ============================================================
HEADINGS - global scale, shared by admin + public pages
All headings use the same font size (slightly smaller than
the previous h1). Individual page overrides for size have
been removed so everything inherits from here.
============================================================ */
:where(h1, h2, h3, h4, h5, h6) {
font-family: var(--font-display);
font-size: var(--step-2);
font-weight: 400;
margin: 0 0 var(--space-l) 0;
line-height: 1.15;
}
/* ============================================================
SEARCH BAR (shared)
============================================================ */
.header-search-wrap {
padding: 0 0;
flex-shrink: 0;
background-color: var(--gradient-4);
background: linear-gradient(180deg, var(--gradient-4) 0%, #ffffffee 100%);
}
.header-search-form {
width: 100%;
}
.header-search-input-wrap {
position: relative;
display: flex;
align-items: center;
}
.header-search-icon {
position: absolute;
left: var(--space-s);
width: 18px;
height: 18px;
stroke: var(--accent-primary);
pointer-events: none;
}
.header-search-input-wrap input {
width: 100%;
padding: var(--space-2xs) var(--space-s) !important;
padding-left: calc(18px + var(--space-l)) !important;
border: 1px solid var(--accent-primary) !important;
border-radius: var(--radius) !important;
background: var(--bg-primary) !important;
font-size: var(--step-0) !important;
color: var(--text-primary) !important;
font-family: inherit !important;
}
.header-search-input-wrap input::placeholder {
color: var(--accent-primary) !important;
}
/* ============================================================
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: var(--space-2xs) var(--space-s);
background: var(--accent-primary);
color: var(--text-primary);
font-size: var(--step--1);
font-weight: 600;
text-decoration: none;
border-radius: 0 0 4px 4px;
}
.skip-link:focus {
top: 0;
}
/* Consistent keyboard-focus ring for all interactive elements */
:focus-visible {
outline: none;
box-shadow: 0 0 0 2px var(--accent-primary);
border-radius: var(--radius);
padding: var(--space-3xs) var(--space-xs);
}
/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
transition-duration: 0.01ms !important;
animation-duration: 0.01ms !important;
}
}
/* ============================================================
FORM ELEMENTS - base input / select / textarea / button
============================================================ */
label {
display: block;
margin-bottom: var(--space-3xs);
}
/* ── Text inputs, selects, textareas ─────────────────────────────── */
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not(
[type="hidden"]
):not([type="submit"]):not([type="button"]):not([type="reset"]):not(
[type="color"]
),
textarea {
font-family: inherit;
font-size: var(--step--1);
padding: var(--space-2xs) var(--space-xs);
border: 1px solid var(--border-primary);
border-radius: var(--radius);
background: transparent;
color: var(--text-primary);
transition: border-color 0.15s;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not(
[type="hidden"]
):not([type="submit"]):not([type="button"]):not([type="reset"]):not(
[type="color"]
):focus,
textarea:focus {
outline: none;
border: 2px solid var(--accent-primary);
}
input::placeholder,
textarea::placeholder {
color: var(--text-tertiary);
font-size: var(--step--1);
}
textarea {
resize: vertical;
min-height: 80px;
line-height: 1.5;
}
/* ── Select ──────────────────────────────────────────────────────── */
select {
font-family: inherit;
font-size: var(--step--1);
padding: var(--space-2xs) var(--space-xs);
padding-right: 1.75rem;
border: 1px solid var(--border-primary);
border-radius: var(--radius);
background: transparent;
color: var(--text-primary);
cursor: pointer;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 0.55rem center;
-webkit-appearance: none;
appearance: none;
transition: border-color 0.15s;
}
select:focus {
outline: none;
border: 2px solid var(--accent-primary);
}
/* ── Checkboxes & radios ─────────────────────────────────────────── */
input[type="checkbox"],
input[type="radio"] {
accent-color: var(--accent-primary);
width: 16px;
height: 16px;
cursor: pointer;
flex-shrink: 0;
margin: 0;
}
input[type="radio"] {
border-radius: 50%;
}
/* ============================================================
BUTTONS - shared .btn base class
Targets both <a> and <button>, always has a background.
border-radius: var(--radius); padding: var(--space-xs)
============================================================ */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: var(--space-3xs);
padding: var(--space-xs);
border-radius: var(--radius);
font-size: var(--step--1);
font-family: inherit;
font-weight: 500;
letter-spacing: 0.04em;
cursor: pointer;
text-decoration: none;
line-height: 1.3;
border: none;
transition: background 0.15s, opacity 0.15s, box-shadow 0.15s, filter 0.15s;
width: fit-content;
}
.btn:hover {
filter: brightness(0.92);
}
/* Primary: accent background, white text */
.btn--primary {
background: var(--accent-primary);
color: var(--accent-foreground);
border: 1px solid transparent;
}
.btn--primary:hover {
background: var(--accent-secondary);
filter: none;
}
/* Secondary: light background with border */
.btn--secondary {
background: var(--bg-primary);
color: var(--text-secondary);
border: 1px solid var(--border-primary);
}
.btn--secondary:hover {
border-color: var(--text-secondary);
color: var(--text-primary);
filter: none;
}
/* Muted secondary: bg-secondary background */
.btn--muted {
background: var(--bg-secondary);
color: var(--text-secondary);
border: 1px solid var(--border-primary);
}
.btn--muted:hover {
background: var(--bg-tertiary);
color: var(--text-primary);
filter: none;
}
/* Ghost: transparent bg, border, for links styled as buttons */
.btn--ghost {
background: transparent;
color: var(--text-secondary);
border: 1px solid var(--border-primary);
}
.btn--ghost:hover {
border-color: var(--text-secondary);
color: var(--text-primary);
filter: none;
}
/* Danger: red background */
.btn--danger {
background: var(--accent-red);
color: var(--accent-foreground);
}
.btn--danger:hover {
filter: brightness(0.9);
}
/* Warning: yellow background */
.btn--warning {
background: var(--accent-yellow);
color: var(--text-primary);
}
.btn--warning:hover {
filter: brightness(0.9);
}
/* Success: green background */
.btn--success {
background: var(--accent-green);
color: var(--accent-foreground);
}
.btn--success:hover {
filter: brightness(0.9);
}
/* Small size modifier */
.btn--sm {
padding: var(--space-2xs) var(--space-xs);
font-size: var(--step--2);
}
/* Large size modifier */
.btn--lg {
padding: var(--space-s) var(--space-m);
font-size: var(--step-0);
}
/* Semantic colour modifiers on the muted base (for table/action buttons) */
.btn--blue {
background: var(--blue-muted-bg);
color: var(--accent-blue);
border: 1px solid var(--blue-muted-border);
}
.btn--blue:hover {
background: var(--blue-muted-bg-hover);
filter: none;
}
.btn--yellow {
background: var(--yellow-muted-bg);
color: var(--accent-yellow);
border: 1px solid var(--yellow-muted-border);
}
.btn--yellow:hover {
background: var(--yellow-muted-bg-hover);
filter: none;
}
.btn--green {
background: var(--green-muted-bg);
color: var(--accent-green);
border: 1px solid var(--green-muted-border);
}
.btn--green:hover {
background: var(--green-muted-bg-hover);
filter: none;
}
.btn--red {
background: var(--error-muted-bg);
color: var(--error);
border: 1px solid var(--danger-border-muted);
}
.btn--red:hover {
filter: brightness(0.9);
}
/* ============================================================
SEMANTIC HTML ELEMENTS - baseline styling shared everywhere
============================================================ */
fieldset {
/*background: var(--bg-secondary);*/
border: 1px solid var(--border-primary);
border-radius: var(--radius);
padding: 0 var(--space-m) var(--space-m) var(--space-m);
margin: 0;
}
fieldset > *:not(:last-child) {
margin-bottom: var(--space-xs);
}
legend {
font-size: var(--step--1);
font-weight: 600;
letter-spacing: 0.04em;
text-transform: uppercase;
color: var(--text-secondary);
padding: 0 var(--space-2xs);
}
small {
font-size: var(--step--2);
color: var(--text-secondary);
display: block;
margin-top: var(--space-3xs);
}
table {
width: 100%;
border-collapse: collapse;
font-size: var(--step--1);
}
th {
text-align: left;
font-size: var(--step--2);
letter-spacing: 0.08em;
text-transform: uppercase;
padding: var(--space-3xs) var(--space-xs);
border-bottom: 1px solid var(--border-primary);
color: var(--text-secondary);
font-weight: 400;
white-space: nowrap;
}
td {
padding: var(--space-2xs) var(--space-xs);
border-bottom: 1px solid var(--border-primary);
vertical-align: top;
}
dialog {
border: 1px solid var(--border-primary);
border-radius: var(--radius);
background: var(--bg-primary);
color: var(--text-primary);
padding: 0;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}
dialog::backdrop {
background: rgba(0, 0, 0, 0.45);
}
details > summary {
cursor: pointer;
list-style: none;
}
details > summary::-webkit-details-marker {
display: none;
}
:where(video, audio, iframe) {
border: 1px solid var(--bg-primary);
border-radius: 15px;
}
audio::-webkit-media-controls-enclosure {
border-radius: var(--radius);
}
details {
padding: var(--space-s);
}
summary {
font-family: var(--font-display);
font-weight: 600;
text-decoration: 1px wavy;
color: var(--accent-secondary);
svg {
fill: var(--accent-secondary);
vertical-align: text-bottom;
height: 1.4em;
}
}
@import "style.css";

View File

@@ -0,0 +1,48 @@
/* ============================================================
BADGES — Status badges, access badges.
Root class: .status-badge
============================================================ */
.status-badge {
display: inline-block;
padding: var(--space-3xs) var(--space-2xs);
border-radius: var(--radius);
font-size: var(--step--2);
font-weight: 500;
letter-spacing: 0.04em;
}
.status-published {
background: var(--green-muted-bg);
color: var(--accent-green);
}
.status-pending {
background: var(--warning-muted-bg);
color: var(--warning);
}
.status-access {
display: inline-block;
font-size: var(--step--2);
padding: var(--space-3xs) var(--space-3xs);
border-radius: var(--radius);
background: var(--bg-tertiary);
color: var(--text-secondary);
letter-spacing: 0.03em;
}
.status-access--libre {
background: var(--green-muted-bg);
color: var(--accent-green);
}
.status-access--interne {
background: var(--blue-muted-bg);
color: var(--accent-blue);
}
.status-access--interdit {
background: var(--error-muted-bg);
color: var(--error);
}

View File

@@ -0,0 +1,146 @@
/* ============================================================
BUTTONS — Shared .btn base class with variant modifiers.
Targets both <a> and <button>. Always has a background.
Root class: .btn
============================================================ */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: var(--space-3xs);
padding: var(--space-xs);
border-radius: var(--radius);
font-size: var(--step--1);
font-family: inherit;
font-weight: 500;
letter-spacing: 0.04em;
cursor: pointer;
text-decoration: none;
line-height: 1.3;
border: none;
transition: background 0.15s, opacity 0.15s, box-shadow 0.15s, filter 0.15s;
width: fit-content;
}
.btn:hover { filter: brightness(0.92); }
/* Primary: accent background, white text */
.btn--primary {
background: var(--accent-primary);
color: var(--accent-foreground);
border: 1px solid transparent;
}
.btn--primary:hover {
background: var(--accent-secondary);
filter: none;
}
/* Secondary: light background with border */
.btn--secondary {
background: var(--bg-primary);
color: var(--text-secondary);
border: 1px solid var(--border-primary);
}
.btn--secondary:hover {
border-color: var(--text-secondary);
color: var(--text-primary);
filter: none;
}
/* Muted secondary: bg-secondary background */
.btn--muted {
background: var(--bg-secondary);
color: var(--text-secondary);
border: 1px solid var(--border-primary);
}
.btn--muted:hover {
background: var(--bg-tertiary);
color: var(--text-primary);
filter: none;
}
/* Ghost: transparent bg, border, for links styled as buttons */
.btn--ghost {
background: transparent;
color: var(--text-secondary);
border: 1px solid var(--border-primary);
}
.btn--ghost:hover {
border-color: var(--text-secondary);
color: var(--text-primary);
filter: none;
}
/* Danger: red background */
.btn--danger {
background: var(--accent-red);
color: var(--accent-foreground);
}
.btn--danger:hover { filter: brightness(0.9); }
/* Warning: yellow background */
.btn--warning {
background: var(--accent-yellow);
color: var(--text-primary);
}
.btn--warning:hover { filter: brightness(0.9); }
/* Success: green background */
.btn--success {
background: var(--accent-green);
color: var(--accent-foreground);
}
.btn--success:hover { filter: brightness(0.9); }
/* Small size modifier */
.btn--sm {
padding: var(--space-2xs) var(--space-xs);
font-size: var(--step--2);
}
/* Large size modifier */
.btn--lg {
padding: var(--space-s) var(--space-m);
font-size: var(--step-0);
}
/* Semantic colour modifiers on muted base (for table/action buttons) */
.btn--blue {
background: var(--blue-muted-bg);
color: var(--accent-blue);
border: 1px solid var(--blue-muted-border);
}
.btn--blue:hover { background: var(--blue-muted-bg-hover); filter: none; }
.btn--yellow {
background: var(--yellow-muted-bg);
color: var(--accent-yellow);
border: 1px solid var(--yellow-muted-border);
}
.btn--yellow:hover { background: var(--yellow-muted-bg-hover); filter: none; }
.btn--green {
background: var(--green-muted-bg);
color: var(--accent-green);
border: 1px solid var(--green-muted-border);
}
.btn--green:hover { background: var(--green-muted-bg-hover); filter: none; }
.btn--red {
background: var(--error-muted-bg);
color: var(--error);
border: 1px solid var(--danger-border-muted);
}
.btn--red:hover { filter: brightness(0.9); }

View File

@@ -0,0 +1,30 @@
/* ============================================================
DETAILS / SUMMARY — Base styling for <details>/<summary>.
Root: element selectors
============================================================ */
details > summary {
cursor: pointer;
list-style: none;
}
details > summary::-webkit-details-marker {
display: none;
}
details {
padding: var(--space-s);
}
summary {
font-family: var(--font-display);
font-weight: 600;
text-decoration: 1px wavy;
color: var(--accent-secondary);
svg {
fill: var(--accent-secondary);
vertical-align: text-bottom;
height: 1.4em;
}
}

View File

@@ -0,0 +1,17 @@
/* ============================================================
DIALOG — Base dialog + backdrop styling.
Root: element selector (dialog)
============================================================ */
dialog {
border: 1px solid var(--border-primary);
border-radius: var(--radius);
background: var(--bg-primary);
color: var(--text-primary);
padding: 0;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}
dialog::backdrop {
background: rgba(0, 0, 0, 0.45);
}

View File

@@ -0,0 +1,11 @@
/* ============================================================
FOCUS — Consistent keyboard-focus ring for all interactive
elements.
============================================================ */
:focus-visible {
outline: none;
box-shadow: 0 0 0 2px var(--accent-primary);
border-radius: var(--radius);
padding: var(--space-3xs) var(--space-xs);
}

View File

@@ -0,0 +1,112 @@
/* ============================================================
FORMS — Base input, select, textarea, fieldset, legend
styling shared across admin + public pages.
Root: element selectors (universal form styling)
============================================================ */
/* ── Labels ─────────────────────────────────────────────────────────── */
label {
display: block;
margin-bottom: var(--space-3xs);
}
/* ── Text inputs, selects, textareas ────────────────────────────────── */
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="color"]),
textarea {
font-family: inherit;
font-size: var(--step--1);
padding: var(--space-2xs) var(--space-xs);
border: 1px solid var(--border-primary);
border-radius: var(--radius);
background: transparent;
color: var(--text-primary);
transition: border-color 0.15s;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="color"]):focus,
textarea:focus {
outline: none;
border: 2px solid var(--accent-primary);
}
input::placeholder,
textarea::placeholder {
color: var(--text-tertiary);
font-size: var(--step--1);
}
textarea {
resize: vertical;
min-height: 80px;
line-height: 1.5;
}
/* ── Select ─────────────────────────────────────────────────────────── */
select {
font-family: inherit;
font-size: var(--step--1);
padding: var(--space-2xs) var(--space-xs);
padding-right: 1.75rem;
border: 1px solid var(--border-primary);
border-radius: var(--radius);
background: transparent;
color: var(--text-primary);
cursor: pointer;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 0.55rem center;
-webkit-appearance: none;
appearance: none;
transition: border-color 0.15s;
}
select:focus {
outline: none;
border: 2px solid var(--accent-primary);
}
/* ── Checkboxes & radios ────────────────────────────────────────────── */
input[type="checkbox"],
input[type="radio"] {
accent-color: var(--accent-primary);
width: 16px;
height: 16px;
cursor: pointer;
flex-shrink: 0;
margin: 0;
}
input[type="radio"] { border-radius: 50%; }
/* ── Fieldsets & legends ──────────────────────────────────────────────── */
fieldset {
border: 1px solid var(--border-primary);
border-radius: var(--radius);
padding: 0 var(--space-m) var(--space-m) var(--space-m);
margin: 0;
}
fieldset > *:not(:last-child) { margin-bottom: var(--space-xs); }
legend {
font-size: var(--step--1);
font-weight: 600;
letter-spacing: 0.04em;
text-transform: uppercase;
color: var(--text-secondary);
padding: 0 var(--space-2xs);
}
/* ── Small / help text ──────────────────────────────────────────────────── */
small {
font-size: var(--step--2);
color: var(--text-secondary);
display: block;
margin-top: var(--space-3xs);
}

View File

@@ -0,0 +1,218 @@
/* ============================================================
HEADER — Site header, navigation, hamburger menu
Root class: header (element selector — the only instance)
============================================================ */
/* ── Header bar ─────────────────────────────────────────────────────── */
header {
vertical-align: center;
flex-shrink: 0;
background: linear-gradient(
180deg,
var(--gradient-1) 0%,
var(--gradient-2) 33%,
var(--gradient-3) 66%,
var(--gradient-4) 100%
);
.nav-logo {
text-decoration: none;
}
.nav-left-links,
.nav-right-links {
display: flex;
gap: var(--space-l);
align-items: center;
list-style: none;
margin: 0;
padding: 0;
}
nav {
padding: var(--space-s) var(--space-s);
display: flex;
align-items: center;
justify-content: space-between;
font-size: var(--step-0);
a {
font-family: var(--font-display);
letter-spacing: 0.12em;
text-transform: uppercase;
color: var(--accent-foreground);
text-decoration: none;
padding: var(--space-3xs) var(--space-xs);
border-radius: var(--radius);
text-shadow:
0 0 16px var(--header-shadow-strong),
0 0 32px var(--header-shadow-soft);
}
ul {
display: flex;
gap: var(--space-l);
align-items: center;
list-style: none;
margin: 0;
padding: 0;
}
ul a {
transition: opacity 0.15s;
}
ul a:hover {
opacity: 1;
}
}
ul a[aria-current="page"] {
opacity: 1;
border-bottom: 1px solid var(--header-nav-active-border);
padding-bottom: 1px;
}
.nav-top-row {
display: contents;
}
.nav-mobile-links {
display: none;
}
}
/* ── Hamburger menu (pure CSS, checkbox trick) ──────────────────────── */
/* DOM order (public only):
input.menu-btn ← off-screen checkbox
nav
div.nav-top-row ← always-visible row
ul.nav-left-links ← logo + Répertoire
ul.nav-right-links ← Licences, À Propos
label.menu-icon ← burger icon trigger
ul.nav-mobile-links ← full dropdown (hidden by default) */
.menu-btn {
position: absolute;
top: -9999px;
left: -9999px;
}
.menu-icon {
display: none;
cursor: pointer;
padding: var(--space-2xs) var(--space-s);
align-items: center;
justify-content: center;
}
/* Middle bar of the burger icon */
.navicon {
background: var(--accent-foreground);
display: block;
height: 2px;
width: 24px;
position: relative;
transition: all 0.3s ease-out;
}
.navicon::before,
.navicon::after {
content: "";
background: var(--accent-foreground);
display: block;
height: 2px;
width: 100%;
position: absolute;
transition: all 0.3s ease-out;
}
.navicon::before { top: -7px; }
.navicon::after { bottom: -7px; }
/* ── Mobile (≤ 640px) ───────────────────────────────────────────────── */
@media screen and (max-width: 640px) {
header nav[aria-label="Navigation principale"] {
display: flex;
flex-direction: column;
align-items: stretch;
padding: 0;
}
header nav[aria-label="Navigation principale"] .nav-top-row {
display: flex;
align-items: center;
justify-content: space-between;
padding: var(--space-s);
}
header nav[aria-label="Navigation principale"] .nav-right-links {
display: none;
}
header nav[aria-label="Navigation principale"] .nav-left-links {
display: flex;
gap: 0;
}
header nav[aria-label="Navigation principale"]
.nav-left-links li:not(:first-child) {
display: none;
}
.menu-icon { display: flex; }
header nav[aria-label="Navigation principale"] .nav-mobile-links {
display: block;
list-style: none;
margin: 0;
padding: 0;
max-height: 0;
overflow: hidden;
transition: max-height 0.2s ease-out;
}
.menu-btn:checked
~ nav[aria-label="Navigation principale"]
.nav-mobile-links {
max-height: 300px;
}
header nav[aria-label="Navigation principale"] .nav-mobile-links li {
border-top: 1px solid var(--header-nav-active-border);
text-align: left;
}
header nav[aria-label="Navigation principale"] .nav-mobile-links li a {
display: block;
width: 100%;
padding: var(--space-s) var(--space-s);
text-align: left;
}
/* Animate burger → X */
.menu-btn:checked
~ nav[aria-label="Navigation principale"]
.menu-icon
.navicon {
background: transparent;
}
.menu-btn:checked
~ nav[aria-label="Navigation principale"]
.menu-icon
.navicon::before {
transform: rotate(-45deg);
top: 0;
}
.menu-btn:checked
~ nav[aria-label="Navigation principale"]
.menu-icon
.navicon::after {
transform: rotate(45deg);
bottom: 0;
}
}

View File

@@ -0,0 +1,15 @@
/* ============================================================
LINKS — Global link styles.
Root: element selector (a)
============================================================ */
a {
color: inherit;
text-decoration: none;
}
a:hover {
text-decoration-line: underline;
text-decoration-style: wavy;
text-decoration-thickness: 1px;
}

View File

@@ -0,0 +1,13 @@
/* ============================================================
MEDIA — Embedded media (video, audio, iframe).
Root: element selectors
============================================================ */
:where(video, audio, iframe) {
border: 1px solid var(--bg-primary);
border-radius: 15px;
}
audio::-webkit-media-controls-enclosure {
border-radius: var(--radius);
}

View File

@@ -0,0 +1,57 @@
/* ============================================================
PAGINATION — Shared pagination controls.
Root class: .pagination-wrap
============================================================ */
.pagination-wrap {
display: flex;
justify-content: center;
align-items: center;
gap: var(--space-2xs);
padding: var(--space-m) 0 var(--space-2xs);
}
.pagination-wrap ul {
display: flex;
gap: var(--space-3xs);
list-style: none;
margin: 0;
padding: 0;
}
.pagination-btn {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 2.75rem;
min-height: 2.75rem;
padding: 0 var(--space-2xs);
border: 1px solid var(--border-secondary);
border-radius: var(--radius);
color: var(--text-primary);
font-size: var(--step--1);
text-decoration: none;
transition: border-color 0.15s, color 0.15s;
}
.pagination-btn:hover:not(.disabled) {
border-color: var(--accent-primary);
color: var(--accent-primary);
}
.pagination-btn.disabled {
opacity: 0.3;
cursor: not-allowed;
pointer-events: none;
}
.pagination-info {
font-size: var(--step--1);
color: var(--text-secondary);
padding: 0 var(--space-2xs);
}
.page-current {
font-weight: 600;
color: var(--text-primary);
}

View File

@@ -0,0 +1,43 @@
/* ============================================================
SEARCH BAR — Shared header search form
Root class: .header-search-wrap
============================================================ */
.header-search-wrap {
padding: 0;
flex-shrink: 0;
background: linear-gradient(180deg, var(--gradient-4) 0%, #ffffffee 100%);
}
.header-search-form { width: 100%; }
.header-search-input-wrap {
position: relative;
display: flex;
align-items: center;
}
.header-search-icon {
position: absolute;
left: var(--space-s);
width: 18px;
height: 18px;
stroke: var(--accent-primary);
pointer-events: none;
}
.header-search-input-wrap input {
width: 100%;
padding: var(--space-2xs) var(--space-s) !important;
padding-left: calc(18px + var(--space-l)) !important;
border: 1px solid var(--accent-primary) !important;
border-radius: var(--radius) !important;
background: var(--bg-primary) !important;
font-size: var(--step-0) !important;
color: var(--text-primary) !important;
font-family: inherit !important;
}
.header-search-input-wrap input::placeholder {
color: var(--accent-primary) !important;
}

View File

@@ -0,0 +1,28 @@
/* ============================================================
TABLES — Base table, th, td styling.
Root: element selectors (universal table styling)
============================================================ */
table {
width: 100%;
border-collapse: collapse;
font-size: var(--step--1);
}
th {
text-align: left;
font-size: var(--step--2);
letter-spacing: 0.08em;
text-transform: uppercase;
padding: var(--space-3xs) var(--space-xs);
border-bottom: 1px solid var(--border-primary);
color: var(--text-secondary);
font-weight: 400;
white-space: nowrap;
}
td {
padding: var(--space-2xs) var(--space-xs);
border-bottom: 1px solid var(--border-primary);
vertical-align: top;
}

View File

@@ -0,0 +1,65 @@
/* ============================================================
TOAST — Bottom-center toast messages (CSS-only auto-fade).
Root class: .toast-container + .toast
============================================================ */
#toast-region {
position: fixed;
bottom: var(--space-l);
left: 50%;
transform: translateX(-50%);
z-index: 10000;
display: flex;
flex-direction: column;
align-items: center;
gap: var(--space-xs);
pointer-events: none;
width: max-content;
max-width: min(560px, calc(100vw - 2 * var(--space-l)));
}
.toast {
padding: var(--space-s) var(--space-m);
border-radius: var(--radius);
font-size: var(--step-0);
border-left: 4px solid;
box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
pointer-events: auto;
/* enter then fade out — total visible ~6.35s */
animation: toast-enter 0.35s ease-out,
toast-exit 0.5s ease-in 6s forwards;
}
.toast--error {
background: var(--bg-secondary);
border-color: var(--error);
color: var(--text-primary);
}
.toast--success {
background: var(--bg-secondary);
border-color: var(--success);
color: var(--text-primary);
}
.toast--warning {
background: var(--bg-secondary);
border-color: var(--warning);
color: var(--text-primary);
animation: toast-enter 0.35s ease-out;
}
.toast--warning a {
color: inherit;
text-decoration: underline;
}
@keyframes toast-enter {
from { opacity: 0; transform: translateY(12px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes toast-exit {
from { opacity: 1; }
to { opacity: 0; pointer-events: none; }
}

View File

@@ -1,7 +1,7 @@
/* ============================================================
FORM — TFE submission form
Shared between admin add/edit pages and the student partage form.
Depends on variables.css (loaded via common.css).
Variables loaded via style.css (colors.css + typography.css).
============================================================ */
/* ── Field rows & layout ────────────────────────────────────────────────── */
@@ -111,7 +111,7 @@
margin-top: var(--space-2xs);
}
/* small base styles live in common.css */
/* small base styles live in components/forms.css */
/* ── Checkbox groups (languages, formats) ───────────────────────────────── */
.admin-body fieldset.admin-checkbox-group,
@@ -147,7 +147,7 @@
}
/* ── Fieldsets & legends ────────────────────────────────────────────────── */
/* Base fieldset/legend styles live in common.css */
/* Base fieldset/legend styles live in components/forms.css */
.admin-body fieldset,
.student-body fieldset {
margin: var(--space-2xs) 0 var(--space-s);
@@ -360,7 +360,7 @@
/* ── Student-mode layout ────────────────────────────────────────────────── */
/* Standalone page (no admin header/footer): restore scrollability that
common.css removes via overflow:hidden on html,body. */
base.css removes via overflow:hidden on html,body. */
.student-body {
display: flex;
flex-direction: column;

View File

@@ -1,9 +1,8 @@
/* ============================================================
HOME PAGE (index.php)
Root class: .home-body
============================================================ */
@import url("./variables.css");
/* Cards grid — scrollable main area */
.home-main {
flex: 1;

View File

@@ -1,9 +1,8 @@
/* ============================================================
RÉPERTOIRE / SEARCH PAGE (repertoire.php)
Root class: .search-main
============================================================ */
@import url("./variables.css");
.search-main {
flex: 1;
min-height: 0;

View File

@@ -0,0 +1,104 @@
/* ============================================================
RESET — Based on modern-normalize v3.0.1 (what this project
originally used). Do not modify this file.
============================================================ */
*, ::before, ::after {
box-sizing: border-box;
}
html {
font-family: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
line-height: 1.15;
-webkit-text-size-adjust: 100%;
tab-size: 4;
}
body {
margin: 0;
}
b, strong {
font-weight: bolder;
}
code, kbd, pre, samp {
font-family: ui-monospace, SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
font-size: 1em;
}
small {
font-size: 80%;
}
sub, sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub { bottom: -0.25em; }
sup { top: -0.5em; }
table {
border-color: currentcolor;
}
button, input, optgroup, select, textarea {
font-family: inherit;
font-size: 100%;
line-height: 1.15;
margin: 0;
}
[type=button], [type=reset], [type=submit], button {
-webkit-appearance: button;
}
legend {
padding: 0;
}
progress {
vertical-align: baseline;
}
::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
height: auto;
}
[type=search] {
-webkit-appearance: textfield;
outline-offset: -2px;
}
::-webkit-search-decoration {
-webkit-appearance: none;
}
::-webkit-file-upload-button {
-webkit-appearance: button;
font: inherit;
}
summary {
display: list-item;
}
/* Additional minimal resets not in modern-normalize */
img, svg, video, canvas, audio, iframe, embed, object {
display: block;
vertical-align: middle;
}
img, video {
max-width: 100%;
height: auto;
}
[hidden] {
display: none;
}

View File

@@ -0,0 +1,27 @@
/* ============================================================
STYLE — Root @import file.
Layers are ordered: reset → colors → typography → base →
components → utilities → (page files loaded separately)
============================================================ */
@import "reset.css";
@import "colors.css";
@import "typography.css";
@import "base.css";
/* Shared components */
@import "components/links.css";
@import "components/focus.css";
@import "components/forms.css";
@import "components/tables.css";
@import "components/dialog.css";
@import "components/details.css";
@import "components/media.css";
@import "components/buttons.css";
@import "components/badges.css";
@import "components/toast.css";
@import "components/pagination.css";
@import "components/header.css";
@import "components/search.css";
@import "utilities.css";

View File

@@ -1,9 +1,8 @@
/* ============================================================
TFE INDIVIDUAL PAGE (tfe.php)
Root class: .tfe-main
============================================================ */
@import url("./variables.css");
.tfe-main {
flex: 1;
min-height: 0;
@@ -37,7 +36,7 @@
line-height: 1.3;
}
/* Title (h1) — inherits global scale from common.css */
/* Title (h1) — inherits global scale from base.css */
.tfe-title {
margin: 0;
}

View File

@@ -0,0 +1,91 @@
/* ============================================================
TYPOGRAPHY — Font faces, font-size + line-height scale,
font-family variables. All font-size values use named
variables; never write raw rem/px inline.
============================================================ */
/* ── Font faces ─────────────────────────────────────────────────────── */
@font-face {
font-family: "Ductus";
src: url("../fonts/DuctusRegular.otf") format("opentype");
font-style: normal;
font-weight: 398;
font-display: swap;
}
@font-face {
font-family: "BBBDMSans";
src: url("../fonts/BBBDMSans-Light.otf") format("opentype");
font-style: normal;
font-weight: 298;
font-display: swap;
}
@font-face {
font-family: "BBBDMSans";
src: url("/assets/fonts/BBBDMSans-Regular.otf") format("opentype");
font-style: normal;
font-weight: 398;
font-display: swap;
}
@font-face {
font-family: "BBBDMSans";
src: url("../fonts/BBBDMSans-Medium.otf") format("opentype");
font-style: normal;
font-weight: 498;
font-display: swap;
}
@font-face {
font-family: "BBBDMSans";
src: url("../fonts/BBBDMSans-Bold.otf") format("opentype");
font-style: normal;
font-weight: 698;
font-display: swap;
}
/* ── Named font-size scale ──────────────────────────────────────────── */
/* @link https://utopia.fyi/type/calculator?c=360,18,1.2,1240,20,1.25,5,2,&s=0.75|0.5|0.25,1.5|2|3|4|6,s-l&g=s,l,xl,12 */
:root {
--step--2: clamp(0.7813rem, 0.7736rem + 0.0341vw, 0.8rem);
--step--1: clamp(0.9375rem, 0.9119rem + 0.1136vw, 1rem);
--step-0: clamp(1.125rem, 1.0739rem + 0.2273vw, 1.25rem);
--step-1: clamp(1.35rem, 1.2631rem + 0.3864vw, 1.5625rem);
--step-2: clamp(1.62rem, 1.4837rem + 0.6057vw, 1.9531rem);
--step-3: clamp(1.944rem, 1.7405rem + 0.9044vw, 2.4414rem);
--step-4: clamp(2.3328rem, 2.0387rem + 1.3072vw, 3.0518rem);
--step-5: clamp(2.7994rem, 2.384rem + 1.8461vw, 3.8147rem);
/* ── Named spacing scale ─────────────────────────────────────────── */
/* @link https://utopia.fyi/space/calculator?c=360,18,1.2,1240,20,1.25,5,2,&s=0.75|0.5|0.25,1.5|2|3|4|6,s-l&g=s,l,xl,12 */
--space-3xs: clamp(0.3125rem, 0.3125rem + 0vw, 0.3125rem);
--space-2xs: clamp(0.5625rem, 0.5369rem + 0.1136vw, 0.625rem);
--space-xs: clamp(0.875rem, 0.8494rem + 0.1136vw, 0.9375rem);
--space-s: clamp(1.125rem, 1.0739rem + 0.2273vw, 1.25rem);
--space-m: clamp(1.6875rem, 1.6108rem + 0.3409vw, 1.875rem);
--space-l: clamp(2.25rem, 2.1477rem + 0.4545vw, 2.5rem);
--space-xl: clamp(3.375rem, 3.2216rem + 0.6818vw, 3.75rem);
--space-2xl: clamp(4.5rem, 4.2955rem + 0.9091vw, 5rem);
--space-3xl: clamp(6.75rem, 6.4432rem + 1.3636vw, 7.5rem);
/* One-up pairs */
--space-3xs-2xs: clamp(0.3125rem, 0.1847rem + 0.5682vw, 0.625rem);
--space-2xs-xs: clamp(0.5625rem, 0.4091rem + 0.6818vw, 0.9375rem);
--space-xs-s: clamp(0.875rem, 0.7216rem + 0.6818vw, 1.25rem);
--space-s-m: clamp(1.125rem, 0.8182rem + 1.3636vw, 1.875rem);
--space-m-l: clamp(1.6875rem, 1.3551rem + 1.4773vw, 2.5rem);
--space-l-xl: clamp(2.25rem, 1.6364rem + 2.7273vw, 3.75rem);
--space-xl-2xl: clamp(3.375rem, 2.7102rem + 2.9545vw, 5rem);
--space-2xl-3xl: clamp(4.5rem, 3.2727rem + 5.4545vw, 7.5rem);
/* Custom pairs */
--space-s-l: clamp(1.125rem, 0.5625rem + 2.5vw, 2.5rem);
/* Font families */
--font-body: "BBBDMSans", sans-serif;
--font-display: "Ductus", sans-serif;
}

View File

@@ -0,0 +1,46 @@
/* ============================================================
UTILITIES — Small, stable, reusable helper classes that are
genuinely cross-component. Only promote after 3+ real uses.
============================================================ */
/* 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: var(--space-2xs) var(--space-s);
background: var(--accent-primary);
color: var(--text-primary);
font-size: var(--step--1);
font-weight: 600;
text-decoration: none;
border-radius: 0 0 4px 4px;
}
.skip-link:focus {
top: 0;
}
/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
transition-duration: 0.01ms !important;
animation-duration: 0.01ms !important;
}
}

View File

@@ -1,165 +1,8 @@
/* ============================================================
Fonts
VARIABLES — Backward-compat wrapper. All variables are now
split into colors.css + typography.css.
Kept so old @import url("./variables.css") still works.
============================================================ */
@font-face {
font-family: "Ductus";
src: url("../fonts/DuctusRegular.otf") format("opentype");
font-style: normal;
font-weight: 398;
font-display: swap;
}
@font-face {
font-family: "BBBDMSans";
src: url("../fonts/BBBDMSans-Light.otf") format("opentype");
font-style: normal;
font-weight: 298;
font-display: swap;
}
@font-face {
font-family: "BBBDMSans";
src: url("/assets/fonts/BBBDMSans-Regular.otf") format("opentype");
font-style: normal;
font-weight: 398;
font-display: swap;
}
@font-face {
font-family: "BBBDMSans";
src: url("../fonts/BBBDMSans-Medium.otf") format("opentype");
font-style: normal;
font-weight: 498;
font-display: swap;
}
@font-face {
font-family: "BBBDMSans";
src: url("../fonts/BBBDMSans-Bold.otf") format("opentype");
font-style: normal;
font-weight: 698;
font-display: swap;
}
/* ============================================================
CSS VARIABLES (CUSTOM PROPERTIES)
============================================================ */
/* @link https://utopia.fyi/type/calculator?c=360,18,1.2,1240,20,1.25,5,2,&s=0.75|0.5|0.25,1.5|2|3|4|6,s-l&g=s,l,xl,12 */
:root {
--step--2: clamp(0.7813rem, 0.7736rem + 0.0341vw, 0.8rem);
--step--1: clamp(0.9375rem, 0.9119rem + 0.1136vw, 1rem);
--step-0: clamp(1.125rem, 1.0739rem + 0.2273vw, 1.25rem);
--step-1: clamp(1.35rem, 1.2631rem + 0.3864vw, 1.5625rem);
--step-2: clamp(1.62rem, 1.4837rem + 0.6057vw, 1.9531rem);
--step-3: clamp(1.944rem, 1.7405rem + 0.9044vw, 2.4414rem);
--step-4: clamp(2.3328rem, 2.0387rem + 1.3072vw, 3.0518rem);
--step-5: clamp(2.7994rem, 2.384rem + 1.8461vw, 3.8147rem);
/* @link https://utopia.fyi/space/calculator?c=360,18,1.2,1240,20,1.25,5,2,&s=0.75|0.5|0.25,1.5|2|3|4|6,s-l&g=s,l,xl,12 */
--space-3xs: clamp(0.3125rem, 0.3125rem + 0vw, 0.3125rem);
--space-2xs: clamp(0.5625rem, 0.5369rem + 0.1136vw, 0.625rem);
--space-xs: clamp(0.875rem, 0.8494rem + 0.1136vw, 0.9375rem);
--space-s: clamp(1.125rem, 1.0739rem + 0.2273vw, 1.25rem);
--space-m: clamp(1.6875rem, 1.6108rem + 0.3409vw, 1.875rem);
--space-l: clamp(2.25rem, 2.1477rem + 0.4545vw, 2.5rem);
--space-xl: clamp(3.375rem, 3.2216rem + 0.6818vw, 3.75rem);
--space-2xl: clamp(4.5rem, 4.2955rem + 0.9091vw, 5rem);
--space-3xl: clamp(6.75rem, 6.4432rem + 1.3636vw, 7.5rem);
/* One-up pairs */
--space-3xs-2xs: clamp(0.3125rem, 0.1847rem + 0.5682vw, 0.625rem);
--space-2xs-xs: clamp(0.5625rem, 0.4091rem + 0.6818vw, 0.9375rem);
--space-xs-s: clamp(0.875rem, 0.7216rem + 0.6818vw, 1.25rem);
--space-s-m: clamp(1.125rem, 0.8182rem + 1.3636vw, 1.875rem);
--space-m-l: clamp(1.6875rem, 1.3551rem + 1.4773vw, 2.5rem);
--space-l-xl: clamp(2.25rem, 1.6364rem + 2.7273vw, 3.75rem);
--space-xl-2xl: clamp(3.375rem, 2.7102rem + 2.9545vw, 5rem);
--space-2xl-3xl: clamp(4.5rem, 3.2727rem + 5.4545vw, 7.5rem);
/* Custom pairs */
--space-s-l: clamp(1.125rem, 0.5625rem + 2.5vw, 2.5rem);
/* Fonts */
--font-body: "BBBDMSans", sans-serif;
--font-display: "Ductus", sans-serif;
/* Backgrounds */
--bg-primary: #ffffff;
--bg-secondary: #f5f5f5;
--bg-tertiary: #e8e8e8;
--bg-active: #d0d0d0;
/* Text */
--text-primary: #111111;
--text-secondary: #666666;
--text-tertiary: #999999;
/* Borders */
--border-primary: #dddddd;
--border-secondary: #cccccc;
/* Border radius */
--radius: 10px;
/* Status */
--success: #5cd69d;
--error: #f25a5a;
--warning: #fbca51;
/* Accent */
--accent-primary: #9557b5;
--accent-secondary: #683d7f;
--accent-foreground: #ffffff;
--accent-muted: rgba(149, 87, 181, 0.12);
--accent-blue: #41adff;
--accent-green: #4caf50;
--accent-yellow: #f39c12;
--accent-red: #f25a5a;
/* Gradient (header) */
--gradient-1: #3c856c;
--gradient-2: #60ecb4;
--gradient-3: #e390ff;
--gradient-4: #9557b5;
/* Header decorative */
--header-gradient-fade: rgba(149, 87, 181, 0);
--header-shadow-strong: rgba(119, 70, 145, 1);
--header-shadow-soft: rgba(119, 70, 145, 0.8);
--header-nav-active-border: rgba(255, 255, 255, 0.6);
/* Search error block */
--search-error-bg: #fff0f0;
--search-error-border: #cc0000;
--search-error-color: #cc0000;
/* System page — log/config syntax highlight */
--sys-syntax-comment: #999999;
--sys-syntax-directive: #1a6fb5;
--sys-syntax-block: #7a2fa0;
--sys-syntax-value: #a05c00;
--sys-syntax-location: #1a7a6b;
--sys-syntax-notice: #3a6ea8;
--sys-syntax-crit: #c0392b;
/* Muted alpha overlays — derived from semantic tokens */
--success-muted-bg: rgba(92, 214, 157, 0.12);
--success-muted-border: rgba(92, 214, 157, 0.35);
--warning-muted-bg: rgba(251, 202, 81, 0.12);
--warning-muted-border: rgba(251, 202, 81, 0.35);
--error-muted-bg: rgba(242, 90, 90, 0.12);
--error-muted-border: rgba(242, 90, 90, 0.35);
--blue-muted-bg: rgba(65, 173, 255, 0.12);
--blue-muted-border: rgba(65, 173, 255, 0.3);
--blue-muted-bg-hover: rgba(65, 173, 255, 0.22);
--yellow-muted-bg: rgba(243, 156, 18, 0.12);
--yellow-muted-border: rgba(243, 156, 18, 0.3);
--yellow-muted-bg-hover: rgba(243, 156, 18, 0.22);
--green-muted-bg: rgba(76, 175, 80, 0.12);
--green-muted-border: rgba(76, 175, 80, 0.3);
--green-muted-bg-hover: rgba(76, 175, 80, 0.22);
--danger-border-muted: rgba(242, 90, 90, 0.35);
}
@import "colors.css";
@import "typography.css";

View File

@@ -185,7 +185,7 @@ function renderShareLinkError(string $title, string $message): void
<link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon/favicon-16x16.png">
<link rel="shortcut icon" href="/assets/favicon/favicon.ico">
<meta name="theme-color" content="#ffffff">
<link rel="stylesheet" href="<?= App::assetV('/assets/css/common.css') ?>">
<link rel="stylesheet" href="<?= App::assetV('/assets/css/style.css') ?>">
<link rel="stylesheet" href="<?= App::assetV('/assets/css/form.css') ?>">
</head>
<body class="student-body">
@@ -259,7 +259,7 @@ function requirePasswordGate(array $link, string $slug): void
<link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon/favicon-16x16.png">
<link rel="shortcut icon" href="/assets/favicon/favicon.ico">
<meta name="theme-color" content="#ffffff">
<link rel="stylesheet" href="<?= App::assetV('/assets/css/common.css') ?>">
<link rel="stylesheet" href="<?= App::assetV('/assets/css/style.css') ?>">
<link rel="stylesheet" href="<?= App::assetV('/assets/css/form.css') ?>">
</head>
<body class="student-body">
@@ -428,7 +428,7 @@ function renderShareLinkForm(string $slug, array $link): void
<meta name="csrf-token" content="<?= htmlspecialchars($_SESSION['csrf_token']) ?>">
<?php endif; ?>
<meta name="filepond-base" content="/partage/actions/filepond">
<link rel="stylesheet" href="<?= App::assetV('/assets/css/common.css') ?>">
<link rel="stylesheet" href="<?= App::assetV('/assets/css/style.css') ?>">
<link rel="stylesheet" href="<?= App::assetV('/assets/css/form.css') ?>">
<link rel="stylesheet" href="<?= App::assetV('/assets/css/filepond.min.css') ?>">
<link rel="stylesheet" href="<?= App::assetV('/assets/css/filepond-plugin-image-preview.min.css') ?>">

View File

@@ -57,7 +57,7 @@ $pageTitle = 'Merci — TFE enregistré';
<link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon/favicon-16x16.png">
<link rel="shortcut icon" href="/assets/favicon/favicon.ico">
<link rel="stylesheet" href="<?= App::assetV('/assets/css/common.css') ?>">
<link rel="stylesheet" href="<?= App::assetV('/assets/css/style.css') ?>">
<link rel="stylesheet" href="<?= App::assetV('/assets/css/form.css') ?>">
</head>
<body class="student-body">

View File

@@ -70,7 +70,7 @@ $pageTitle = 'Corriger l\'adresse e-mail';
<link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon/favicon-16x16.png">
<link rel="shortcut icon" href="/assets/favicon/favicon.ico">
<link rel="stylesheet" href="<?= App::assetV('/assets/css/common.css') ?>">
<link rel="stylesheet" href="<?= App::assetV('/assets/css/style.css') ?>">
<link rel="stylesheet" href="<?= App::assetV('/assets/css/form.css') ?>">
</head>
<body class="student-body">

View File

@@ -1 +1 @@
[1778680784,1778680816]
[1779201568]

View File

@@ -1 +1 @@
[1778596263,1778596264]
[1779201697]

View File

@@ -362,3 +362,5 @@
{"timestamp":"2026-05-12T12:22:43+00:00","ip":"127.0.0.1","user_agent":"Mozilla/5.0 (X11; Linux x86_64; rv:150.0) Gecko/20100101 Firefox/150.0","resource":"share_link","action":"archive","status":"success","context":{"link_id":208}}
{"timestamp":"2026-05-12T12:23:22+00:00","ip":"127.0.0.1","user_agent":"Mozilla/5.0 (X11; Linux x86_64; rv:150.0) Gecko/20100101 Firefox/150.0","resource":"share_link","action":"create","status":"success","context":{"slug":"20260512-CL5LC53W","has_password":true,"expires_at":null,"objet_restriction":"tfe"}}
{"timestamp":"2026-05-18T15:20:07+00:00","ip":"127.0.0.1","user_agent":"Mozilla/5.0 (X11; Linux x86_64; rv:150.0) Gecko/20100101 Firefox/150.0","resource":"thesis","action":"edit","status":"success","context":{"thesis_id":1263,"title":"Pourquoi les artistes sont-ils encore sur Instagram alors que jai vu une story disant quil fallait quitter META"}}
{"timestamp":"2026-05-19T14:39:37+00:00","ip":"127.0.0.1","user_agent":"Mozilla/5.0 (X11; Linux x86_64; rv:150.0) Gecko/20100101 Firefox/150.0","resource":"share_link","action":"deactivate","status":"success","context":{"link_id":213}}
{"timestamp":"2026-05-19T14:39:39+00:00","ip":"127.0.0.1","user_agent":"Mozilla/5.0 (X11; Linux x86_64; rv:150.0) Gecko/20100101 Firefox/150.0","resource":"share_link","action":"activate","status":"success","context":{"link_id":213}}

View File

@@ -567,7 +567,10 @@ function copyUrlFrom(el) {
}
function copyTextToClipboard(text) {
navigator.clipboard.writeText(text).catch(() => {});
navigator.clipboard.writeText(text).then(() => {
const btn = event?.target?.closest('button');
if (btn) { const orig = btn.getAttribute('title') || ''; btn.setAttribute('title', '✓ Copié'); setTimeout(() => btn.setAttribute('title', orig), 1200); }
}).catch(() => {});
}
function openEditDialog(id, name, hasPassword, expiresVal) {

View File

@@ -70,8 +70,7 @@
<?php if (!empty($isAdmin) || !empty($filepondBase)): ?>
<meta name="filepond-base" content="<?= htmlspecialchars($filepondBase ?? '/admin/actions/filepond') ?>">
<?php endif; ?>
<link rel="stylesheet" href="<?= App::assetV('/assets/css/modern-normalize.min.css') ?>">
<link rel="stylesheet" href="<?= App::assetV('/assets/css/common.css') ?>">
<link rel="stylesheet" href="<?= App::assetV('/assets/css/style.css') ?>">
<?php foreach ($extraCss ?? [] as $css): ?>
<link rel="stylesheet" href="<?= App::assetV($css) ?>">
<?php endforeach; ?>