/* Portunus, the inner pages: the dress of the home (site.css), and the few parts the home does not have.
   Same custom properties, same scale of spaces, two colours. Every selector here is new or more precise than its
   neighbour in site.css, so the order of the two files does not matter. */

/* an inner page: the top band, its main, then the foot on the ink, at the bottom of the window even when the page is short */
body.interieur { min-height: var(--screen); display: flex; flex-direction: column; }
body.interieur > main { flex: 1 0 auto; }
body.interieur > main.centre { display: flex; flex-direction: column; }
.inverse.seul .foot { padding-top: var(--s8); }
.inverse.seul .foot::before { content: none; }          /* the hairline parts the ask from the foot on the home; alone, the ink is enough */
.top > .button { margin-left: auto; }

/* the sentence of an inner page, in the hand of the parts of the home */
.phrase { font-family: var(--serif); font-weight: 400; font-size: var(--size-part); line-height: 1.06; letter-spacing: -0.01em; text-wrap: balance; }
.phrase.grande { font-size: var(--size-first); letter-spacing: -0.012em; }
.page { max-width: calc(var(--wide) + 2 * var(--edge)); margin: 0 auto; padding: var(--s8) var(--edge) var(--s9); }
.page a:not(.button):not(.link) { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.page a:not(.button):not(.link):hover { text-decoration-thickness: 2px; }
.link.retour { display: inline-block; margin-top: var(--s7); font-size: 1rem; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.link.retour:hover { text-decoration-thickness: 2px; }
.nb { white-space: nowrap; }                             /* « e-mail » does not break at its hyphen */

/* one sentence in the middle, as the first screen of the home (the 404) */
.seule { flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: var(--s8) var(--edge); }

/* the demonstration: the sentence at left, the form on its sheet at right, as a part of the home and its drawing */
.demande { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--s8); align-items: start;
  grid-template-areas: "mots feuille" "ecrire feuille"; grid-template-rows: auto 1fr; padding-top: var(--s7); }
.demande .words { grid-area: mots; padding-top: var(--s6); }
.demande .ecrire { grid-area: ecrire; margin-top: var(--s7); font-size: var(--size-fact); color: var(--ink-soft); }
.demande .ecrire a { color: var(--ink); }
.feuille { grid-area: feuille; padding: var(--s6); background: var(--plate); border-radius: var(--round); }

.formulaire { display: grid; row-gap: var(--s5); }
.champ { display: grid; row-gap: var(--s2); }
.champ label { font-size: var(--size-fact); font-weight: 700; line-height: 1.35; }
.champ .facultatif { margin-left: var(--s1); font-weight: 400; color: var(--ink-soft); }
.champ input { width: 100%; height: 46px; margin: 0; padding: 0 var(--s4); border: 1px solid var(--rule); border-radius: var(--round);
  background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 1rem; line-height: 1.2; }
.champ input[type="number"] { width: 9em; -moz-appearance: textfield; appearance: textfield; }
.champ input[type="number"]::-webkit-inner-spin-button, .champ input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.champ input:hover { border-color: color-mix(in srgb, var(--ink) 45%, var(--paper)); }
.champ input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-color: var(--ink); }
.champ input[aria-invalid="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.erreur { font-size: var(--size-small); font-weight: 700; line-height: 1.4; }
.erreur:empty { display: none; }
.piege { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.formulaire .button { justify-self: start; margin-top: var(--s2); padding: 15px 26px 16px; border: 0; font-family: var(--sans); font-size: 1rem; cursor: pointer; }
.formulaire .button:disabled { opacity: 0.6; cursor: progress; text-decoration: none; }
.echec { padding: var(--s3) var(--s4); border: 1px solid var(--ink); border-radius: var(--round); font-size: var(--size-fact); font-weight: 700; line-height: 1.45; }
.echec:empty { display: none; }
.apres { font-size: var(--size-small); line-height: 1.45; color: var(--ink-soft); }
.apres p + p { margin-top: var(--s1); }
.apres a { color: inherit; }

/* the thank-you page: a part of the home, the sentence and its drawing */
.part.merci { padding-top: var(--s7); }

/* the page for someone who received an e-mail: a sentence, its lines, three small signs */
.recu .signs.trois { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.signs .titre-signe { margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--rule);     /* a sign's title under an h1: an h2 dressed as the home's h3 */
  font-size: var(--size-fact); font-weight: 700; line-height: 1.35; }

/* the legal page: two parts, each a sentence over a list of small titles and their text */
.legal + .legal { padding-top: 0; }
#confidentialite { scroll-margin-top: var(--s7); }
.registre { margin-top: var(--s7); border-bottom: 1px solid var(--rule); }
.registre > div { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: var(--s8); align-items: baseline;
  padding: var(--s5) 0; border-top: 1px solid var(--rule); }
.registre dt { font-size: var(--size-fact); font-weight: 700; line-height: 1.35; }
.registre dd { margin: 0; max-width: 32em; font-size: var(--size-lines); line-height: 1.45; color: var(--ink-soft); }
.registre dd p + p, .registre dd p + ul { margin-top: var(--s3); }
.registre dd .l { display: block; }
.registre dd a { color: var(--ink); }
.prestataires li + li { margin-top: var(--s3); }
.prestataires strong { font-weight: 700; color: var(--ink); }
.date { margin-top: var(--s5); font-size: var(--size-small); color: var(--ink-soft); }

@media (max-width: 900px) {                              /* one column: the words, then the form under them */
  .demande { grid-template-columns: minmax(0, 1fr); grid-template-areas: "mots" "feuille" "ecrire"; grid-template-rows: none; }
  .demande .words { padding-top: 0; }
  .feuille { margin-top: var(--s7); }
}
@media (max-width: 760px) {                              /* a phone */
  .inverse.seul .foot { padding-top: var(--s7); }
  .page { padding-top: var(--s6); padding-bottom: var(--s8); }
  .demande { padding-top: var(--s5); }
  .feuille { margin-top: var(--s6); padding: var(--s5); }
  .part.merci { padding-top: var(--s6); }
  .recu .signs.trois { grid-template-columns: minmax(0, 1fr); row-gap: var(--s6); }
  .registre > div { grid-template-columns: minmax(0, 1fr); row-gap: var(--s2); }
}
@media (max-width: 440px) {                              /* as on the home: the mark and the button no longer both fit the band */
  .top > .button { display: none; }
}
