/*
 * Orami Apps · Giro — « Finestra crème » (couleurs de packages/tokens/src/color.ts).
 * Jour = sémantique « Clair », nuit = sémantique « Notte ». Aucune ressource externe.
 *
 * Contrastes (WCAG 2.x, AA = 4,5:1 texte, 3:1 éléments graphiques) :
 *   Jour  texte  #1D2A45 (encre.ink)        sur #FFF5E3 (crema)  13,22:1 · sur #FFFAF1 (carta) 13,75:1
 *         tenu   #6E6352 (encre.pietra)    sur crema 5,44:1 · sur carta 5,66:1
 *         lien   #C1412C (oroRosa.accent)  sur crema 4,78:1 · sur carta 4,97:1
 *         survol #7E3530 (brique)          sur crema 7,96:1
 *         en-tête de tableau : encre sur #FBECD2 (crema2) 12,27:1 (aucun lien dedans)
 *         focus  #3A8FB7 (laguna)          sur crema 3,35:1 (anneau, ≥ 3:1)
 *   Nuit  texte  #F3E8D8 (notte.creme)     sur #1A1E36 (cielo) 13,52:1 · sur #262C44 (ardoise) 11,37:1
 *         tenu   #BDB3A6 (cremeTenue)      sur cielo 7,92:1 · sur ardoise 6,66:1
 *         lien   #F08A68 (terracottaClair) sur cielo 6,66:1 · sur ardoise 5,60:1
 *         en-tête de tableau : crème sur #323A55 (ardoiseClaire) 9,27:1
 *         focus  #8DCAE8 (lagunaTexte)     sur cielo 9,16:1
 */

:root {
  color-scheme: light dark;
  --fond: #fff5e3;
  --papier: #fffaf1;
  --enfonce: #fbecd2;
  --texte: #1d2a45;
  --tenu: #6e6352;
  --lien: #c1412c;
  --lien-survol: #7e3530;
  --bordure: #ecdcc1;
  --bordure-forte: #e2cfae;
  --focus: #3a8fb7;
  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mesure: 68ch;
  --gouttiere: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fond: #1a1e36;
    --papier: #262c44;
    --enfonce: #323a55;
    --texte: #f3e8d8;
    --tenu: #bdb3a6;
    --lien: #f08a68;
    --lien-survol: #f3e8d8;
    --bordure: #3a4262;
    --bordure-forte: #4a5378;
    --focus: #8dcae8;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

.entete,
main,
.pied {
  max-width: calc(var(--mesure) + 2 * var(--gouttiere));
  margin-inline: auto;
  padding-inline: var(--gouttiere);
}

.entete {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  padding-block: 20px 8px;
  border-bottom: 1px solid var(--bordure);
}

.marque {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--texte);
  text-decoration: none;
}

.fil {
  margin: 0;
  color: var(--tenu);
  font-size: 0.9375rem;
}

.fil a {
  color: var(--tenu);
}

main {
  padding-block: 8px 48px;
}

main:focus {
  outline: none;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.25;
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.375rem);
  margin: 32px 0 16px;
}

h2 {
  font-size: 1.375rem;
  margin: 40px 0 12px;
  scroll-margin-top: 16px;
}

h3 {
  font-size: 1.125rem;
  margin: 28px 0 8px;
}

.ancre {
  color: var(--tenu);
  font-family: var(--sans);
  font-weight: 400;
  text-decoration: none;
  opacity: 0;
}

h2:hover .ancre,
.ancre:focus-visible {
  opacity: 1;
}

@media (hover: none) {
  .ancre {
    opacity: 1;
  }
}

p,
ul,
ol,
blockquote {
  margin: 0 0 16px;
}

ul,
ol {
  padding-left: 1.4em;
}

li {
  margin-bottom: 6px;
}

li > ul {
  margin: 6px 0 0;
}

a {
  color: var(--lien);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--lien-survol);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--enfonce);
  padding: 0.1em 0.3em;
  border-radius: 4px;
}

blockquote {
  padding: 12px 16px;
  background: var(--papier);
  border-left: 3px solid var(--lien);
  border-radius: 0 8px 8px 0;
}

blockquote > :last-child {
  margin-bottom: 0;
}

strong {
  font-weight: 650;
}

/* Tableaux : défilent dans leur conteneur, jamais la page. */
.tableau {
  overflow-x: auto;
  margin: 0 0 20px;
  border: 1px solid var(--bordure-forte);
  border-radius: 10px;
  background: var(--papier);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 32rem;
  font-size: 0.9375rem;
  line-height: 1.45;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--bordure);
}

th {
  background: var(--enfonce);
  font-weight: 650;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.evitement {
  position: absolute;
  left: var(--gouttiere);
  top: -100px;
  padding: 8px 12px;
  background: var(--papier);
  color: var(--texte);
  border-radius: 8px;
  z-index: 1;
}

.evitement:focus {
  top: 8px;
}

.pied {
  padding-block: 24px 40px;
  border-top: 1px solid var(--bordure);
  color: var(--tenu);
  font-size: 0.9375rem;
}

.pied ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}

.pied li {
  margin: 0;
}

.pied a[aria-current="page"] {
  color: var(--texte);
  text-decoration: none;
  font-weight: 650;
}

.pied p {
  margin: 0 0 6px;
}
