/* =====================================================================
   registre.css · hubbleresearchlab.com/registre.html · concept « Le registre » (fusion, lot L3)
   Written as an EXTENSION of sites/_shared/styles.css, to be appended to it
   later under a "§ Registre" heading. Every rule is scoped to .registre or to
   one of the two classes the driver sets on <html> (.reg-on = pinned frame,
   .reg-flux = natural flow with a fixed mark), so it is a no-op on any other page.
   No new token, no shadow, no blur, no filter, no blend mode. Flat paper, 1 px rules.
   Default (no JS, or reduced motion) = the stacked page, everything visible.
   ===================================================================== */

/* ---- Shared-file traps, reset on this page ------------------------- */
.site-head--net{background:var(--papier);backdrop-filter:none;-webkit-backdrop-filter:none}
.tag--gris{color:var(--graphite)}

/* ---- Units of the form --------------------------------------------- */
.registre{
  --head: calc(4.4rem + 1px);           /* header strip + its 1 px rule */
  --g: 1.4rem;                          /* grid gutter (the panels gap at 1440) */
  --pas: 2.25rem;                       /* one ruled line; every height is a multiple */
  --colw: calc((100vw - 2 * var(--pad) - 11 * var(--g)) / 12);
  --col-x: calc(var(--pad) + var(--colw) + var(--g) / 2);      /* the running column */
  --x1: calc(var(--pad) + var(--colw) + var(--g));             /* date column */
  --w1: var(--colw);
  --x2: calc(var(--pad) + 2 * (var(--colw) + var(--g)));       /* designation, cols 3-9 */
  --w2: calc(7 * var(--colw) + 6 * var(--g));
  --x3: calc(var(--pad) + 9 * (var(--colw) + var(--g)));       /* mention, cols 10-12 */
  --w3: calc(3 * var(--colw) + 2 * var(--g));
  --x7: calc(var(--pad) + 6 * (var(--colw) + var(--g)));       /* col 7, the closing words */
  --fs-d: calc(var(--pas) * 1.9556);    /* 70.4 px on a 36 px pas */
  --R: 60vw;                            /* radius of the plate's disc */
  --cy: 50%;
  counter-reset: row stated;
  padding: 0;
  position: relative;
}
@media (min-width: 900px) and (min-height: 560px){
  .registre{ --pas: min(2.25rem, calc((100vh - var(--head)) / 23)); }
}

.registre .reg-cadre{position:relative}
.registre .reg-bureau{display:none}
.registre .reg-feuille{position:relative;padding-top:calc(7 * var(--pas));padding-bottom:calc(3 * var(--pas));background:var(--papier)}
.registre .reg-lignes{list-style:none;margin:0;padding:0;position:relative;z-index:1}

/* ---- Rows and lines ------------------------------------------------ */
.registre .r{position:relative;counter-increment:row}
.registre .r[data-r="ecrit"]{counter-increment:row stated}
.registre .r--planche{counter-increment:none}
.registre .r[data-r]::before{
  content:counter(row, decimal-leading-zero);
  position:absolute;left:0;bottom:var(--nb,11px);width:calc(var(--col-x) - 2.2rem);text-align:right;
  font:400 .72rem/1 var(--font-mono);color:var(--graphite);z-index:3;
}
.registre .r:has(.ln--rl)::before{--nb:12px}
.registre .r:has(> .ln--d:last-child)::before,
.registre .r:has(> .ln--phrase:last-child)::before{--nb:15px}

.registre .ln{
  display:grid;grid-template-columns:repeat(12,minmax(0,1fr));column-gap:var(--g);
  padding-inline:var(--pad);height:calc(var(--h,1) * var(--pas));position:relative;margin:0;max-width:none;
}
.registre .ln > *{margin:0;max-width:none;min-width:0;position:relative;z-index:1}
.registre .ln--d{--h:2}
.registre .ln--mono{--h:1}
.registre .ln--mq{--h:6}
.registre .ln--attente{--h:8}
.registre .d{grid-column:3 / 10}
.registre .dt{grid-column:2 / 3}
.registre .m{grid-column:10 / 13;display:flex;align-items:flex-end;gap:.9em}

