/* The case studies, after a designer friend's read of the site (Enguerran, 14 Nov 2026). Loaded after site.css and pd.css by the case
   studies that have been through the same review as the home page: Ogury One, iBanFirst and Criteo (one long page each), and Mogi
   (chapters in pages, which keeps the bar between its pages: section 4 below).
   1. A chapter bar under the header says where the reader is (js/case.js marks the chapter being read).
   2. The same type scale as the home page under the title: 40 / 28 / 22 / 18 / 16 / 14. Chapter titles 40, statements 22, text 18.
   3. Text is set on a shorter line (about 75 characters), and the long passages fold under "Read the detail": each chapter gives its
      statement and its demonstration first, the detail is the reader's choice. Nothing is removed from the page.
   The inside of the figures (the interactive mock-ups) is not touched: only their captions follow the scale. */

/* ---------------------------------------------------------------- 1. the chapter bar
   The site's .subnav (css/site.css), kept on one line: it scrolls sideways when the chapters do not fit. The chapter being read is bold
   with a 2 px rule, like the current page in the site menu; its bold width is reserved (data-t, set by js/case.js) so nothing shifts. */
.subnav.case-nav{flex-wrap:nowrap;align-items:center;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scrollbar-width:none;white-space:nowrap;font-size:14px;line-height:20px;gap:6px 22px;padding-top:11px;padding-bottom:12px} /* 47 px high: the --sub of css/site.css */
.subnav.case-nav::-webkit-scrollbar{display:none}
.subnav.case-nav > span{flex:none}
.subnav.case-nav .chap-nav{flex-wrap:nowrap;font-size:14px;gap:6px clamp(14px,1.4vw,20px)}
.subnav.case-nav .chap-nav li{flex:none}
.case-nav .chap-nav a{display:inline-flex;flex-direction:column;align-items:center}
.case-nav .chap-nav a[data-t]::before{content:attr(data-t);order:1;height:0;overflow:hidden;visibility:hidden;font-weight:700;pointer-events:none;-webkit-user-select:none;user-select:none}
.case-nav .chap-nav a[aria-current]{font-weight:700;background-size:100% 2px}
@media (max-width:1279px){.subnav.case-nav > span{display:none}} /* the name of the case gives way before the chapters have to scroll */
@media (max-width:700px){:root:has(.case-nav){scroll-padding-top:calc(var(--sub,0px) + 8px)}} /* phones: the bar is the only sticky strip, a chapter lands just under it */
@media print{.subnav.case-nav{display:none}}

/* ---------------------------------------------------------------- 2. the type scale */
.cs-head .kicker{font-size:14px}
.cs-head .sub{font-size:clamp(22px,2vw,28px);line-height:1.3}
.cs-head .facts dt{font-size:14px}
.cs-head .facts dd{font-size:16px}
.kit-h{font-size:14px}
.kit a{font-size:14px}
.glance-h,.glance-sub{font-size:14px}
.glance-cell h3{font-size:16px}
.glance-cell p{font-size:16px;line-height:1.55}
.glance-nums b{font-size:clamp(28px,2.8vw,40px)}
.glance-nums span{font-size:14px}
.sec > h2{font-size:clamp(30px,2.8vw,40px);line-height:1.05;letter-spacing:-.02em;text-wrap:balance}
.sec > h2 .act{font-size:14px;letter-spacing:.06em;margin-bottom:12px}
.sec .lead{font-size:clamp(19px,1.53vw,22px);line-height:1.45}
.sec > .body > h3{font-size:22px}
.fig > figcaption,.tray figcaption,.masonry figcaption,.pair figcaption,.gens figcaption,.gal figcaption,.phones figcaption{font-size:14px}
.sec .press h3,.press span{font-size:14px}
.dec dt{font-size:14px}
.dec dd{font-size:16px;line-height:1.55}
.deep > summary .deep-k{font-size:clamp(22px,2vw,28px)}
.deep > summary .deep-d{font-size:18px}
.end-cta p{font-size:18px}
.end-cta .end-mail{font-size:clamp(22px,2vw,28px)}
.next-chap small{font-size:14px}
.next-chap strong{font-size:clamp(28px,2.8vw,40px)}
@media (max-width:860px){.sec > h2{font-size:30px}.sec .lead{font-size:19px}}

