/* Tools Factory, site de l'éditeur. Aucune dépendance : polices servies depuis le site, aucun script. */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --papier: #f1eee6;
  --papier-2: #e6e1d4;
  --encre: #17181a;
  --encre-2: #55544e;
  --filet: rgba(23, 24, 26, 0.16);
  --jaune: #f2c230;
  --noir: #17181a; /* texte posé sur le jaune, quel que soit le thème */
  --texte: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --largeur: 74rem;
  --gouttiere: clamp(1rem, 4vw, 2.5rem);
  --rayures: repeating-linear-gradient(-45deg, var(--jaune) 0 12px, var(--noir) 12px 24px);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --papier: #131312;
    --papier-2: #1e1e1c;
    --encre: #ebe7dc;
    --encre-2: #a6a399;
    --filet: rgba(235, 231, 220, 0.16);
    --jaune: #f5c842;
  }
}

/* Base */

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

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

body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font-family: var(--texte);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.6;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body::before {
  content: "";
  display: block;
  height: 8px;
  background: var(--rayures);
}

h1, h2, h3 {
  margin: 0;
  font-stretch: 112%;
  font-weight: 680;
  line-height: 1.05;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

p { text-wrap: pretty; }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { text-decoration-color: var(--jaune); text-decoration-thickness: 3px; }

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

strong { font-weight: 650; }

.cadre {
  max-width: var(--largeur);
  margin-inline: auto;
  padding-inline: var(--gouttiere);
}

.etiquette {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--encre-2);
}

.insecable { white-space: nowrap; }

.visuellement-cache {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.saut {
  position: absolute;
  left: var(--gouttiere);
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 0.9rem;
  background: var(--encre);
  color: var(--papier);
}
.saut:focus { top: 0.75rem; }

/* Pastille jaune, comme une étiquette collée sur une caisse */
.autocollant {
  display: inline-block;
  padding: 0.3rem 0.6rem;
  background: var(--jaune);
  color: var(--noir);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: rotate(-2deg);
}

/* En-tête */

.entete { border-bottom: 2px solid var(--encre); }
.entete .cadre {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 1rem;
}

.marque {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.75rem;
  font-size: 1rem;
  font-stretch: 125%;
  font-weight: 760;
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
}
.marque svg { width: 1.6rem; height: 1.6rem; flex: none; }
.marque .fond { fill: var(--encre); }
.marque .lettre { fill: var(--papier); }
.marque .piece { fill: var(--jaune); }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav a {
  display: inline-block;
  padding-block: 0.7rem;
  text-decoration: none;
}
.nav a:hover { text-decoration: underline; text-decoration-color: var(--jaune); text-decoration-thickness: 3px; }

/* Ouverture */

.ouverture {
  padding-top: clamp(3rem, 8vw, 6rem);
  border-bottom: 2px solid var(--encre);
  overflow: hidden;
}
.ouverture h1 {
  max-width: 12em;
  margin-top: 1.25rem;
  font-size: clamp(2.6rem, 1.2rem + 5.6vw, 5.8rem);
  font-stretch: 118%;
  line-height: 0.98;
  letter-spacing: -0.03em;
}
.ouverture mark {
  padding-inline: 0.04em;
  background: linear-gradient(transparent 60%, var(--jaune) 60% 90%, transparent 90%);
  color: inherit;
}
@media (prefers-color-scheme: dark) {
  .ouverture mark { background: none; color: var(--jaune); }
}
.chapeau {
  max-width: 34em;
  margin: 1.75rem 0 0;
  font-size: clamp(1.125rem, 1rem + 0.55vw, 1.4rem);
  line-height: 1.5;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  margin-top: 2.25rem;
  font-weight: 600;
}
.bouton {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.3rem;
  background: var(--encre);
  color: var(--papier);
  font-stretch: 110%;
  text-decoration: none;
  box-shadow: 4px 4px 0 var(--jaune);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.bouton:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--jaune); }

/* La chaîne de production (illustration décorative) */

.chaine-visuel { margin-top: clamp(2.5rem, 6vw, 4rem); }
.chaine-visuel svg {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 1;
  overflow: hidden;
}
@media (max-width: 700px) {
  .chaine-visuel svg { aspect-ratio: auto; height: 150px; }
}

.chaine-visuel .trait { fill: none; stroke: var(--encre); stroke-width: 2.5; stroke-linecap: square; }
.chaine-visuel .plein { fill: var(--encre); }
.chaine-visuel .boite { fill: var(--papier-2); stroke: var(--encre); stroke-width: 2.5; }
.chaine-visuel .jaune { fill: var(--jaune); }
.chaine-visuel .sur-jaune { fill: var(--noir); }
.chaine-visuel text {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  fill: var(--encre);
}
.chaine-visuel .enseigne {
  font-family: var(--texte);
  font-size: 19px;
  font-stretch: 125%;
  font-weight: 760;
  letter-spacing: 0.04em;
}