/* type: very large serif, very small mono, one 24 px line between them */
.registre h1.reg-marque{font:inherit;margin:0;letter-spacing:0;text-wrap:nowrap;color:var(--encre)}
.registre .reg-marque .ln--mq .d{font-family:var(--font-display);font-weight:400;font-size:min(calc(6 * var(--pas)), 15vw);line-height:calc(6 * var(--pas));letter-spacing:-0.012em;white-space:nowrap}
.registre .reg-rl{font-family:var(--font-sans);font-weight:600;font-size:.95rem;line-height:var(--pas);letter-spacing:.34em;text-transform:uppercase;color:var(--graphite);white-space:nowrap}
.registre .reg-acces{font-family:var(--font-body);font-size:calc(var(--pas) * 0.6667);line-height:var(--pas);color:var(--encre)}
.registre .dsg{font-family:var(--font-display);font-weight:400;font-size:var(--fs-phrase, var(--fs-d));line-height:calc(2 * var(--pas));letter-spacing:-0.008em;color:var(--encre);text-wrap:wrap}
.registre .mono{font-family:var(--font-mono);font-size:.82rem;line-height:var(--pas);color:var(--encre);white-space:nowrap}
.registre .m a{color:var(--encre)}
.registre .m a .wi{border-bottom:1px solid var(--rule);line-height:1.35}
.registre .m a:hover .wi{border-bottom-color:var(--encre)}

/* the ruling of the form: one hairline at the foot of every pas, three segments */
.registre .ln--blanc,.registre .ln--attente,.registre .rg-i{
  background:
    linear-gradient(to top, var(--rule) 1px, transparent 1px) var(--x1) 0 / var(--w1) var(--pas) repeat-y,
    linear-gradient(to top, var(--rule) 1px, transparent 1px) var(--x2) 0 / var(--w2) var(--pas) repeat-y,
    linear-gradient(to top, var(--rule) 1px, transparent 1px) var(--x3) 0 / var(--w3) var(--pas) repeat-y;
}
.registre .rg{display:none}

/* closed cell: a 1 px stroke across the cell, a 7 px tick at its right end */
.registre .trait{position:relative;display:block;flex:1 1 auto;min-width:2rem;height:7px;margin-bottom:calc(0.5 * var(--pas) - 3px)}
.registre .trait i{position:absolute;left:0;right:0;top:3px;height:1px;background:var(--encre);transform:scaleX(var(--wt,1));transform-origin:0 50%}
.registre .trait::after{content:"";position:absolute;right:0;top:0;width:1px;height:7px;background:var(--encre);opacity:var(--tk,1)}

/* row 03 before it is split into lines (stacked page: natural wrap) */
.registre .ln--phrase{height:auto;grid-template-rows:auto 1fr}
.registre .ln--phrase .d{grid-row:1 / 3}
.registre .ln--phrase .m--source{grid-row:1;height:calc(2 * var(--pas))}
.registre .ln--phrase .m--trait{grid-row:2;align-self:end;height:calc(2 * var(--pas))}

/* writing: a cell is revealed from its top-left corner by two opposite translations */
.registre .ecr{--wx:var(--w,1);--wy:var(--w,1);display:block}
.registre .ecr > .w,.registre .ecr > .w > .wi{display:block}

/* ---- The running column -------------------------------------------- */
/* z 0: under the rows' layer (z 1), so the plate (a row) covers it and carries its own teal-ink column */
.registre .reg-col{position:absolute;top:0;bottom:0;left:var(--col-x);width:1px;margin-left:-.5px;background:var(--rule);z-index:0;transform:scaleX(var(--cs,1))}
.registre .reg-encre{display:none}

/* ---- The plate (hors-texte) ---------------------------------------- */
.registre .reg-planche{position:relative;margin:66px 0 0;height:100vh;z-index:3}
.registre .reg-planche::before{content:"";position:absolute;left:0;right:0;top:-65px;height:66px;background:radial-gradient(var(--teal) 30%,transparent 33%) 0 0/10px 10px}
.registre .pl-fond{position:absolute;inset:0;background:var(--teal);overflow:hidden}
.registre .pl-disque{position:absolute;width:calc(2 * var(--R));height:calc(2 * var(--R));left:calc(var(--col-x) - var(--R));top:calc(var(--cy) - var(--R));border-radius:50%;overflow:hidden;transform:rotate(var(--rot,0deg))}
.registre .pl-img{position:absolute;max-width:none;width:calc(var(--R) * 2.0833);height:auto;left:calc(var(--R) * -0.05);top:calc(var(--R) * -0.06875)}
.registre .pl-trame{position:absolute;inset:0;width:100%;height:100%;display:block}
.trame-ok .pl-img{visibility:hidden}
.registre .pl-col{position:absolute;top:0;bottom:0;left:var(--col-x);width:1px;margin-left:-.5px;background:var(--teal-ink)}
.registre .pl-legende{position:absolute;left:var(--x3);width:var(--w3);bottom:30%;margin:0;color:var(--teal-ink);font-size:.66rem;line-height:1.6;white-space:normal;letter-spacing:.02em}
.registre .pl-angle{position:absolute;left:0;top:100%;margin-top:.5rem;display:block}

