/* TCHERNOBOULE — feuille commune. Noir, craie, photocopie. */

:root {
    --fg: #efefef;
    --dim: #9a9a9a;
    --faint: #4a4a4a;
    --red: #b0151c;
}

* { box-sizing: border-box; }
html { background: #000; }
body {
    margin: 0;
    min-height: 100vh;
    background: #000;
    color: var(--fg);
    font-family: 'Mansalva', cursive;
    font-size: 20px;
    line-height: 1.42;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: filter 0.3s;
}
::selection { background: var(--red); color: #fff; }
a { color: inherit; }

/* Grain de photocopie qui ne tient jamais en place */
.grain {
    position: fixed;
    inset: -30px;
    pointer-events: none;
    z-index: 50;
    opacity: 0.09;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: tcb-grain 0.25s steps(3) infinite;
}
@keyframes tcb-grain {
    0% { transform: translate(0, 0); }
    33% { transform: translate(-9px, 6px); }
    66% { transform: translate(7px, -8px); }
    100% { transform: translate(0, 0); }
}
.vignette {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 40;
    background: radial-gradient(ellipse at center, transparent 42%, rgba(0, 0, 0, 0.9) 100%);
}

/* Le poème : centré, serré, comme sur les images */
.poeme {
    position: relative;
    z-index: 10;
    max-width: 600px;
    margin: 0 auto;
    padding: 13vh 22px 16vh;
    text-align: center;
}
.poeme p { margin: 0; }
.poeme .s { height: 1.35em; }
.l { opacity: 0; animation: tcb-in 1s ease forwards; }
@keyframes tcb-in { to { opacity: 1; } }

/* Les mots-portes ne se signalent qu'au toucher */
a.p {
    display: inline-block;
    text-decoration: none;
    color: inherit;
    cursor: inherit;
    transition: color 0.4s;
}
a.p.flick {
    color: var(--red);
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.55);
    animation: tcb-jit 0.08s steps(2) 3;
}
@keyframes tcb-jit {
    0% { transform: translate(1px, -1px); }
    100% { transform: translate(-1px, 1px); }
}

.foot {
    position: relative;
    z-index: 10;
    text-align: center;
    color: var(--faint);
    font-size: 0.82rem;
    padding: 0 20px 40px;
}
.dim { color: var(--dim); }
.red { color: var(--red); }
.pixel { image-rendering: pixelated; image-rendering: crisp-edges; }

/* Collage */
.tcb-sigil {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    pointer-events: none;
}
.tcb-eye {
    position: fixed;
    z-index: 2;
    pointer-events: none;
    max-width: none;
    filter: grayscale(1) contrast(1.1);
    transition: transform 0.12s;
}

/* Apparitions */
.tcb-flash { position: fixed; inset: 0; z-index: 9999; pointer-events: none; }
.tcb-eyeflash {
    position: fixed;
    left: 50%;
    top: 50%;
    width: 140vmax;
    max-width: none;
    transform: translate(-50%, -50%);
    z-index: 9998;
    pointer-events: none;
    opacity: 0.5;
    mix-blend-mode: difference;
    filter: grayscale(1) contrast(1.6);
}
.tcb-sub {
    position: fixed;
    z-index: 9997;
    pointer-events: none;
    color: #1c1c1c;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    letter-spacing: 0.1em;
    text-shadow: 2px 0 #500, -2px 0 #002;
    white-space: nowrap;
}
.tcb-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
    padding: 20px;
}
.tcb-nom { background: #000; color: var(--red); font-size: 14vw; }
.tcb-maman { align-items: flex-end; padding-bottom: 9vh; color: var(--dim); font-size: 1.1rem; }
.tcb-cri { background: #000; color: var(--red); font-size: clamp(2rem, 8vw, 5rem); }

body.tcb-dors { filter: blur(6px) brightness(0.5); transition: filter 2.5s; }
body.tcb-leaving { opacity: 0; transition: opacity 0.22s; }

@media (max-width: 600px) {
    body { font-size: 17.5px; }
    .poeme { padding-top: 9vh; }
}

.tcb-moisi { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 41; pointer-events: none; opacity: 0.88; }

/* ==================================================================== DA du site : l'intérieur du Groupuscule */
:root { --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif; --mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace; --line: #1b1b1b; --texte: #cfccc5; --tete: 54px; --fg: #e7e4dd; --dim: #8a8885; }
html, body { background: #050505; }
body { font-family: var(--sans); font-size: 16px; line-height: 1.6; }
.grain { opacity: 0.05; }
.meta { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; color: var(--dim); text-transform: uppercase; }
.rouge { color: var(--red); }
.ecrit { font-family: 'Mansalva', cursive; }

.site-tete { position: sticky; top: 0; z-index: 46; background: rgba(5, 5, 5, 0.94); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); text-align: left; font-family: var(--sans); }
.site-barre { max-width: 1340px; margin: 0 auto; padding: 0 22px; height: var(--tete); display: flex; align-items: center; gap: 24px; }
.site-logo { display: flex; align-items: center; gap: 10px; color: var(--fg); font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; }
.site-logo svg { width: 19px; height: 19px; color: #8d8d8d; flex: none; }
.site-nav { display: flex; gap: 16px; flex: 1; }
.site-nav a { color: var(--dim); font-size: 13px; text-decoration: none; white-space: nowrap; padding: 4px 0; }
.site-nav a:hover, .site-nav a.ici { color: var(--fg); }
.site-nav a.ici { box-shadow: inset 0 -1px 0 var(--red); }
.site-statut { font-family: var(--mono); font-size: 11px; color: var(--dim); white-space: nowrap; }
.site-statut.inconnu { color: var(--red); }
.site-menu { display: none; background: none; border: 1px solid #2a2a2a; color: var(--fg); font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; padding: 6px 11px; cursor: pointer; }
.site-tiroir { display: none; max-width: 1240px; margin: 0 auto; padding: 8px 22px 22px; grid-template-columns: repeat(4, 1fr); gap: 20px; border-top: 1px solid var(--line); }
.site-tiroir a { display: block; color: var(--texte); padding: 4px 0; text-decoration: none; font-size: 15px; }
.site-tiroir .meta { margin: 12px 0 4px; }
.site-tete.ouvert .site-tiroir { display: grid; }
@media (max-width: 1080px) { .site-nav { display: none; } .site-menu { display: inline-block; } .site-barre { justify-content: space-between; } }
.site-tiroir { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 700px) { .site-tiroir { grid-template-columns: 1fr 1fr; } }
body { --haut: var(--tete); }
body.a-onglets { --haut: calc(var(--tete) + 39px); }
.site-onglets { border-top: 1px solid var(--line); }
.site-onglets .dedans { max-width: 1340px; margin: 0 auto; padding: 0 22px; height: 38px; display: flex; align-items: center; gap: 22px; overflow-x: auto; scrollbar-width: none; }
.site-onglets .meta { color: #5a5a5a; margin-right: 6px; white-space: nowrap; }
.site-onglets a { color: var(--dim); font-size: 13px; text-decoration: none; white-space: nowrap; padding: 10px 0; }
.site-onglets a:hover { color: var(--fg); }
.site-onglets a.ici { color: var(--fg); box-shadow: inset 0 -1px 0 var(--red); }
@media (max-width: 520px) { .site-statut { display: none; } }

.site-pied { position: relative; z-index: 10; border-top: 1px solid var(--line); padding: 30px 0 22px; margin-top: 28px; text-align: left; font-family: var(--sans); background: #050505; }
.pied-grille { display: grid; grid-template-columns: 1.6fr repeat(6, 1fr); gap: 26px; }
@media (max-width: 1180px) { .pied-grille { grid-template-columns: repeat(3, 1fr); } .pied-grille > div:first-child { grid-column: 1 / -1; } }
@media (max-width: 640px) { .pied-grille { grid-template-columns: 1fr 1fr; } }
.pied-grille a { display: block; color: var(--texte); text-decoration: none; font-size: 14px; padding: 3px 0; }
.pied-grille a:hover { color: #fff; }
.pied-grille a.site-logo { display: flex; }
.pied-grille p { color: var(--dim); font-size: 13.5px; margin: 10px 0 0; }
.pied-grille .meta { font-size: 11px; margin-bottom: 8px; }
.pied-bas { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: #555; font-size: 12.5px; }
.connectes::before { content: '● '; color: #3c7a3a; }

.cadre { max-width: 1240px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 10; text-align: left; }
.etroit { max-width: 780px; }
.page-tete { position: relative; z-index: 10; padding: 30px 0 24px; border-bottom: 1px solid var(--line); }
.page-tete h1 { font-weight: 400; font-size: clamp(1.5rem, 2.4vw, 1.9rem); letter-spacing: -0.005em; line-height: 1.2; margin: 6px 0 10px; }
.chapo { font-size: 0.96rem; color: #a8a59e; max-width: 760px; margin: 0; }
.bloc { position: relative; z-index: 10; border-top: 1px solid var(--line); padding: 36px 0; }
.bloc h2 { font-weight: 500; font-size: 1.18rem; letter-spacing: 0; line-height: 1.3; margin: 6px 0 16px; }
.prose p { color: var(--texte); max-width: 700px; margin: 0 0 1.05em; }
.prose h3 { font-weight: 600; font-size: 1.05rem; margin: 2em 0 0.5em; color: var(--fg); }
.prose ul { color: var(--texte); max-width: 700px; padding-left: 1.2em; }
.prose li { margin: 0 0 0.45em; }
.lien { color: var(--fg); border-bottom: 1px solid var(--red); padding-bottom: 2px; text-decoration: none; }
.lien:hover { color: #fff; }
.formule { font-family: 'STIX Two Text', 'Cambria Math', Georgia, serif; font-style: italic; font-size: 1.42rem; color: #ece6d6; margin: 0.9em 0 0.15em !important; letter-spacing: 0.02em; }
.glose { color: var(--dim) !important; font-size: 0.95rem; }
.grille { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.g2 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }
.carte { background: #070707; padding: 18px 18px; display: block; color: var(--fg); text-decoration: none; }
.carte h3 { font-weight: 600; font-size: 1.04rem; margin: 8px 0 8px; }
.carte p { color: var(--texte); font-size: 0.95rem; margin: 0 0 0.6em; }
a.carte:hover h3::after { content: ' ∗'; color: var(--red); }
table.tab { width: 100%; border-collapse: collapse; }
.tab td, .tab th { padding: 8px 12px 8px 0; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.tab th { font-family: var(--mono); font-weight: normal; font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.06em; }
.tab td { color: var(--texte); font-size: 0.92rem; }
.tab td.d { font-family: var(--mono); font-size: 13px; white-space: nowrap; color: var(--fg); }
.tab tr.proche td.d, .tab tr.proche td:first-child { color: var(--red); }
@media (max-width: 700px) { .tab .opt { display: none; } }
.encadre { border: 1px solid #262626; padding: 16px 18px; max-width: 700px; color: var(--texte); margin: 1.4em 0; }
.cote { display: grid; grid-template-columns: 210px 1fr; gap: 60px; align-items: start; }
.sommaire { position: sticky; top: calc(var(--haut) + 28px); }
.sommaire a { display: block; color: var(--dim); font-size: 13.5px; padding: 5px 0 5px 12px; text-decoration: none; border-left: 1px solid var(--line); }
.sommaire a:hover { color: var(--fg); border-color: var(--red); }
@media (max-width: 900px) { .cote { grid-template-columns: 1fr; gap: 20px; } .sommaire { position: static; display: flex; flex-wrap: wrap; gap: 4px 14px; } .sommaire a { border: 0; padding: 2px 0; } }
.par { padding: 28px 0; border-top: 1px solid var(--line); }
.par:first-child { border-top: 0; padding-top: 0; }
.par > .meta { color: var(--red); }
.par h3 { font-weight: 500; font-size: 1.15rem; letter-spacing: 0; margin: 6px 0 12px; color: var(--fg); }
.illu-cadre { border: 1px solid #222; background: #0a0a0a; padding: 14px; margin: 22px 0; max-width: 480px; }
.illu-cadre canvas { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.illu-cadre .meta { margin-top: 10px; display: block; }
.citation { font-family: 'Mansalva', cursive; font-size: 1.25rem; color: var(--fg); }

a.verrou .cad { width: 11px; height: 11px; vertical-align: -1px; margin-right: 5px; }
a.verrou.ferme { color: #4e4e4e !important; cursor: not-allowed; }
a.verrou.ferme .cad { color: #6a6a6a; }
a.verrou.ouvert .cad { color: var(--red); }
.tcb-toast { position: fixed; top: calc(var(--haut) + 12px); right: 18px; z-index: 47; max-width: 360px; background: #0b0b0b; border: 1px solid #2a2a2a; border-left: 2px solid var(--red); padding: 13px 16px; font-family: var(--sans); font-size: 14px; line-height: 1.5; color: var(--texte); text-align: left; opacity: 0; transform: translateY(-6px); transition: opacity 0.25s, transform 0.25s; pointer-events: none; }
.tcb-toast.on { opacity: 1; transform: none; pointer-events: auto; }
.tcb-toast b { color: var(--fg); font-weight: 600; }
.tcb-toast a { color: var(--fg); }