.chaine-visuel .caisse { animation: defile 20s linear infinite; }
.chaine-visuel .c2 { animation-delay: -5s; }
.chaine-visuel .c3 { animation-delay: -10s; }
.chaine-visuel .c4 { animation-delay: -15s; }
@keyframes defile {
  from { transform: translateX(40px); }
  to { transform: translateX(1240px); }
}

.chaine-visuel .surface { stroke-dasharray: 18 12; animation: tapis 0.5s linear infinite; }
@keyframes tapis {
  to { stroke-dashoffset: -30; }
}

.chaine-visuel .rouleau {
  transform-box: fill-box;
  transform-origin: center;
  animation: tourne 1s linear infinite;
}
@keyframes tourne {
  to { transform: rotate(360deg); }
}

.chaine-visuel .fumee {
  fill: var(--papier-2);
  stroke: var(--encre);
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  animation: fumee 4s ease-out infinite;
  opacity: 0;
}
.chaine-visuel .f2 { animation-delay: -1.33s; }
.chaine-visuel .f3 { animation-delay: -2.66s; }
@keyframes fumee {
  0% { transform: translate(0, 0) scale(0.6); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translate(18px, -44px) scale(1.4); opacity: 0; }
}

.chaine-visuel .voyant { animation: clignote 2.4s steps(1) infinite; }
@keyframes clignote {
  50% { opacity: 0.2; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bouton { transition: none; }
  .chaine-visuel * { animation: none !important; }
  .chaine-visuel .c1 { transform: translateX(250px); }
  .chaine-visuel .c2 { transform: translateX(520px); }
  .chaine-visuel .c3 { transform: translateX(760px); }
  .chaine-visuel .c4 { transform: translateX(1020px); }
  .chaine-visuel .fumee { opacity: 1; }
}

/* Sections */

.section {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
  border-bottom: 1px solid var(--filet);
}
.section .cadre {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3rem);
}
.section-tete {
  display: grid;
  gap: 0.9rem;
  align-content: start;
  max-width: 34rem;
}
.section-tete h2 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.2rem); }
.section-tete p:not(.etiquette) { margin: 0; color: var(--encre-2); }

@media (min-width: 900px) {
  .section--cote .cadre {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    column-gap: clamp(3rem, 6vw, 6rem);
  }
}

/* Postes de la chaîne : une piste pointillée, verticale sur téléphone, horizontale sur grand écran */

.postes {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}
.poste {
  position: relative;
  padding: 0 0 2.25rem 2rem;
  border-left: 2px dashed var(--encre);
}
.poste:last-child { padding-bottom: 0; border-left-color: transparent; }
.poste::before {
  content: "";
  position: absolute;
  top: 0.1rem;
  left: -9px;
  width: 16px;
  height: 16px;
  background: var(--jaune);
  border: 2px solid var(--noir);
}
.poste h3 {
  margin-block: 0.5rem 0.6rem;
  font-size: 1.35rem;
  font-stretch: 110%;
  font-weight: 680;
  line-height: 1.2;
}
.poste p:not(.etiquette) { margin: 0; color: var(--encre-2); max-width: 30em; }

@media (min-width: 900px) {
  .postes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .poste,
  .poste:last-child {
    padding: 2rem 2rem 0 0;
    border-left: 0;
    border-top: 2px dashed var(--encre);
  }
  .poste::before { top: -9px; left: 0; }
}

/* Nos outils : le tableau de production */

.registre {
  width: 100%;
  border-collapse: collapse;
  border-top: 2px solid var(--encre);
  font-size: 0.97rem;
}
.registre th {
  padding: 0.8rem 1rem 0.8rem 0;
  border-bottom: 1px solid var(--encre);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-align: left;
  text-transform: uppercase;
  color: var(--encre-2);
}
.registre td {
  padding: 1.15rem 1rem 1.15rem 0;
  border-bottom: 1px solid var(--filet);
  vertical-align: top;
}
.registre td:first-child { font-family: var(--mono); font-size: 0.85rem; color: var(--encre-2); }
.registre td a { font-weight: 650; }
.registre .vide td { padding-block: 2.25rem; font-family: inherit; font-size: inherit; color: inherit; }
.registre .vide p { margin: 1rem 0 0; max-width: 34em; }

.statut {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border: 1.5px solid var(--encre);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}
.statut--test { background: var(--jaune); border-color: var(--noir); color: var(--noir); }
.statut--service { background: var(--encre); color: var(--papier); }

@media (max-width: 720px) {
  .registre thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .registre tr, .registre td { display: block; }
  .registre tr { padding-block: 1rem; border-bottom: 1px solid var(--filet); }
  .registre td { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 1rem; padding: 0.3rem 0; border: 0; }
  .registre td::before {
    content: attr(data-label);
    padding-top: 0.2em;
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--encre-2);
  }
  .registre .vide { padding-block: 0; }
  .registre .vide td { display: block; padding-block: 2rem; }
  .registre .vide td::before { content: none; }
}