/* ---- Stage 4, the closing ------------------------------------------ */
.registre .reg-reglure2,.registre .reg-biffe{position:absolute;top:0;height:calc(var(--n-blancs, 13) * var(--pas));pointer-events:none}
.registre .reg-reglure2{display:none}
.registre .reg-biffe{left:var(--col-x);right:0;z-index:2;overflow:hidden}
.registre .reg-biffe .w,.registre .reg-biffe .wi{display:block;width:100%;height:100%}
.registre .reg-biffe svg{display:block;width:100%;height:100%}
.registre .reg-biffe line{stroke:var(--encre);stroke-width:1}

.registre .reg-arrete{position:relative;height:calc(6 * var(--pas));margin-top:calc(2 * var(--pas));z-index:2;--xr:var(--col-x)}
.registre .ar-mots{position:absolute;left:var(--x7);top:0;margin:0;font-size:var(--fs-d);line-height:calc(2 * var(--pas));max-width:none}
.registre .ar-l{height:calc(2 * var(--pas));white-space:nowrap}
.registre .ar-regle{position:absolute;top:calc(4 * var(--pas));left:var(--xr);right:var(--pad);height:1px;background:var(--encre);transform:scaleX(var(--wr,1));transform-origin:0 50%}
.registre .ar-bas{position:absolute;top:calc(4 * var(--pas) + 1px);left:0;right:0;margin:0;height:var(--pas)}
.registre .ar-date{position:absolute;left:var(--x1);top:0}
.registre .ar-compte{position:absolute;left:var(--x7);top:0}
.registre .cpt::before{content:counter(stated) " / " counter(row)}
.registre .reg-sceau{left:calc(100% - var(--pad) - 115px);top:calc(4 * var(--pas) - 47px);right:auto;bottom:auto;opacity:1;transform:rotate(-4deg)}

/* ---- The counter (hidden on the stacked page) ---------------------- */
.reg-compteur{display:none}
.reg-compteur .cd{display:block;width:.6em;height:20px;overflow:hidden}
.reg-compteur .cd i{display:block;font-style:normal;line-height:20px;transform:translateY(calc(var(--d,0) * -20px));transition:transform var(--fast) var(--ease)}

/* =====================================================================
   .reg-on : the pinned frame (desktop, fine pointer, >= 900 x 560)
   ===================================================================== */
.reg-on .registre{height:calc(100vh - var(--head) + 718vh)}
.reg-on .reg-cadre{position:sticky;top:var(--head);height:calc(100vh - var(--head));overflow:hidden;background:var(--papier)}
.reg-on .reg-bureau{display:block;position:absolute;inset:0;background:var(--papier-2);opacity:var(--o4,0);z-index:0}
.reg-on .reg-feuille{position:absolute;left:0;top:0;width:100%;z-index:1;transform-origin:var(--col-x) calc(15 * var(--pas))}
.reg-on .reg-feuille::after{content:"";position:absolute;inset:0;border:3px solid var(--rule);opacity:var(--o4,0);pointer-events:none;z-index:4}
.reg-on .ln--attente{display:none}
.reg-on .ln--phrase{visibility:hidden}
.reg-on .r[data-r]::before,.reg-flux .r[data-r]::before{opacity:0;transition:opacity var(--fast) var(--ease)}
.reg-on .r.vu::before,.reg-flux .r.vu::before{opacity:1}
.reg-on .r--blanc::before,.reg-flux .r--blanc::before{display:none}

.reg-on .rg,.reg-flux .rg{display:block;position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:0}
/* the mover clips, the inner moves back: only [0, w] of the inner stays visible */
.reg-on .rg-m,.reg-flux .rg-m{display:block;height:100%;overflow:hidden;transform:translateY(calc(var(--w,0) * 100%))}
.reg-on .rg-i,.reg-flux .rg-i{display:block;height:100%;transform:translateY(calc(var(--w,0) * -100%))}
.reg-on .ecr > .w,.reg-flux .ecr > .w{width:max-content;max-width:100%;height:100%;overflow:hidden;transform:translate(calc((var(--wx) - 1) * 100%), calc((var(--wy) - 1) * 100%))}
.reg-on .ecr.plein > .w,.reg-flux .ecr.plein > .w{overflow:visible}
.reg-on .ecr > .w > .wi,.reg-flux .ecr > .w > .wi{height:100%;transform:translate(calc((1 - var(--wx)) * 100%), calc((1 - var(--wy)) * 100%))}
.reg-on .reg-biffe .w,.reg-flux .reg-biffe .w{overflow:hidden;transform:translate(calc((var(--wx,1) - 1) * 100%), calc((var(--wy,1) - 1) * 100%))}
.reg-on .reg-biffe .wi,.reg-flux .reg-biffe .wi{transform:translate(calc((1 - var(--wx,1)) * 100%), calc((1 - var(--wy,1)) * 100%))}
.reg-on .reg-biffe line{stroke-width:3}

