/* Système pétrole, commun à l'accueil et à la page 404.
   En sombre, le pétrole #13566A ne passe pas AA comme couleur de texte sur l'encre :
   il ne sert donc que d'aplat, avec du texte papier, et ce dans les deux thèmes. */
@import url('/fonts.css');

:root {
  --papier: #EEEAE1;
  --encre: #131313;
  --petrole: #13566A;
  --secondaire: #4A463F;
  --filet: #131313;
  --titre: 'Big Shoulders Display', 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --marge: clamp(16px, 3.2vw, 40px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --papier: #131313;
    --encre: #EEEAE1;
    --secondaire: #A8A294;
    --filet: #EEEAE1;
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--papier);
  color: var(--encre);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  font-optical-sizing: auto;
}

a { color: inherit; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

h1, h2, p, ol, ul { margin: 0; padding: 0; }
ul { list-style: none; }

/* Étiquette en capitales mono, reprise des maquettes. */
.etiquette {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* Bandeau */
.bandeau {
  min-height: 64px;
  margin: 0 var(--marge);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 24px;
  border-bottom: 2px solid var(--filet);
}
.bandeau a { text-decoration: none; }
.bandeau a:hover { text-decoration: underline; text-underline-offset: 4px; }
.marque { display: inline-flex; align-items: center; gap: 10px; }
.marque::before { content: ''; width: 14px; height: 14px; background: var(--petrole); }

/* Contenu */
main {
  flex: 1;
  width: 100%;
  padding: 0 var(--marge);
}

/* Le nom. Deux lignes en étroit, une ligne dès que la largeur le permet.
   MESURE mesure 2,82 em et PLEINE 2,55 em : les coefficients en découlent. */
.nom {
  margin-top: var(--marge);
  display: flex;
  flex-wrap: wrap;
  font-family: var(--titre);
  font-weight: 800;
  font-size: min(calc((100vw - 2 * var(--marge)) * .335), 300px);
  line-height: .86;
  letter-spacing: .005em;
  text-transform: uppercase;
}
.nom span { display: block; }
.nom .mesure {
  flex: 1 1 100%;
  padding: .06em .05em .04em;
  background: var(--petrole);
  color: #EEEAE1;
}

.devise {
  margin-top: 28px;
  max-width: 24em;
  font-size: clamp(25px, 3.4vw, 36px);
  line-height: 1.3;
  text-wrap: pretty;
}

.bloc {
  margin-top: 56px;
  padding-top: 16px;
  border-top: 2px solid var(--filet);
}
.bloc > .etiquette { margin-bottom: 20px; }

/* Méthode : trois phrases numérotées. */
.methode {
  list-style: none;
  display: grid;
  gap: 24px;
  counter-reset: regle;
}
.methode li {
  counter-increment: regle;
  display: grid;
  grid-template-columns: 2.2em minmax(0, 1fr);
  column-gap: 12px;
  max-width: 35em;
  text-wrap: pretty;
}
.methode li::before {
  content: counter(regle, decimal-leading-zero);
  font-family: var(--titre);
  font-weight: 800;
  font-size: 1.9em;
  line-height: .95;
  color: var(--encre);
}

/* Degrés de certitude : plein, bordé, pointillé, comme sur la page Méthode. */
.degre {
  display: inline-block;
  padding: 0 6px;
  border: 2px solid var(--filet);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.degre.solide { background: var(--encre); color: var(--papier); }
.degre.estime { border-style: dashed; }

/* Dossiers annoncés */
.dossiers li {
  padding: 12px 0;
  border-bottom: 1px solid var(--filet);
  font-family: var(--titre);
  font-weight: 800;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.04;
  letter-spacing: .005em;
  text-transform: uppercase;
}
.dossiers li:first-child { padding-top: 0; }
.dossiers small {
  display: block;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: .1em;
  color: var(--secondaire);
}

/* La ligne : position de l'auteur, donc en couleur, à part du constat. */
.ligne {
  margin: 56px 0;
  padding: clamp(20px, 3.2vw, 36px);
  background: var(--petrole);
  color: #EEEAE1;
}
.ligne .etiquette { margin-bottom: 14px; }
.ligne p:last-child {
  font-family: var(--titre);
  font-weight: 800;
  font-size: min(calc((100vw - 2 * var(--marge) - 40px) * .135), 96px);
  line-height: 1.12;
  letter-spacing: .005em;
  text-transform: uppercase;
}
.ligne p:last-child span { display: inline-block; }

/* Lien isolé (retour à l'accueil de la 404) */
.suivre {
  margin: 40px 0 56px;
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: .04em;
}
.suivre a { text-underline-offset: 5px; text-decoration-thickness: 2px; }
.suivre a:hover { text-decoration-thickness: 1px; }

/* Pied de page : aplat encre en clair, aplat papier en sombre. */
.pied {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 32px;
  padding: 22px var(--marge);
  background: var(--encre);
  color: var(--papier);
}

/* Page 404 */
.perdu {
  margin-top: var(--marge);
  font-family: var(--titre);
  font-weight: 800;
  font-size: min(calc((100vw - 2 * var(--marge)) * .62), 340px);
  line-height: .84;
  letter-spacing: .005em;
}
.perdu-titre {
  margin-top: 28px;
  font-family: var(--titre);
  font-weight: 800;
  font-size: clamp(36px, 6vw, 64px);
  line-height: .95;
  letter-spacing: .005em;
  text-transform: uppercase;
}
.perdu-texte { margin-top: 16px; max-width: 30em; }
.perdu-texte + .suivre { margin-top: 24px; }

/* Une ligne pour le nom dès 860 px : PLEINE à gauche, MESURE en aplat jusqu'au bord. */
@media (min-width: 860px) {
  .nom {
    font-size: min(calc((100vw - 2 * var(--marge)) * .172), 300px);
    flex-wrap: nowrap;
    column-gap: .1em;
  }
  .nom .mesure { flex: 1 1 auto; }
  /* Les trois mots sur une ligne : 15,4 em au total, espaces comprises. */
  .ligne p:last-child {
    font-size: min(calc((100vw - 2 * var(--marge) - 2 * clamp(20px, 3.2vw, 36px)) * .0645), 96px);
    white-space: nowrap;
    word-spacing: .12em;
  }
  .colonnes {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 40px;
    align-items: start;
  }
  .colonnes .bloc { min-width: 0; }
}
