/* Portunus, the dress of the whole site: the style of the approved home (regard/accueil-3/index.html, 2026-12-03),
   as it is. Only the addresses of the fonts changed (they are served from /fonts/).
   The inner pages add their own parts in pages.css; the water of the first screen is in eau.css. */
@font-face { font-family: "Instrument Serif"; src: url("/fonts/InstrumentSerif-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/fonts/InstrumentSans-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/fonts/InstrumentSans-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  /* the dress: two colours, nothing else; the three below them are mixtures of the two */
  --pale: #dadfd8;
  --deep: #1e3128;
  --paper: var(--pale);
  --ink: var(--deep);
  --ink-soft: #445450;                                  /* the plain lines under a sentence: the ink, let down with a fifth of paper */
  --rule: #adb5ae;                                      /* a hairline: a quarter of ink in the paper */
  --plate: #cbd1ca;                                     /* the sheet a drawing lies on: the paper with eight parts of ink in a hundred */

  /* letters */
  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --size-first: clamp(2.5rem, 5.2vw, 4.5rem);           /* the first sentence and the last: 71 px on a 1366 window, 40 px on a phone */
  --size-part: clamp(2.375rem, 4.7vw, 4rem);            /* the sentence of a part: 64 px, 38 px on a phone */
  --size-lines: 1.25rem;                                /* the plain lines under it: 20 px */
  --size-fact: 0.9375rem;                               /* a small fact: 15 px */
  --size-small: 0.875rem;                               /* links, button, the line under the first sentence: 14 px */
  --size-foot: 0.8125rem;                               /* the foot: 13 px */

  /* the scale of spaces: every gap on the page is one of these */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;

  /* measures */
  --wide: 1180px;                                       /* the widest the parts get */
  --edge: 36px;                                         /* left and right margin of the page */
  --top: 80px;                                          /* height of the top band; the small mark sits on its middle */
  --mark: 26px;                                         /* height of the small mark; with --top it leaves a whole number of pixels above it,
                                                           so the drawn mark and this one land on the same pixels at the hand-over */
  --round: 6px;                                         /* the one rounded corner: the button, the sheets */
  --unit: 1.9px;                                        /* one unit of a drawing: its two lines are then a little under two pixels each */
  --plate-tall: 420px;                                  /* height of the sheet a drawing lies on, the same for every part */
  --unit-sign: 1.364px;                                 /* one unit of a small sign: its 44 units are 60 px */
  --unit-foot: 2.1px;                                   /* one unit of the mark that closes the page: the size at which the opening draws it */
  --screen: 100vh;
}
.inverse { --paper: var(--deep); --ink: var(--pale); --ink-soft: #b5bcb5; --rule: #4d5d54; }
@supports (color: color-mix(in srgb, red, blue)) {
  :root { --plate: color-mix(in srgb, var(--ink) 8%, var(--paper)); }
  :root, .inverse { --ink-soft: color-mix(in srgb, var(--ink) 80%, var(--paper)); --rule: color-mix(in srgb, var(--ink) 25%, var(--paper)); }
}
@supports (height: 100svh) { :root { --screen: 100svh; } }
@media (max-width: 760px) { :root { --edge: 22px; --top: 68px; --mark: 24px; --unit: 1.45px; --unit-sign: 1.182px; --size-lines: 1.0625rem; } }

* { box-sizing: border-box; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: var(--size-fact); line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 2px; }
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
svg.dessin { display: block; max-width: 100%; height: auto; overflow: visible; color: var(--ink); }
.l { display: block; }                                  /* a line of a sentence, where the sense breaks */

/* small words */
.link { font-size: var(--size-small); text-decoration: none; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.link:hover { text-decoration: underline; }
.button { display: inline-block; padding: 11px 19px 12px; border-radius: var(--round); background: var(--ink); color: var(--paper);
  font-size: var(--size-small); font-weight: 700; line-height: 1.2; text-decoration: none; white-space: nowrap; }
.button:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.button:focus-visible { outline-offset: 3px; border-radius: var(--round); }

/* the top band: the mark, three links to parts of this page, the button */
.top { position: relative; z-index: 1; width: 100%; max-width: calc(var(--wide) + 2 * var(--edge)); margin: 0 auto; height: var(--top); padding: 0 var(--edge);
  display: flex; align-items: center; justify-content: space-between; }
.brand { display: block; line-height: 0; }
.brand svg { display: block; height: var(--mark); width: auto; aspect-ratio: 214.1 / 49.5; overflow: visible; }
.top nav { display: flex; align-items: center; gap: var(--s6); }
.top nav .button { margin-left: var(--s2); }

/* the first screen: the sentence, over the light of the water */
.first { position: relative; min-height: var(--screen); display: flex; flex-direction: column; }
.first .middle { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 0 var(--edge) calc(var(--top) + var(--s4)); }
.sentence { max-width: 16em; font-family: var(--serif); font-weight: 400; font-size: var(--size-first); line-height: 1.06; letter-spacing: -0.012em; text-wrap: balance; }
.what { margin-top: var(--s5); font-size: var(--size-small); letter-spacing: 0.01em; }
.first .middle .button { display: none; margin-top: var(--s6); }
.cue { position: absolute; z-index: 1; left: 50%; bottom: var(--s6); width: 7px; height: var(--s7); margin-left: -3.5px;      /* two lines, as everything drawn here: the way down */
  border: solid var(--ink); border-width: 0 1.5px; opacity: 0.55; }

/* a part: a sentence, its plain lines, and a drawing on its sheet, with room around it */
.part { max-width: calc(var(--wide) + 2 * var(--edge)); margin: 0 auto; padding: var(--s9) var(--edge);
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--s8); align-items: center; scroll-margin-top: calc(-1 * var(--s5)); }
.part.turned { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.part.turned .words { order: 2; }
.part h2, .you h2, .ask h2 { font-family: var(--serif); font-weight: 400; font-size: var(--size-part); line-height: 1.06; letter-spacing: -0.01em; text-wrap: balance; }
.lines { margin-top: var(--s5); max-width: 29em; font-size: var(--size-lines); line-height: 1.45; color: var(--ink-soft); }
.lines .l { text-wrap: balance; }                       /* each plain sentence starts its own line, and breaks evenly if it must */
.plate { height: var(--plate-tall); padding: 0 var(--s6); display: flex; align-items: center; justify-content: center; background: var(--plate); border-radius: var(--round); }
.plate svg { width: calc(var(--u) * var(--unit)); }

/* small facts: two or three words in bold, one line */
.facts { grid-column: 1 / -1; order: 3; margin-top: var(--s8); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--s7); }
.facts li { border-top: 1px solid var(--rule); padding-top: var(--s4); }
.facts h3, .signs h3 { font-size: var(--size-fact); font-weight: 700; line-height: 1.35; }
.facts p, .signs p { margin-top: var(--s1); color: var(--ink-soft); line-height: 1.45; max-width: 22em; }

/* the part that has four signs in place of one drawing */
.you { max-width: calc(var(--wide) + 2 * var(--edge)); margin: 0 auto; padding: var(--s9) var(--edge) var(--s10); scroll-margin-top: calc(-1 * var(--s5)); }
.signs { margin-top: var(--s8); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--s7); row-gap: var(--s7); }
.signs li { display: flex; flex-direction: column; }
.signs .place { height: calc(44 * var(--unit-sign)); display: flex; align-items: flex-end; }
.signs .place svg { width: calc(var(--u) * var(--unit-sign)); }
.signs h3 { margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--rule); }