.reg-on .reg-encre,.reg-flux .reg-encre{display:block;position:absolute;left:0;top:0;width:1px;height:1px;background:var(--encre);transform-origin:0 0;z-index:0}

.reg-on .reg-reglure2{display:block;left:0;right:0;z-index:1;opacity:var(--o4b,0);
  background:
    linear-gradient(to top, var(--rule) 3px, transparent 3px) var(--x1) 0 / var(--w1) var(--pas) repeat-y,
    linear-gradient(to top, var(--rule) 3px, transparent 3px) var(--x2) 0 / var(--w2) var(--pas) repeat-y,
    linear-gradient(to top, var(--rule) 3px, transparent 3px) var(--x3) 0 / var(--w3) var(--pas) repeat-y}

.reg-on .r--planche{height:0}
.reg-on .reg-planche{position:absolute;inset:0;margin:0;height:auto;z-index:3;--cy:calc(14.5 * var(--pas));transform:translate3d(0,var(--py,120%),0)}
.reg-on .pl-legende{bottom:calc(100% - 15 * var(--pas))}

.reg-on .reg-arrete{position:absolute;left:0;right:0;top:calc(100% - 98px - 4 * var(--pas));margin:0;height:calc(5 * var(--pas))}
.reg-on .reg-sceau{opacity:0;transform:scale(1.5) rotate(-12deg);transition:opacity var(--seal) var(--ease),transform var(--seal) var(--ease)}
.reg-on .reg-sceau.on{opacity:1;transform:scale(1) rotate(-4deg)}

.reg-on .reg-compteur{display:flex;position:absolute;z-index:6;left:calc(var(--col-x) - 14px);top:calc(14.5 * var(--pas) - 10px);
  width:28px;height:20px;box-sizing:border-box;border:1px solid var(--encre);border-radius:2px;background:var(--papier);
  justify-content:center;align-items:center;overflow:hidden;font:400 .72rem/20px var(--font-mono);color:var(--encre)}

/* =====================================================================
   .reg-flux : natural flow, fixed mark (phones, coarse pointer, small windows)
   ===================================================================== */
.reg-flux .reg-feuille{padding-top:calc(8 * var(--pas))}
.reg-flux .ln--attente{display:none}
.reg-flux .ln--phrase{visibility:hidden}
.reg-flux .reg-col{position:fixed;top:0;bottom:auto;height:100vh;transform-origin:50% 0;transform:scaleY(var(--cb,1))}
.reg-flux .reg-compteur.fini{opacity:0}
/* the shared sheet forces .seal2 visible under 900 px (styles.css:237, !important); here it waits for its rule */
.reg-flux .reg-sceau{transition:opacity var(--seal) var(--ease)}
.reg-flux .reg-sceau:not(.on){opacity:0!important}
.reg-flux .reg-encre{position:fixed}
.reg-flux .r--planche{height:220svh}
.reg-flux .reg-planche{position:sticky;top:0;height:100svh;margin-top:0;--cy:calc(var(--head) + 12.5 * var(--pas))}
.reg-flux .reg-planche::before{display:none}
.reg-flux .reg-compteur{display:flex;position:fixed;z-index:6;left:calc(var(--col-x) - 14px);top:calc(var(--head) + 12.5 * var(--pas) - 10px);
  width:28px;height:20px;box-sizing:border-box;border:1px solid var(--encre);border-radius:2px;background:var(--papier);
  justify-content:center;align-items:center;overflow:hidden;font:400 .72rem/20px var(--font-mono);color:var(--encre)}

/* ---- 900 to 1279 px: twelve columns are too narrow for an ISO date and a mono mention.
   The date column gets a fixed width, the designation takes cols 3-8, the mention cols 9-12,
   the large serif steps down; the ruling segments follow the same grid. ---------------- */
