Files
archicratie-edition/src/styles/global.css
archicratia 60d88939b0
All checks were successful
CI / build-and-anchors (push) Successful in 1m25s
SMOKE / smoke (push) Successful in 11s
CI / build-and-anchors (pull_request) Successful in 1m20s
Seed from NAS prod snapshot 20260130-190531
2026-01-31 10:51:38 +00:00

330 lines
6.3 KiB
CSS

:root {
color-scheme: light dark;
--page-gap: 12px;
/* valeurs mises à jour par JS */
--sticky-header-h: 108px;
--followbar-h: 0px;
--sticky-offset-px: 120;
/* offset réel pour scroll-margin-top (header + bandeau) */
--sticky-offset: calc(var(--sticky-header-h) + var(--followbar-h));
/* bandeau aligné sur le reading */
--reading-left: 0px;
--reading-width: 100%;
/* tailles exactes du reading (injectées par JS) */
--rf-h1-size: 2rem;
--rf-h1-lh: 1.2;
--rf-h1-fw: 800;
--rf-h2-size: 1.5rem;
--rf-h2-lh: 1.25;
--rf-h2-fw: 700;
--rf-h3-size: 1.25rem;
--rf-h3-lh: 1.25;
--rf-h3-fw: 650;
}
body {
margin: 0;
font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
line-height: 1.6;
}
a { text-decoration: none; }
a:hover { text-decoration: underline; }
/* Header sticky */
header{
position: sticky;
top: 0;
z-index: 50;
background: rgba(255,255,255,.92);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
border-bottom: 1px solid rgba(127,127,127,0.35);
padding: 12px 16px;
}
@media (prefers-color-scheme: dark){
header{ background: rgba(0,0,0,.72); }
}
.site-nav { font-size: 14px; opacity: 0.9; }
main { padding: 0; }
.reading {
max-width: 78ch;
margin: 0 auto;
}
.reading h1 {
line-height: 1.2;
margin: 0 0 10px;
}
.reading p { margin: 0 0 12px; }
.edition-bar {
display: flex;
flex-wrap: wrap;
gap: 10px 16px;
align-items: center;
margin-top: 10px;
padding-top: 10px;
border-top: 1px dashed rgba(127,127,127,0.35);
font-size: 14px;
}
.badge {
padding: 2px 8px;
border: 1px solid rgba(127,127,127,0.45);
border-radius: 999px;
}
.resume-btn{
font-size: 15px;
font-weight: 800;
border: 1px solid rgba(127,127,127,0.55);
border-radius: 999px;
padding: 5px 12px;
}
/* Toggle niveaux */
.level-toggle { display: inline-flex; gap: 6px; }
.lvl-btn {
border: 1px solid rgba(127,127,127,0.55);
background: transparent;
padding: 4px 10px;
border-radius: 999px;
cursor: pointer;
font-size: 13px;
}
.lvl-btn[aria-pressed="true"] {
border-color: rgba(127,127,127,0.9);
font-weight: 650;
}
/* Règles niveaux */
body[data-reading-level="1"] .level-2,
body[data-reading-level="1"] .level-3 { display: none; }
body[data-reading-level="2"] .level-3 { display: none; }
/* ==========================
Scroll offset (anchors / headings / paras)
========================== */
/* Paragraph tools + bookmark */
.reading p[id]{
position: relative;
padding-right: 14rem;
scroll-margin-top: var(--sticky-offset);
}
/* Anchres + titres */
.para-alias,
.details-anchor{
display: block;
height: 0;
scroll-margin-top: var(--sticky-offset);
}
.reading h1,
.reading h2[id],
.reading h3[id]{
scroll-margin-top: var(--sticky-offset);
}
.para-tools{
position: absolute;
right: 0;
top: 0;
display: flex;
flex-direction: column;
align-items: flex-end;
gap: 8px;
opacity: 0;
transition: opacity 120ms ease-in-out;
}
.para-tools-row{
display: inline-flex;
gap: 6px;
flex-wrap: wrap;
justify-content: flex-end;
}
.reading p[id]:hover .para-tools,
.reading p[id]:focus-within .para-tools { opacity: 1; }
.para-anchor,
.para-propose,
.para-cite{
font-size: 12px;
border: 1px solid rgba(127,127,127,0.45);
border-radius: 999px;
padding: 2px 8px;
background: transparent;
}
.para-cite{ cursor: pointer; }
.para-bookmark{
font-size: 13px;
border: 1px solid rgba(127,127,127,0.65);
border-radius: 999px;
padding: 4px 12px;
background: transparent;
cursor: pointer;
}
.para-bookmark:hover{ text-decoration: underline; }
.build-stamp {
margin-top: 28px;
padding-top: 14px;
border-top: 1px solid rgba(127,127,127,0.25);
opacity: 0.85;
}
/* Accordéon */
.details-section {
border: 1px solid rgba(127,127,127,.25);
border-radius: 16px;
padding: 10px 12px;
margin: 14px 0;
}
.details-summary {
cursor: pointer;
font-weight: 650;
list-style: none;
}
.details-summary::-webkit-details-marker { display: none; }
.details-summary a { text-decoration: none; }
.details-summary a:hover { text-decoration: underline; }
.details-body { margin-top: 10px; }
/* Smooth scroll */
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
html{ scroll-behavior: auto; }
}
/* ==========================
Reading-follow (H1/H2/H3 only)
========================== */
.reading-follow{
position: fixed;
left: var(--reading-left);
width: var(--reading-width);
right: auto;
/* colle au header */
top: var(--sticky-header-h);
z-index: 60;
pointer-events: none;
opacity: 0;
transform: translateY(-6px);
transition: opacity 160ms ease, transform 160ms ease;
}
.reading-follow.is-on{
opacity: 1;
transform: translateY(0);
}
.reading-follow__inner{
pointer-events: auto;
width: 100%;
box-sizing: border-box;
padding: 8px 12px;
padding-right: 84px; /* réserve pour les boutons */
border: 1px solid rgba(127,127,127,.20);
border-top: 0;
border-radius: 0 0 14px 14px;
background: rgba(255,255,255,.86);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
box-shadow: 0 10px 22px rgba(0,0,0,.06);
position: relative; /* pour rf-actions */
}
@media (prefers-color-scheme: dark){
.reading-follow__inner{
background: rgba(0,0,0,.58);
box-shadow: 0 10px 22px rgba(0,0,0,.18);
}
}
.rf-line{
width: 100%;
text-align: left;
border: 0;
background: transparent;
padding: 0;
cursor: pointer;
margin: 0;
}
.rf-line[hidden]{ display: none !important; }
.rf-h1{
font-size: var(--rf-h1-size);
line-height: var(--rf-h1-lh);
font-weight: var(--rf-h1-fw);
}
.rf-h2{
font-size: var(--rf-h2-size);
line-height: var(--rf-h2-lh);
font-weight: var(--rf-h2-fw);
opacity: .96;
}
.rf-h3{
font-size: var(--rf-h3-size);
line-height: var(--rf-h3-lh);
font-weight: var(--rf-h3-fw);
opacity: .92;
}
.rf-line:hover{ text-decoration: underline; }
/* Actions */
.rf-actions{
position: absolute;
right: 10px;
bottom: 8px;
display: inline-flex;
gap: 6px;
}
.rf-btn{
display: inline-flex;
align-items: center;
justify-content: center;
width: 34px;
height: 30px;
border-radius: 10px;
border: 1px solid rgba(127,127,127,0.35);
background: rgba(127,127,127,0.10);
cursor: pointer;
transition: background 120ms ease, transform 120ms ease;
}
.rf-btn:hover{
background: rgba(127,127,127,0.16);
transform: translateY(-1px);
}