/* the end of the page, turned: the ink is the page and the paper writes on it */
.inverse { background: var(--paper); color: var(--ink); }
.ask { max-width: calc(var(--wide) + 2 * var(--edge)); margin: 0 auto; padding: var(--s10) var(--edge); display: flex; flex-direction: column; align-items: center; text-align: center; }
.ask h2 { font-size: var(--size-first); }
.ask .lines { max-width: 30em; }
.ask .button { margin-top: var(--s7); padding: 15px 26px 16px; font-size: 1rem; }
.ask .after { margin-top: var(--s5); font-size: var(--size-small); color: var(--ink-soft); text-wrap: balance; }
.foot { max-width: calc(var(--wide) + 2 * var(--edge)); margin: 0 auto; padding: 0 var(--edge) var(--s7);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--s7); align-items: end; font-size: var(--size-foot); color: var(--ink-soft); }
.foot::before { content: ""; grid-column: 1 / -1; border-top: 1px solid var(--rule); margin-bottom: var(--s8); }
.foot .sign svg { width: min(100%, calc(var(--u) * var(--unit-foot))); }
.foot .sign p { margin-top: var(--s5); text-wrap: balance; }
.foot nav { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s6); }
.foot .link { font-size: inherit; }

@media (max-width: 980px) {                              /* the three links leave the band; the page is short enough to scroll */
  .top nav .link { display: none; }
  .top nav .button { margin-left: 0; }
}
@media (max-width: 900px) {                              /* one column: the words, then the drawing under them */
  .part, .part.turned { grid-template-columns: minmax(0, 1fr); }
  .part.turned .words { order: 0; }
  .part .plate { margin-top: var(--s7); }
  .facts { margin-top: var(--s7); }
  .foot { grid-template-columns: minmax(0, 1fr); row-gap: var(--s6); }
}
@media (max-width: 760px) {                              /* a phone */
  .sentence .l { display: inline; }
  .sentence .m, .part h2 .m { display: block; }           /* a narrow page takes one more break */
  .lines { text-wrap: pretty; }
  .lines .l { display: inline; }                          /* and its plain lines run on as one paragraph */
  .ask .lines { text-wrap: balance; }
  .cue { height: var(--s6); bottom: var(--s5); }
  .part { padding-top: var(--s8); padding-bottom: var(--s8); scroll-margin-top: 0; }
  .part .plate { height: auto; padding: var(--s7) var(--s6); margin-top: var(--s6); }
  .facts { grid-template-columns: minmax(0, 1fr); row-gap: var(--s5); margin-top: var(--s6); }
  .you { padding-top: var(--s8); padding-bottom: var(--s9); scroll-margin-top: 0; }
  .signs { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: var(--s7); column-gap: var(--s5); }
  .ask { padding-top: var(--s9); padding-bottom: var(--s9); }
  .foot::before { margin-bottom: var(--s7); }
}
@media (max-width: 440px) {                              /* the mark and the button no longer both fit the band: the button goes under the sentence */
  .top nav .button { display: none; }
  .first .middle .button { display: inline-block; }
}

/* the opening: the mark draws itself over the water, goes to its small place, and the page arrives.
   None of this applies unless the first script put "opening" on <html>. */
#opening { display: none; position: absolute; z-index: 2; top: 0; left: 0; width: 100%; height: var(--screen); pointer-events: none; color: var(--ink); }
#opening:not(.ready) .mark { visibility: hidden; }
html.opening #opening { display: block; }
html.opening.settled #opening { display: none; }
html.opening:not(.settled) .brand svg { visibility: hidden; }
html.opening .top nav, html.opening .first .middle, html.opening .cue, html.opening main, html.opening .inverse { opacity: 0; }
html.opening.opened .top nav, html.opening.opened .first .middle, html.opening.opened .cue, html.opening.opened main, html.opening.opened .inverse { opacity: 1; transition: opacity 0.5s ease; }
html.opening.opened .cue { opacity: 0.55; }