@media (min-width: 900px) and (max-width: 1279px){
  .registre{
    --c2: 5.6rem;
    --colw: calc((100vw - 2 * var(--pad) - 11 * var(--g) - var(--c2)) / 11);
    --x1: calc(var(--pad) + var(--colw) + var(--g));
    --w1: var(--c2);
    --x2: calc(var(--x1) + var(--c2) + var(--g));
    --w2: calc(6 * var(--colw) + 5 * var(--g));
    --x3: calc(var(--x2) + 6 * (var(--colw) + var(--g)));
    --w3: calc(4 * var(--colw) + 3 * var(--g));
    --x7: calc(var(--x2) + 4 * (var(--colw) + var(--g)));
    --fs-d: calc(var(--pas) * 1.5);
  }
  .registre .ln{grid-template-columns:minmax(0,1fr) var(--c2) repeat(10,minmax(0,1fr))}
  .registre .d{grid-column:3 / 9}
  .registre .m{grid-column:9 / 13}
  .registre .m .mono{font-size:.76rem}
  .registre .pl-legende{left:calc(var(--col-x) + var(--R) + var(--g));right:var(--pad);width:auto}
}

/* ---- About 400 px: one text column, the column at 48 px ------------ */
@media (max-width: 899px){
  .registre{--col-x:48px;--R:88vw;--fs-d:calc(var(--pas) * 0.98)}
  .registre .ln{grid-template-columns:minmax(0,1fr);column-gap:0;padding-left:68px;padding-right:20px}
  .registre .d,.registre .dt,.registre .m{grid-column:1 / -1}
  .registre .ln--d{--h:1}
  .registre .ln--m{--h:2;grid-template-rows:var(--pas) var(--pas)}
  .registre .ln--m .dt{grid-row:1}
  .registre .ln--m .dt + .d{grid-row:2}
  .registre .ln--m .d{grid-row:1}
  .registre .ln--m .m{grid-row:2}
  .registre .ln--mq{--h:3}
  .registre .ln--attente{--h:9}
  .registre .reg-feuille{padding-top:calc(8 * var(--pas))}
  .registre .reg-marque .ln--mq .d{font-size:calc((100vw - 80px) / 3.44);line-height:calc(3 * var(--pas))}
  .registre .reg-rl{font-size:.7rem}
  .registre .reg-acces{font-size:1.1875rem}
  .registre .dsg{line-height:var(--pas)}
  /* a name holds on one ruled line: « Modèles du monde » measures about 8.9 em */
  .registre .ln--m .dsg{white-space:nowrap;font-size:min(var(--fs-d), calc((100vw - 88px) / 9.2))}
  .registre .r[data-r]::before{width:30px;font-size:.6rem;--nb:13px}
  .registre .r:has(> .ln--d:last-child)::before,.registre .r:has(> .ln--phrase:last-child)::before{--nb:12px}
  .registre .ln--blanc,.registre .ln--attente,.registre .rg-i{
    background:linear-gradient(to top, var(--rule) 1px, transparent 1px) 68px 0 / calc(100% - 88px) var(--pas) repeat-y}
  .registre .ln--phrase .m--source,.registre .ln--phrase .m--trait{grid-row:auto;height:var(--pas)}
  .registre .ln--phrase .d{grid-row:auto}
  .registre .ln--phrase{grid-template-rows:none}
  .registre .trait{margin-bottom:calc(0.5 * var(--pas) - 3px)}
  .registre .pl-legende{left:68px;right:20px;width:auto;top:100px;bottom:auto}
  .registre .reg-biffe{right:20px}
  .registre .reg-arrete{height:calc(5 * var(--pas))}
  .registre .ar-mots{left:68px;line-height:var(--pas)}
  .registre .ar-l{height:var(--pas)}
  .registre .ar-regle,.registre .ar-bas{top:calc(2 * var(--pas))}
  .registre .ar-regle{right:20px}
  .registre .ar-date{left:68px}
  .registre .ar-compte{left:176px}
  .registre .ar-bas{top:calc(2 * var(--pas) + 1px)}
  .registre .reg-sceau{width:72px;height:72px;left:auto;right:14px;top:calc(2 * var(--pas) - 36px)}
}

/* the stacked page (no script, or reduced motion): the diagonal stops at the ruling, as in the flow */
html:not(.reg-on):not(.reg-flux) .registre .reg-biffe{right:var(--pad)}

/* under 400 px the brand and the label wrap to two lines: keep each on one */
@media (max-width: 399px){
  .site-head--net .wrap{gap:.75rem}
  .site-head--net .brand .rl,.site-head--net .tag{white-space:nowrap}
  .site-head--net .brand .rl{letter-spacing:.14em}
  .site-head--net .tag{letter-spacing:.08em;padding-inline:.45rem}
}

@media (prefers-reduced-motion: reduce){
  .registre .reg-sceau,.reg-compteur .cd i{transition:none}
}