/* ---------------------------------------------------------------- 3. a shorter line, and the detail on demand */
.sec .lead,.sec > .body > p:not(.lead),.more-b > p,.sec .notes li{max-width:34em}
.more{margin:0 0 1.5em}
.more > summary{display:inline-flex;align-items:baseline;gap:10px;cursor:pointer;list-style:none;font-size:16px;font-weight:600;color:var(--spot)}
.more > summary::-webkit-details-marker{display:none}
.more .more-t{text-decoration:underline;text-decoration-color:color-mix(in srgb,currentColor 38%,transparent);text-decoration-thickness:2px;text-underline-offset:4px}
.more .more-d{font-size:14px;font-weight:400;color:var(--ink-2)}
.more > summary::after{content:"";flex:none;align-self:center;width:7px;height:7px;margin-left:-2px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:translateY(-2px) rotate(45deg);transition:transform 200ms var(--ease-out)}
.more[open] > summary::after{transform:translateY(2px) rotate(-135deg)}
.more > summary:focus-visible{outline:2px solid var(--spot);outline-offset:4px;border-radius:4px}
.more[open] > summary{margin-bottom:16px}
.more-b > :last-child{margin-bottom:0}
.more[open]:has(+ p){margin-bottom:.9em} /* open, with the text going on below: the usual space between two paragraphs */
@media (hover:hover) and (pointer:fine){.more > summary:hover .more-t{text-decoration-color:currentColor}}
@media (max-width:860px),(pointer:coarse){.more > summary{padding-block:12px;margin-block:-12px}.more[open] > summary{margin-bottom:4px}}
@media (prefers-reduced-motion:reduce){.more > summary::after{transition:none}}
@media print{.more > summary{display:none}.more::details-content{content-visibility:visible;display:block}} /* on paper everything is unfolded (js/case.js opens them too) */

/* ---------------------------------------------------------------- 4. chapters in pages (Mogi): the same scale on the cover, the chapter
   heads and the manual's own blocks (rules, contents, message list, repositories). The phone mock-up and the diagrams keep their sizes. */
.subnav:not(.case-nav){font-size:14px;line-height:20px;padding-top:12px;padding-bottom:13px} /* the bar between the pages: same size and height (47 px) as the chapter bars */
.subnav:not(.case-nav) .chap-nav{font-size:14px}
.cover .kicker,.chap-head .kicker{font-size:14px}
.cover .sub,.chap-head .sub{font-size:clamp(22px,2vw,28px)}
.cover .intro{font-size:18px}
.cover .meta{font-size:14px}
.toc h3,.rules h3{font-size:22px}
.rules blockquote{font-size:16px}
.rules .lang{font-size:14px}
.gloss{font-size:16px}
.mlist .t{font-size:16px}
.mlist .w small{font-size:14px}
.repos :is(h3,h4){font-size:18px}
.repos :is(h3,h4) small{font-size:14px}
.table td .sub{font-size:14px}

/* ---------------------------------------------------------------- 5. iBanFirst, "Premiers pas": the audit, one fault per row
   Before, three whole captures stood above five notes: the reader had to carry a number from one to the other. Now each fault has its
   row: the fault and its fix in words, the detail of the capture that shows it, the same part of the corrected checklist. The text sits
   in the column of the section titles, the two pictures in the column of the text. Amber ring: where the fault is. Blue ring: its fix. */