.mode-emploi {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: 2.5rem;
  margin: clamp(2.5rem, 5vw, 3.5rem) 0 0;
}
.mode-emploi div {
  padding-block: 1.1rem;
  border-top: 1px solid var(--filet);
}
.mode-emploi dt { font-weight: 650; font-stretch: 108%; }
.mode-emploi dd { margin: 0.3rem 0 0; color: var(--encre-2); }
@media (min-width: 620px) {
  .mode-emploi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Contact : bande à l'encre, rayures de chantier au-dessus */

.contact {
  position: relative;
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
  background: var(--encre);
  color: var(--papier);
}
.contact::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 10px;
  background: var(--rayures);
}
.contact .cadre {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
}
.contact .etiquette { color: inherit; opacity: 0.72; }
.contact-corps p { margin: 0; max-width: 34em; }
.contact-corps p + p { margin-top: 1.25rem; }
.adresse-mail {
  display: inline-block;
  font-size: clamp(1.3rem, 0.55rem + 3.6vw, 2.6rem);
  font-stretch: 112%;
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
  overflow-wrap: anywhere;
}
.contact .note { opacity: 0.72; font-size: 0.95rem; }

@media (min-width: 900px) {
  .contact .cadre {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    column-gap: clamp(3rem, 6vw, 6rem);
  }
}

/* Pied de page */

.pied {
  padding-block: 2.5rem 3rem;
  border-top: 2px solid var(--encre);
  font-size: 0.9rem;
  color: var(--encre-2);
}
.pied .cadre {
  display: grid;
  gap: 1.5rem;
}
.pied p { margin: 0.75rem 0 0; }
.pied .marque { color: var(--encre); font-size: 0.85rem; min-height: 0; }
.pied .marque svg { width: 1.25rem; height: 1.25rem; }
.pied ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pied ul a { display: inline-block; padding-block: 0.35rem; color: var(--encre); }

@media (min-width: 760px) {
  .pied .cadre { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .pied ul { justify-content: flex-end; }
}

/* Pages de texte : mentions légales, confidentialité */

.document { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3.5rem, 8vw, 6rem); }
.document .cadre {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.25rem;
}
.document-tete {
  padding-bottom: 1.75rem;
  border-bottom: 2px solid var(--encre);
}
.document-tete h1 {
  margin-block: 0.9rem 1rem;
  font-size: clamp(2.2rem, 1.3rem + 3.6vw, 4rem);
  font-stretch: 116%;
  letter-spacing: -0.025em;
}
.document-tete .chapeau { margin: 0 0 1.25rem; }

.sommaire { font-size: 0.92rem; }
.sommaire ol {
  display: grid;
  gap: 0.3rem;
  margin: 0.8rem 0 0;
  padding-left: 1.6rem;
}
.sommaire li::marker {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--encre-2);
}
.sommaire a { text-decoration: none; }
.sommaire a:hover { text-decoration: underline; text-decoration-color: var(--jaune); text-decoration-thickness: 3px; }

.texte { max-width: 44rem; }
.texte section { scroll-margin-top: 1.5rem; }
.texte section + section {
  margin-top: 2.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--filet);
}
.texte h2 {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  font-size: clamp(1.3rem, 1.15rem + 0.6vw, 1.6rem);
  font-stretch: 108%;
  font-weight: 650;
  line-height: 1.2;
}
.texte h2 .num {
  flex: none;
  padding: 0.15em 0.4em;
  background: var(--jaune);
  color: var(--noir);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  font-stretch: 100%;
  letter-spacing: 0.04em;
}
.texte p, .texte ul { margin: 1rem 0 0; }
.texte ul { padding-left: 1.2rem; }
.texte li + li { margin-top: 0.5rem; }
.texte li::marker { color: var(--encre-2); }

.fiche {
  margin: 1.25rem 0 0;
  border-top: 1px solid var(--encre);
}
.fiche div {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.15rem;
  padding-block: 0.75rem;
  border-bottom: 1px solid var(--filet);
}
.fiche dt {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--encre-2);
}
.fiche dd { margin: 0; overflow-wrap: anywhere; }
@media (min-width: 560px) {
  .fiche div { grid-template-columns: 12rem minmax(0, 1fr); gap: 1.25rem; }
  .fiche dt { padding-top: 0.25em; }
}

@media (min-width: 960px) {
  .document .cadre {
    grid-template-columns: minmax(0, 14rem) minmax(0, 1fr);
    column-gap: clamp(3rem, 6vw, 5.5rem);
  }
  .document-tete { grid-column: 1 / -1; }
  .sommaire { position: sticky; top: 1.5rem; align-self: start; }
}

/* Page introuvable */

.introuvable { padding-block: clamp(4rem, 12vw, 9rem); }
.introuvable h1 {
  margin-block: 1.25rem;
  font-size: clamp(2.4rem, 1.4rem + 4.5vw, 4.5rem);
  font-stretch: 118%;
  letter-spacing: -0.03em;
}
.introuvable p:not(.etiquette) { margin: 0 0 2rem; max-width: 30em; }
