@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
(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. ============================================================ */ /* 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 and