.au{list-style:none;margin:0;padding:0;border-top:2px solid var(--ink)}
.au-row{display:grid;grid-template-columns:minmax(0,3fr) minmax(0,9fr);gap:20px 40px;align-items:start;padding:28px 0 32px;border-bottom:1px solid var(--rule)}
.au-txt{display:grid;grid-template-columns:28px minmax(0,1fr);gap:0 12px;align-content:start}
.au-n{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:var(--spot-fill);color:var(--on-spot);font-size:14px;font-weight:700;line-height:1}
.au-h{grid-column:2;margin:2px 0 0;max-width:none;font-size:18px;font-weight:700;line-height:1.35;text-wrap:balance}
.au-fix{grid-column:2;margin:12px 0 0;max-width:none;font-size:16px;line-height:1.5;color:var(--ink-2);text-wrap:pretty}
.au-fix b{display:block;font-size:14px;color:var(--ink)}
.au-pair{display:grid;grid-template-columns:minmax(0,369px) 24px minmax(0,369px);gap:18px 20px;align-items:start}
.au-pair::before{content:"\2192";grid-column:2;grid-row:1;align-self:center;justify-self:center;margin-top:26px;font-size:22px;line-height:1;color:var(--ink-2)}
.au-before{grid-column:1;grid-row:1;margin:0;min-width:0}
.au-after{grid-column:3;grid-row:1;min-width:0}
.au-lab{display:block;margin:0 0 8px;font-size:14px;font-weight:700;color:var(--ink-2)}
.au-shot{position:relative;border:2px solid var(--frame);border-radius:10px;overflow:hidden;background:#fff}
.au-shot img{display:block;width:100%;height:auto}
.au-mark{position:absolute;box-sizing:border-box;border:2.5px solid #FFC21A;border-radius:8px;box-shadow:0 0 0 1.5px #161616,inset 0 0 0 1px rgba(22,22,22,.55);pointer-events:none}
.au-mark.o{border-radius:50%}
.au-after .ob{border:2px solid var(--frame);border-radius:10px;box-shadow:none;padding:16px 16px 18px}
.au-after .hl{outline:2px solid var(--spot);outline-offset:3px;border-radius:7px}
.au-after .ob-t.hl{outline-offset:5px;border-radius:9px}
.au-after .ob-lock.hl{outline-offset:5px;border-radius:50%}
@media (max-width:860px){.au-row{grid-template-columns:1fr}}
@media (max-width:620px){
  .au-pair{grid-template-columns:minmax(0,1fr);gap:8px}
  .au-pair::before{content:"\2193";grid-column:1;grid-row:2;margin:6px 0 2px;justify-self:start;padding-left:12px}
  .au-before{max-width:369px}
  .au-after{grid-column:1;grid-row:3;max-width:369px}
}
@media print{.au-row{break-inside:avoid}}

/* ---------------------------------------------------------------- 9. the end of a case study or chapter: previous · all · next (Enguerran, 19/11/2026, proposal 4)
   It replaces the single « Next case study » link. In the order of the home page (Ogury One, iBanFirst, Criteo, Mogi), no loop:
   the first and the last show only the side that exists. Chapters: overview, previous and next chapter. Mogette (a side project) leads to its own list. */
.pager{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);grid-template-areas:"pv all nx";margin:72px 0 0;border-top:2px solid var(--ink);border-bottom:2px solid var(--ink)}
.end-cta + .pager{margin-top:40px}
.pager a{display:flex;flex-direction:column;justify-content:center;gap:4px;min-width:0;min-height:44px;padding:26px 0;color:var(--ink);text-decoration:none}
.pager .pv{grid-area:pv;padding-right:24px}
.pager .nx{grid-area:nx;align-items:flex-end;text-align:right;padding-left:24px}
.pager .all{grid-area:all;flex-direction:row;align-items:center;gap:10px;padding:0 28px;border-left:1px solid var(--rule);border-right:1px solid var(--rule);font-size:16px;font-weight:600;line-height:1.3}
.pager .all svg{flex:none;width:20px;height:20px;fill:currentColor}
.pager small{font-size:14px;color:var(--ink-2)}
.pager strong{font-size:clamp(28px,2.8vw,40px);letter-spacing:-.02em;line-height:1.05;overflow-wrap:anywhere}
.pager .pv strong::before{content:"\2190" / "";display:inline-block;margin-right:.3em}
.pager .nx strong::after{content:"\2192" / "";display:inline-block;margin-left:.3em}
.pager .pv:hover strong,.pager .nx:hover strong{text-decoration:underline;text-decoration-thickness:3px;text-underline-offset:6px}
.pager .all:hover{color:var(--spot)}
.pager .all:hover span{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:4px}
.pager a:focus-visible{outline:2px solid var(--spot);outline-offset:4px}
@media (prefers-reduced-motion:no-preference){
  .pager strong::before,.pager strong::after,.pager .all svg{transition:transform 260ms var(--ease-out,ease-out)}
  .pager .pv:hover strong::before{transform:translateX(-10px)}
  .pager .nx:hover strong::after{transform:translateX(10px)}
  .pager .all:hover svg{transform:scale(1.12)}
}
@media (max-width:700px){
  .pager{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-areas:"pv nx" "all all"}
  .pager a{padding:20px 0}
  .pager strong{font-size:24px}
  .pager .pv{padding-right:12px}
  .pager .nx{padding-left:12px}
  .pager .pv + .all + .nx{border-left:1px solid var(--rule)}
  .pager .all{justify-content:center;padding:14px 0;border:0;border-top:1px solid var(--rule)}
  .pager:not(:has(.pv)){grid-template-areas:"nx nx" "all all"}
  .pager:not(:has(.nx)){grid-template-areas:"pv pv" "all all"}
}
@media print{.pager,.backfloat{display:none}}

/* ---------------------------------------------------------------- 10. back to the list, when you scroll back up (proposal 5, built by js/case.js)
   Bottom left: « ← Case studies » and « ↑ » (back to top). Hidden near the top, while scrolling down, a few seconds after
   the scroll stops, and while the end bar (.pager) or the footer is in view, so it never sits on them. Ink on paper, 44 px targets. */
.backfloat{position:fixed;z-index:55;left:max(clamp(12px,2vw,28px),env(safe-area-inset-left));bottom:max(16px,calc(env(safe-area-inset-bottom) + 8px));display:flex;gap:8px;opacity:0;visibility:hidden;transform:translateY(12px);pointer-events:none}
.backfloat.on{opacity:1;visibility:visible;transform:none;pointer-events:auto}
.backfloat a,.backfloat button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 18px 0 14px;border:1.5px solid var(--ui-line);border-radius:999px;background:var(--paper);color:var(--ink);font:inherit;font-size:16px;font-weight:600;line-height:1;text-decoration:none;cursor:pointer;box-shadow:0 6px 24px rgba(22,22,22,.14),0 1px 3px rgba(22,22,22,.12)}
html[data-theme="dark"] .backfloat a,html[data-theme="dark"] .backfloat button{box-shadow:0 6px 24px rgba(4,6,12,.55)}
.backfloat button{width:44px;padding:0}
.backfloat svg{flex:none;width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.backfloat a:hover,.backfloat button:hover{background:var(--field)}
.backfloat a:focus-visible,.backfloat button:focus-visible{outline:2px solid var(--spot);outline-offset:3px}
@media (prefers-reduced-motion:no-preference){
  .backfloat{transition:opacity 200ms,transform 320ms var(--ease-out,ease-out),visibility 0s 320ms}
  .backfloat.on{transition:opacity 200ms,transform 320ms var(--ease-out,ease-out),visibility 0s}
  .backfloat svg{transition:transform 260ms var(--ease-out,ease-out)}
  .backfloat a:hover svg{transform:translateX(-3px)}
  .backfloat button:hover svg{transform:translateY(-3px)}
}
